* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #333;
    background-color: #f5f5f5;
    line-height: 1.4;
}

/* Westminster Official Brand Colors */
:root {
    --westminster-blue: #8B3A62;
    --westminster-dark-blue: #6B2A4A;
    --westminster-red: #E31837;
    --westminster-light-grey: #f5f5f5;
}

/* Header - Westminster Style */
.header {
    background-color: var(--westminster-blue);
    color: white;
    padding: 0;
}

.header-top {
    background-color: #002244;
    padding: 5px 20px;
    font-size: 11px;
    text-align: right;
}

.header-top a {
    color: #ccc;
    text-decoration: none;
    margin-left: 15px;
}

.header-top a:hover {
    color: white;
}

.header-main {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Westminster Logo SVG Style */
.westminster-logo-svg {
    width: 55px;
    height: 55px;
}

.header-text h1 {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 0.5px;
    font-family: Georgia, 'Times New Roman', serif;
}

.header-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.header-nav {
    display: flex;
    gap: 20px;
}

.header-nav a {
    color: white;
    text-decoration: none;
    font-size: 12px;
}

.header-nav a:hover {
    text-decoration: underline;
}

/* Sub header - Red accent bar */
.sub-header {
    background-color: var(--westminster-blue);
    padding: 0 20px;
    border-bottom: 4px solid var(--westminster-red);
    overflow-x: auto;
}

.sub-header nav {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.sub-header a {
    color: white;
    text-decoration: none;
    padding: 12px 18px;
    font-size: 13px;
    border-right: 1px solid rgba(255,255,255,0.2);
    transition: background-color 0.2s;
    white-space: nowrap;
}

.sub-header a:first-child {
    border-left: 1px solid rgba(255,255,255,0.2);
}

.sub-header a:hover {
    background-color: rgba(255,255,255,0.1);
}

.sub-header a.active {
    background-color: var(--westminster-red);
}

/* Main container */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    gap: 15px;
}

/* Sidebar */
.sidebar {
    width: 200px;
    flex-shrink: 0;
}

.sidebar-section {
    background: white;
    border: 1px solid #ccc;
    margin-bottom: 10px;
}

.sidebar-section h3 {
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
    padding: 10px 12px;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    color: var(--westminster-blue);
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section li {
    border-bottom: 1px solid #eee;
}

.sidebar-section li:last-child {
    border-bottom: none;
}

.sidebar-section a {
    display: block;
    padding: 8px 12px;
    color: var(--westminster-blue);
    text-decoration: none;
    font-size: 12px;
}

.sidebar-section a:hover {
    background: #f0f0f0;
    text-decoration: underline;
}

.sidebar-section a.current {
    background: #fff8dc;
    font-weight: bold;
    border-left: 3px solid var(--westminster-red);
}

/* Main content */
.main-content {
    flex: 1;
    background: white;
    border: 1px solid #ccc;
    padding: 15px;
    min-width: 0;
}

.page-title {
    font-size: 18px;
    color: var(--westminster-blue);
    border-bottom: 2px solid var(--westminster-blue);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-family: Georgia, 'Times New Roman', serif;
}

/* Profile Card - Improved */
.profile-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.profile-photo {
    width: 140px;
    height: 170px;
    background: linear-gradient(135deg, #dee2e6 0%, #adb5bd 100%);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-placeholder {
    text-align: center;
    color: #6c757d;
    font-size: 11px;
}

.profile-photo-placeholder svg {
    display: block;
    margin: 0 auto 8px;
    opacity: 0.5;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--westminster-blue);
    margin-bottom: 5px;
    font-family: Georgia, 'Times New Roman', serif;
}

.profile-id {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.profile-id strong {
    color: var(--westminster-blue);
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.profile-detail-item {
    display: flex;
    flex-direction: column;
}

.profile-detail-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.profile-detail-value {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.profile-status {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

/* Info boxes */
.info-box {
    margin-bottom: 20px;
}

.info-box h4 {
    background: linear-gradient(to right, var(--westminster-blue), var(--westminster-dark-blue));
    color: white;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: normal;
}

.info-box-content {
    border: 1px solid #ccc;
    border-top: none;
    padding: 12px;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    background: #f5f5f5;
    text-align: left;
    padding: 8px 10px;
    border: 1px solid #ddd;
    font-weight: normal;
    color: #555;
    width: 30%;
}

.data-table td {
    padding: 8px 10px;
    border: 1px solid #ddd;
}

/* Module table */
.module-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 10px;
}

.module-table th {
    background: var(--westminster-blue);
    color: white;
    padding: 10px 8px;
    text-align: left;
    font-weight: normal;
    border: 1px solid var(--westminster-dark-blue);
}

.module-table td {
    padding: 10px 8px;
    border: 1px solid #ddd;
}

.module-table tr:nth-child(even) {
    background: #f9f9f9;
}

.module-table tr:hover {
    background: #fffef0;
}

/* Status badges */
.status {
    display: inline-block;
    padding: 3px 10px;
    font-size: 10px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-enrolled {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-completed {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 7px 14px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid #ccc;
    background: linear-gradient(to bottom, #fff, #f0f0f0);
    color: #333;
    cursor: pointer;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.btn:hover {
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    border-color: #999;
}

.btn-primary {
    background: linear-gradient(to bottom, var(--westminster-blue), var(--westminster-dark-blue));
    color: white;
    border-color: var(--westminster-dark-blue);
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #004080, var(--westminster-blue));
}

/* Alert box */
.alert {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid;
    font-size: 12px;
}

.alert-info {
    background: #e7f3fe;
    border-color: #b6d4fe;
    color: #084298;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    font-size: 11px;
    color: #666;
    border-top: 4px solid var(--westminster-red);
    margin-top: 20px;
    background: #f5f5f5;
}

.footer a {
    color: var(--westminster-blue);
}

.footer-logo {
    margin-bottom: 10px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 11px;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.breadcrumb a {
    color: var(--westminster-blue);
}

/* User info bar */
.user-bar {
    background: #fffde7;
    padding: 10px 20px;
    font-size: 12px;
    border-bottom: 1px solid #e0e0a0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Photo placeholder */
.student-photo {
    width: 100px;
    height: 120px;
    background: #e8e8e8;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #666;
    float: right;
    margin-left: 15px;
}

/* Two column layout */
.two-col {
    display: flex;
    gap: 15px;
}

.two-col > div {
    flex: 1;
}

/* Print link */
.print-link {
    float: right;
    font-size: 11px;
    color: var(--westminster-blue);
    text-decoration: none;
}

.print-link:hover {
    text-decoration: underline;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Links in tables */
.data-table a,
.module-table a {
    color: var(--westminster-blue);
}

/* Small text */
.small {
    font-size: 11px;
    color: #666;
}

.small a {
    color: var(--westminster-blue);
}

/* Timetable specific */
.timetable {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.timetable th {
    background: var(--westminster-blue);
    color: white;
    padding: 10px 5px;
    text-align: center;
    font-weight: normal;
    border: 1px solid var(--westminster-dark-blue);
    min-width: 100px;
}

.timetable th.time-col {
    min-width: 50px;
    width: 50px;
}

.timetable td {
    border: 1px solid #ddd;
    padding: 3px;
    vertical-align: top;
    height: 50px;
}

.timetable tr:nth-child(even) {
    background: #fafafa;
}

.timetable-event {
    background: linear-gradient(to bottom, #e8e8f0, #d8d8e8);
    border-left: 4px solid var(--westminster-blue);
    padding: 5px 8px;
    font-size: 10px;
    margin: 2px;
    border-radius: 2px;
    height: calc(100% - 4px);
}

.timetable-event.lecture {
    background: linear-gradient(to bottom, #dbeafe, #bfdbfe);
    border-left-color: #1d4ed8;
}

.timetable-event.seminar {
    background: linear-gradient(to bottom, #fef3c7, #fde68a);
    border-left-color: #d97706;
}

.timetable-event.lab {
    background: linear-gradient(to bottom, #d1fae5, #a7f3d0);
    border-left-color: #059669;
}

.timetable-event .event-title {
    font-weight: bold;
    color: #333;
    font-size: 11px;
}

.timetable-event .event-detail {
    color: #555;
    font-size: 9px;
    margin-top: 2px;
}

.timetable-legend {
    margin-top: 15px;
    font-size: 12px;
}

.timetable-legend span {
    display: inline-block;
    padding: 4px 12px;
    margin-right: 15px;
    border-radius: 2px;
}

.timetable-legend .legend-lecture {
    background: #dbeafe;
    border-left: 4px solid #1d4ed8;
}

.timetable-legend .legend-seminar {
    background: #fef3c7;
    border-left: 4px solid #d97706;
}

.timetable-legend .legend-lab {
    background: #d1fae5;
    border-left: 4px solid #059669;
}

/* Week selector */
.week-selector {
    margin-bottom: 15px;
    padding: 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.week-selector label {
    margin-right: 10px;
    font-weight: bold;
}

.week-selector select {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #ccc;
    flex: 1;
    min-width: 200px;
}

/* Module details */
.module-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 15px;
}

.module-detail-table th {
    background: #f5f5f5;
    text-align: left;
    padding: 8px;
    border: 1px solid #ddd;
    width: 25%;
}

.module-detail-table td {
    padding: 8px;
    border: 1px solid #ddd;
}

.assessment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.assessment-table th {
    background: #f0f0f0;
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
}

.assessment-table td {
    padding: 8px;
    border: 1px solid #ddd;
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid var(--westminster-blue);
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab-nav a {
    padding: 10px 18px;
    text-decoration: none;
    color: var(--westminster-blue);
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 2px;
    font-size: 12px;
}

.tab-nav a:hover {
    background: #e8e8e8;
}

.tab-nav a.active {
    background: white;
    border-bottom: 2px solid white;
    margin-bottom: -2px;
    font-weight: bold;
}

/* Progress bar */
.progress-bar {
    background: #e0e0e0;
    height: 18px;
    width: 200px;
    display: inline-block;
    vertical-align: middle;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(to right, var(--westminster-blue), #004488);
    height: 100%;
    transition: width 0.3s;
}

/* ======================= */
/* MOBILE RESPONSIVE STYLES */
/* ======================= */

@media screen and (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .sidebar-section {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }
}

@media screen and (max-width: 768px) {
    /* Header mobile */
    .header-top {
        display: none;
    }
    
    .header-main {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .header-logo {
        gap: 10px;
    }
    
    .westminster-logo-svg {
        width: 40px;
        height: 40px;
    }
    
    .header-text h1 {
        font-size: 16px;
    }
    
    .header-subtitle {
        font-size: 10px;
    }
    
    .header-nav {
        display: none;
    }
    
    /* Show mobile sign out */
    .mobile-signout {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Sub header mobile */
    .sub-header {
        padding: 0 10px;
    }
    
    .sub-header a {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    /* User bar mobile */
    .user-bar {
        padding: 8px 15px;
        font-size: 11px;
        flex-direction: column;
        gap: 5px;
    }
    
    /* Breadcrumb mobile */
    .breadcrumb {
        padding: 8px 15px;
        font-size: 10px;
    }
    
    /* Container mobile */
    .container {
        padding: 10px;
    }
    
    /* Sidebar mobile - collapse */
    .sidebar {
        flex-direction: column;
    }
    
    .sidebar-section {
        min-width: 100%;
    }
    
    .sidebar-section ul {
        display: none;
    }
    
    .sidebar-section.expanded ul {
        display: block;
    }
    
    .sidebar-section h3 {
        cursor: pointer;
        position: relative;
    }
    
    .sidebar-section h3::after {
        content: '+';
        position: absolute;
        right: 12px;
        font-size: 16px;
    }
    
    .sidebar-section.expanded h3::after {
        content: '−';
    }
    
    /* Main content mobile */
    .main-content {
        padding: 12px;
    }
    
    .page-title {
        font-size: 16px;
    }
    
    /* Profile card mobile */
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }
    
    .profile-photo {
        width: 120px;
        height: 145px;
    }
    
    .profile-info {
        width: 100%;
    }
    
    .profile-name {
        font-size: 20px;
    }
    
    .profile-details {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    /* Tables mobile */
    .data-table th,
    .data-table td {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .data-table th {
        width: 40%;
    }
    
    .module-table {
        font-size: 10px;
    }
    
    .module-table th,
    .module-table td {
        padding: 6px 4px;
    }
    
    /* Hide some columns on mobile */
    .module-table .hide-mobile,
    .data-table .hide-mobile {
        display: none;
    }
    
    /* Two column mobile */
    .two-col {
        flex-direction: column;
    }
    
    /* Buttons mobile */
    .btn {
        padding: 10px 12px;
        font-size: 11px;
        display: block;
        text-align: center;
        margin-bottom: 8px;
    }
    
    /* Timetable mobile */
    .timetable-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .timetable {
        min-width: 600px;
    }
    
    .timetable th {
        min-width: 80px;
        padding: 8px 3px;
        font-size: 10px;
    }
    
    .timetable-event {
        padding: 3px 5px;
        font-size: 9px;
    }
    
    .timetable-event .event-title {
        font-size: 9px;
    }
    
    .timetable-event .event-detail {
        font-size: 8px;
    }
    
    /* Week selector mobile */
    .week-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .week-selector select {
        width: 100%;
    }
    
    .week-selector .btn {
        flex: 1;
    }
    
    /* Timetable legend mobile */
    .timetable-legend {
        font-size: 10px;
    }
    
    .timetable-legend span {
        display: block;
        margin-bottom: 5px;
        margin-right: 0;
    }
    
    /* Alert mobile */
    .alert {
        padding: 10px;
        font-size: 11px;
    }
    
    /* Print link - hide on mobile */
    .print-link {
        display: none;
    }
    
    /* Footer mobile */
    .footer {
        padding: 15px;
        font-size: 10px;
    }
    
    /* Info box mobile */
    .info-box h4 {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .info-box-content {
        padding: 10px;
    }
    
    /* Module card mobile */
    .module-detail-table th,
    .module-detail-table td {
        display: block;
        width: 100%;
        padding: 6px 8px;
    }
    
    .module-detail-table th {
        background: #f0f0f0;
    }
    
    .module-detail-table tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid #ddd;
    }
    
    /* Assessment table mobile */
    .assessment-table {
        font-size: 10px;
    }
    
    .assessment-table th,
    .assessment-table td {
        padding: 6px 4px;
    }
    
    /* Progress bar mobile */
    .progress-bar {
        width: 100%;
        max-width: 200px;
    }
}

@media screen and (max-width: 480px) {
    .header-text h1 {
        font-size: 14px;
    }
    
    .sub-header a {
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .profile-name {
        font-size: 18px;
    }
    
    .profile-photo {
        width: 100px;
        height: 120px;
    }
    
    .module-table th:nth-child(4),
    .module-table td:nth-child(4),
    .module-table th:nth-child(5),
    .module-table td:nth-child(5) {
        display: none;
    }
}
