/* ---- FAMS centered dialog (replaces browser alert/confirm) ---- */

body.fams-dialog-open {
    overflow: hidden;
}

.fams-dialog {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.fams-dialog[hidden] {
    display: none !important;
}

.fams-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.fams-dialog-panel {
    position: relative;
    width: min(100%, 26rem);
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.fams-dialog-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.fams-dialog-body {
    padding: 1rem;
    color: #212529;
    line-height: 1.5;
}

.fams-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem 1rem;
}

.fams-dialog-title {
    font-weight: 600;
    color: #212529;
}

.fams-dialog-message {
    white-space: pre-wrap;
}

/* ---- App shell (desktop sidebar layout) ---- */

.app-layout {
    min-height: 100vh;
    background-color: #f4f6f9;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: linear-gradient(180deg, #0b5ed7 0%, #084298 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
}

.sidebar-brand-link:hover {
    color: #fff;
    opacity: 0.9;
}

.sidebar-brand-link.active {
    opacity: 1;
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.85);
}

.sidebar-brand-link i {
    font-size: 1.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
}

.sidebar-group {
    border-radius: 0.5rem;
}

.sidebar-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle.is-open {
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

.sidebar-group-chevron {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.sidebar-group-toggle.is-open .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-group-items {
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.15rem 0 0.35rem;
}

.sidebar-group-items.show {
    display: flex;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem 0.65rem 1rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.925rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
}

.sidebar-link-label {
    flex: 1;
    min-width: 0;
}

.sidebar-link-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-link-future {
    opacity: 0.92;
}

.sidebar-section {
    padding: 1.25rem 1rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-footer {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.sidebar-user-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    opacity: 0.75;
    text-transform: capitalize;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.15s ease;
}

.sidebar-logout:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.app-main {
    margin-left: 240px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 900;
}

.app-topbar-title {
    font-weight: 600;
    color: #084298;
}

.sidebar-mobile-toggle {
    color: #084298;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    text-decoration: none;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 999;
}

.app-content {
    flex: 1;
    padding: 2rem 2.5rem;
    max-width: 1400px;
}

.app-footer {
    padding: 1rem 2.5rem;
    border-top: 1px solid #dee2e6;
    background-color: #fff;
    color: #6c757d;
    font-size: 0.875rem;
}

/* ---- Auth pages (login) ---- */

.auth-page {
    background: linear-gradient(135deg, #e8f0fe 0%, #f8f9fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    width: 100%;
    border: none;
    border-radius: 0.75rem;
}

.auth-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    font-size: 1.75rem;
}

/* ---- Dashboard & tables ---- */

.stat-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.25rem;
}

/* ---- Dashboard widgets ---- */

.dashboard-empty-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    font-size: 1.75rem;
}

.dashboard-empty-text {
    max-width: 28rem;
}

.dashboard-widget-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    font-size: 1.25rem;
}

.dashboard-widget-title {
    line-height: 1.3;
}

.dashboard-widget-type-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background-color: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
}

.dashboard-widget--task {
    border-left: 4px solid var(--bs-primary) !important;
}

.dashboard-widget--task .dashboard-widget-icon {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.dashboard-widget--notification {
    border-left: 4px solid var(--bs-info) !important;
}

.dashboard-widget--notification .dashboard-widget-icon {
    background-color: var(--bs-info-bg-subtle);
    color: var(--bs-info-text-emphasis, var(--bs-info));
}

.dashboard-widget--notification.warning {
    border-left-color: var(--bs-warning) !important;
}

.dashboard-widget--notification.warning .dashboard-widget-icon {
    background-color: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis, var(--bs-warning));
}

.dashboard-widget--notification.danger {
    border-left-color: var(--bs-danger) !important;
}

.dashboard-widget--notification.danger .dashboard-widget-icon {
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis, var(--bs-danger));
}

.dashboard-widget--notification.info {
    border-left-color: var(--bs-info) !important;
}

.dashboard-widget-action-btn {
    background-color: rgba(var(--bs-info-rgb), 0.12);
    color: var(--bs-info-text-emphasis, var(--bs-info));
    border: 0;
}

.dashboard-widget--notification.warning .dashboard-widget-action-btn {
    background-color: rgba(var(--bs-warning-rgb), 0.15);
    color: var(--bs-warning-text-emphasis, var(--bs-warning));
}

.dashboard-widget--notification.danger .dashboard-widget-action-btn {
    background-color: rgba(var(--bs-danger-rgb), 0.12);
    color: var(--bs-danger-text-emphasis, var(--bs-danger));
}

.dashboard-widget--reminder {
    border-left: 4px solid var(--bs-secondary) !important;
}

.dashboard-widget--reminder .dashboard-widget-icon {
    background-color: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
}

.dashboard-widget-reminder-date {
    font-size: 0.875rem;
    color: var(--bs-body-color);
}

.dashboard-widget--shortcut {
    border-left: 4px solid var(--bs-success) !important;
}

.dashboard-widget--shortcut .dashboard-widget-icon {
    background-color: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis, var(--bs-success));
}

.dashboard-widget-shortcut-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--bs-success-text-emphasis, var(--bs-success));
}

.dashboard-widget-shortcut-link:hover {
    text-decoration: underline;
}

.role-badge {
    font-weight: 500;
}

.role-admin {
    background-color: #cfe2ff;
    color: #084298;
}

.role-lecturer {
    background-color: #d1e7dd;
    color: #0f5132;
}

.role-student {
    background-color: #fff3cd;
    color: #664d03;
}

.role-dean {
    background-color: #e2d9f3;
    color: #432874;
}

.role-student_coordinator {
    background-color: #cff4fc;
    color: #055160;
}

/* ---- Timetable weekly grid ---- */

.timetable-grid .timetable-period-col {
    width: 5rem;
    min-width: 5rem;
    background-color: #f8f9fa;
}

.timetable-session-row td {
    background-color: #eef2f7;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.timetable-cell {
    min-width: 9rem;
    min-height: 4.5rem;
    vertical-align: top;
    padding: 0.65rem;
}

.timetable-cell-empty {
    background-color: #fafbfc;
    border: 1px solid #dee2e6 !important;
}

.timetable-cell-empty .timetable-slot-placeholder {
    display: block;
    min-height: 2.5rem;
    color: #adb5bd;
    text-align: center;
    line-height: 2.5rem;
}

.timetable-grid-wrapper {
    overflow-x: auto;
}

.timetable-grid {
    border-collapse: separate;
    border-spacing: 0;
}

.timetable-grid td,
.timetable-grid th {
    border: 1px solid #dee2e6 !important;
}

.timetable-cell-filled {
    background-color: #f8fbff;
}

.timetable-entry .timetable-module {
    margin-bottom: 0.25rem;
}

.timetable-entry .timetable-meta {
    line-height: 1.35;
}

.timetable-slot {
    transition: background-color 0.15s ease;
}

.timetable-slot-empty {
    cursor: default;
}

.timetable-cell-filled .timetable-entry {
    position: relative;
    cursor: grab;
}

.timetable-entry:has(.timetable-entry-remove) .timetable-module {
    padding-right: 1.5rem;
}

.timetable-entry:has(.timetable-conflict-trigger) .timetable-module {
    padding-left: 1.25rem;
}

.timetable-cell-conflict {
    background-color: #fff8e6 !important;
    box-shadow: inset 0 0 0 2px rgba(255, 193, 7, 0.65);
}

.timetable-cell-locked {
    background-color: #fff3cd !important;
    box-shadow: inset 0 0 0 1px rgba(255, 193, 7, 0.45);
}

.timetable-cell-locked.timetable-cell-conflict {
    background-color: #ffe8a3 !important;
}

.timetable-entry-lock {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    line-height: 1;
    z-index: 2;
    color: #856404;
    font-size: 0.85rem;
}

.timetable-entry:has(.timetable-entry-lock) .timetable-module {
    padding-right: 1.25rem;
}

.timetable-conflict-trigger {
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    line-height: 1;
    z-index: 2;
}

.timetable-entry-remove {
    position: absolute;
    top: 0.15rem;
    right: 0.15rem;
    left: auto;
    line-height: 1;
    z-index: 3;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dc3545;
    border-radius: 0.25rem;
    background: #fff;
    color: #dc3545;
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.4;
    transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.timetable-entry-remove:hover,
.timetable-entry-remove:focus {
    opacity: 1;
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.timetable-entry-remove span {
    display: block;
    margin-top: -0.05rem;
}

.timetable-conflict-trigger .bi {
    font-size: 1rem;
}

.timetable-slot-editable {
    cursor: pointer;
}

.timetable-slot-editable.timetable-cell-empty {
    background-color: #fff;
    border: 1px dashed #adb5bd !important;
}

.timetable-entry[data-draggable-entry="pending"] {
    cursor: grab;
}

.timetable-conflict-summary .badge {
    vertical-align: middle;
}

.timetable-checkbox-group {
    max-height: 14rem;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.timetable-slot.timetable-slot-drop-target {
    outline: 2px dashed #0d6efd;
    outline-offset: -2px;
    background-color: #eef5ff;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        width: min(280px, 88vw);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .app-content {
        padding: 1.25rem 1rem;
    }

    .app-footer {
        padding: 1rem;
    }
}

/* ---- Report screen layout (sizes and spacing; print rules in print.css) ---- */

.signing-sheet-report {
    color: #212529;
}

.signing-sheet-table {
    font-size: 0.82rem;
}

.signing-sheet-table th,
.signing-sheet-table td {
    vertical-align: middle;
}

.signing-sheet-signature-cell,
.signing-sheet-remarks-cell {
    min-height: 2rem;
}

.signing-sheet-approval-line {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.signing-sheet-approval-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.signing-sheet-approval-rule {
    display: block;
    border-bottom: 1px solid #212529;
    min-height: 2rem;
}

.signing-sheet-page-break {
    margin-bottom: 2rem;
}

.a4-portrait-report {
    max-width: 210mm;
    margin: 0 auto;
}

.attendance-day-btn {
    background-color: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
    font-weight: 500;
}

.attendance-day-btn:hover:not(:disabled) {
    background-color: #ffe69c;
    border-color: #ffda6a;
    color: #523e02;
}

.attendance-day-btn-active,
.attendance-day-btn-active:hover:not(:disabled) {
    background-color: #ffc107;
    border-color: #ffb300;
    color: #212529;
}

.attendance-day-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.attendance-register-report {
    color: #212529;
}

.attendance-register-table {
    font-size: 0.78rem;
}

.attendance-register-table th,
.attendance-register-table td {
    vertical-align: middle;
}

.attendance-register-signature-cell,
.attendance-register-remarks-cell {
    min-height: 1.75rem;
}

.attendance-register-day-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
}

.attendance-register-page-break {
    margin-bottom: 2rem;
}

.attendance-register-approvals {
    page-break-inside: avoid;
}

.a4-landscape-report {
    max-width: 297mm;
    margin: 0 auto;
}

.timetable-weekly-print-fit {
    overflow: hidden;
}

.timetable-print-fit-inner {
    width: 100%;
}

.timetable-approval-table-weekly {
    width: 100%;
    border: 2px solid #212529;
    table-layout: fixed;
}

.timetable-approval-table-weekly td {
    border: 1px solid #212529;
    padding: 0.45rem 0.6rem;
    vertical-align: middle;
}

.timetable-approval-inline {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.8rem;
}

.timetable-approval-inline-label {
    font-weight: 600;
    white-space: nowrap;
}

.timetable-approval-inline-rule {
    flex: 1 1 auto;
    border-bottom: 1px solid #212529;
    min-height: 1rem;
    min-width: 2.5rem;
}

.timetable-approval-inline-rule--date {
    flex: 0 1 28%;
    max-width: 5.5rem;
}

.timetable-weekly-print-header {
    margin-bottom: 0.5rem;
}

.timetable-weekly-print-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.35rem;
    color: #212529;
}

.timetable-weekly-print-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #212529;
}

.timetable-weekly-print-meta-left {
    text-align: left;
}

.timetable-weekly-print-meta-center {
    text-align: center;
}

.timetable-weekly-print-meta-right {
    text-align: right;
}

.student-attendance-register-table {
    font-size: 0.68rem;
}

.student-attendance-register-table th,
.student-attendance-register-table td {
    vertical-align: middle;
    padding: 0.2rem 0.25rem;
}

.student-attendance-register-table .col-no {
    width: 2.5%;
}

.student-attendance-register-table .col-code {
    width: 8%;
}

.student-attendance-register-table .col-name {
    width: 14%;
}

.student-attendance-register-table .col-session {
    width: 4.5%;
    text-align: center;
}

.student-attendance-register-table .session-cell {
    font-weight: 600;
}

.student-attendance-register-legend {
    border-top: 1px solid var(--bs-border-color);
    padding-top: 0.5rem;
}

.student-attendance-register-page-break {
    margin-bottom: 2rem;
}

.student-attendance-register-approvals {
    page-break-inside: avoid;
}

.attendance-book-report {
    color: #212529;
}

/* ---- Cover page ---- */

.attendance-book-page {
    position: relative;
    display: block;
    padding: 3mm 6mm 4mm 14mm;
    box-sizing: border-box;
}

.attendance-book-cover {
    min-height: auto;
    padding-top: 20mm;
}

.attendance-book-week-page {
    min-height: auto;
}

.attendance-book-cover-body {
    max-width: 100%;
}

.attendance-book-cover-institution {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: 0.35rem;
}

.attendance-book-cover-faculty {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.25rem;
}

.attendance-book-cover-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
    margin-bottom: 0.5rem;
}

.attendance-book-cover-intake-year {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: 1.75rem;
    line-height: 1.2;
}

.attendance-book-cover-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 2rem;
    max-width: 36rem;
    margin: 0 auto 1.5rem;
    font-size: 0.82rem;
}

.attendance-book-cover-row {
    display: flex;
    gap: 0.5rem;
}

.attendance-book-cover-row dt {
    flex: 0 0 9.5rem;
    font-weight: 700;
    margin: 0;
}

.attendance-book-cover-row dd {
    flex: 1 1 auto;
    margin: 0;
}

.attendance-book-cover-legend {
    text-align: center;
    font-size: 0.78rem;
    margin-bottom: 2rem;
    padding-top: 0.75rem;
    border-top: 1px solid #000;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.attendance-book-cover-signatures {
    max-width: 100%;
    margin-top: 1.5rem;
}

/* ---- Weekly inside pages ---- */

.attendance-book-week-header {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    line-height: 1.25;
    font-weight: 700;
}

.attendance-book-week-header-left {
    text-align: left;
}

.attendance-book-week-header-center {
    text-align: center;
}

.attendance-book-week-header-right {
    text-align: right;
}

.attendance-book-table-wrap {
    flex: 0 0 auto;
}

.attendance-book-table {
    font-size: 0.68rem;
}

.attendance-book-table th,
.attendance-book-table td {
    vertical-align: middle;
    padding: 0.18rem 0.2rem;
}

.attendance-book-table tbody tr {
    height: calc(6mm + 2px);
}

.attendance-book-table .col-no {
    width: 2.2%;
}

.attendance-book-table .col-code {
    width: 7%;
}

.attendance-book-table .col-name {
    width: 11%;
}

.attendance-book-table .col-session {
    width: 4.2%;
    text-align: center;
    font-size: 0.62rem;
    line-height: 1.15;
    white-space: nowrap;
}

.attendance-book-table .handwriting-cell {
    height: 100%;
    min-height: 0;
    min-width: 1.9rem;
    padding: 0.35rem 0.15rem;
    box-sizing: border-box;
}

.attendance-book-table .info-separator,
.attendance-book-table .day-separator {
    border-right: 3px solid #000 !important;
}

.attendance-book-week-page .attendance-book-page-footer {
    margin-top: 0.35rem;
}

.attendance-book-cover .attendance-book-page-footer {
    margin-top: 12mm;
}

.attendance-book-page-footer {
    flex: 0 0 auto;
    padding-top: 0.25rem;
    text-align: right;
    font-size: 0.62rem;
    font-weight: 600;
}

.attendance-book-page-break {
    margin-bottom: 0;
}

/* Portrait morning/evening registers — wider date columns, taller pages. */
.attendance-book-portrait .attendance-book-page {
    padding: 3mm 8mm 4mm 10mm;
}

.attendance-book-portrait .attendance-book-cover {
    padding-top: 30mm;
}

.attendance-book-portrait .attendance-book-table {
    font-size: 0.72rem;
}

.attendance-book-portrait .attendance-book-table .col-no {
    width: 5%;
}

.attendance-book-portrait .attendance-book-table .col-code {
    width: 14%;
}

.attendance-book-portrait .attendance-book-table .col-name {
    width: 26%;
}

.attendance-book-portrait .attendance-book-table .col-session {
    width: 11%;
    font-size: 0.7rem;
}

.attendance-book-portrait .attendance-book-table .handwriting-cell {
    min-width: 2.5rem;
    padding: 0.35rem 0.25rem;
}

/* ---- Searchable select ---- */

.searchable-select {
    position: relative;
}

.searchable-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.searchable-select-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 16rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.searchable-select-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: transparent;
    text-align: left;
    color: inherit;
}

.searchable-select-item:hover,
.searchable-select-item.active {
    background-color: var(--bs-primary-bg-subtle);
}

.searchable-select-empty {
    padding: 0.5rem 0.75rem;
    color: var(--bs-secondary-color);
}

.searchable-select.is-invalid .searchable-select-input {
    border-color: var(--bs-form-invalid-border-color);
}

.searchable-select.is-invalid .searchable-select-input:focus {
    border-color: var(--bs-form-invalid-border-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25);
}

/* Timetable V2 designer */
.timetable-designer-palette {
    max-height: 28rem;
    overflow-y: auto;
}

.timetable-designer-chip {
    border: 1px solid #212529;
    border-radius: 0.25rem;
    padding: 0.5rem 0.55rem;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    cursor: grab;
    background: #fff;
    display: block;
}

.timetable-designer-chip:active {
    cursor: grabbing;
}

.timetable-designer-chip-code {
    font-weight: 700;
    line-height: 1.2;
    color: #212529;
}

.timetable-designer-chip-detail {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    line-height: 1.25;
    color: #495057;
}

.timetable-designer-chip-module .timetable-designer-chip-detail {
    color: #212529;
    font-weight: 500;
}

.timetable-master-entry-code {
    display: block;
    line-height: 1.2;
}

.timetable-master-entry-title {
    font-size: 0.8rem;
    line-height: 1.25;
    margin-top: 0.15rem;
}

.timetable-master-entry-lecturers {
    margin-top: 0.25rem;
    padding-left: 1rem;
    font-size: 0.75rem;
    color: #495057;
    line-height: 1.3;
}

.timetable-grid-master .timetable-cell-filled {
    background-color: #f8fbff;
}

.timetable-entry:has(.timetable-entry-remove) .timetable-master-entry {
    padding-right: 1.5rem;
}

.timetable-entry:has(.timetable-conflict-trigger) .timetable-master-entry {
    padding-left: 1.25rem;
}

/* Timetable V2 evidence cells (screen preview + print) */
.timetable-evidence-cell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 6.5rem;
    font-size: 0.75rem;
    line-height: 1.25;
}

.timetable-evidence-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.35rem;
    font-weight: 600;
}

.timetable-evidence-code {
    flex: 0 1 auto;
}

.timetable-evidence-lecturer {
    flex: 1 1 auto;
    text-align: right;
    font-weight: 500;
}

.timetable-evidence-spacer {
    flex: 1 1 auto;
    min-height: 0.75rem;
}

.timetable-evidence-line {
    display: block;
    border-bottom: 1px solid #212529;
    min-height: 1.1rem;
    width: 100%;
}

.timetable-evidence-office-use {
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-style: italic;
    color: rgba(0, 0, 0, 0.6);
    text-align: right;
}

.timetable-entry-compact {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
}

.timetable-entry-compact-lecturer {
    text-align: right;
}

/* ---- Faculty Operations Centre ---- */

.ops-centre {
    --ops-accent: #0b5ed7;
    --ops-live: #0d9488;
    --ops-rooms: #d97706;
    --ops-curriculum: #4f46e5;
    --ops-actions: #0b5ed7;
}

/* Header gradient */
.ops-header {
    background: linear-gradient(135deg, #0b5ed7 0%, #084298 100%);
    color: #fff;
}

.ops-header-greeting {
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
}

.ops-header-role {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.ops-header-meta {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
}

.ops-header-separator {
    color: rgba(255, 255, 255, 0.5);
}

.ops-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.ops-icon-btn:hover:not(.disabled):not(:disabled) {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

/* Panel headers */
.ops-panel-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ops-panel-live .ops-panel-header {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.12) 0%, rgba(13, 148, 136, 0.04) 100%);
    border-left: 4px solid var(--ops-live);
    color: #0f766e;
}

.ops-panel-rooms .ops-panel-header {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.12) 0%, rgba(217, 119, 6, 0.04) 100%);
    border-left: 4px solid var(--ops-rooms);
    color: #b45309;
}

.ops-panel-curriculum .ops-panel-header {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.12) 0%, rgba(79, 70, 229, 0.04) 100%);
    border-left: 4px solid var(--ops-curriculum);
    color: #4338ca;
}

.ops-panel-actions .ops-panel-header {
    background: linear-gradient(90deg, rgba(11, 94, 215, 0.14) 0%, rgba(11, 94, 215, 0.04) 100%);
    border-left: 4px solid var(--ops-actions);
    color: #084298;
}

.ops-demo-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-weight: 600;
}

.ops-demo-badge-live {
    color: #92400e;
    background: #fef3c7;
}

.ops-demo-badge-curriculum {
    color: #4338ca;
    background: #e0e7ff;
}

/* Live class cards */
.ops-class-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem 0.85rem 1.1rem;
    height: 100%;
    border-left-width: 4px;
    border-left-style: solid;
}

.ops-class-card-accent-1 {
    border-left-color: #0b5ed7;
    background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
}

.ops-class-card-accent-2 {
    border-left-color: #0d9488;
    background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
}

.ops-class-card-accent-3 {
    border-left-color: #7c3aed;
    background: linear-gradient(135deg, #f5f3ff 0%, #fff 100%);
}

.ops-class-card-accent-4 {
    border-left-color: #d97706;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
}

.ops-class-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ops-class-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.35rem 1rem rgba(11, 94, 215, 0.15);
    color: inherit;
}

.ops-class-card-location {
    color: #64748b;
}

.ops-class-card-module {
    font-size: 1.05rem;
    margin-top: 0.15rem;
    color: #1e293b;
}

.ops-class-card-lecturer {
    font-size: 0.9rem;
    margin-top: 0.15rem;
    color: #334155;
}

.ops-class-card-time {
    color: #64748b;
    margin-top: 0.25rem;
}

/* Room utilisation */
.ops-room-list {
    display: grid;
    gap: 0.35rem;
}

.ops-room-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.ops-room-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.ops-room-dot-occupied {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

.ops-room-dot-available {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.ops-room-status-occupied {
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 500;
}

.ops-room-status-available {
    color: #16a34a;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Curriculum progress */
.ops-curriculum-list {
    display: grid;
    gap: 0.85rem;
}

.ops-curriculum-item {
    display: block;
}

.ops-curriculum-item-link {
    text-decoration: none;
    color: inherit;
    border-radius: 0.375rem;
    padding: 0.35rem;
    margin: -0.35rem;
    transition: background-color 0.15s ease;
}

.ops-curriculum-item-link:hover {
    background: #f5f3ff;
    color: inherit;
}

.ops-curriculum-percent {
    color: var(--ops-curriculum);
}

.ops-progress-bar {
    height: 0.5rem;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
}

.ops-progress-bar .progress-bar {
    background: linear-gradient(90deg, #0b5ed7 0%, #0d9488 100%);
    border-radius: 999px;
}

/* Sidebar actions */
.ops-action-sidebar {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

.ops-action-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #212529;
    background: #fff;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.ops-action-item:hover {
    border-color: var(--ops-accent);
    background: #f8fbff;
    color: #212529;
    transform: translateX(2px);
}

.ops-action-icon-wrap {
    width: 2rem;
    height: 2rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ops-action-item:nth-child(5n + 1) .ops-action-icon-wrap {
    background: rgba(11, 94, 215, 0.12);
    color: #0b5ed7;
}

.ops-action-item:nth-child(5n + 2) .ops-action-icon-wrap {
    background: rgba(13, 148, 136, 0.12);
    color: #0d9488;
}

.ops-action-item:nth-child(5n + 3) .ops-action-icon-wrap {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.ops-action-item:nth-child(5n + 4) .ops-action-icon-wrap {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.ops-action-item:nth-child(5n + 5) .ops-action-icon-wrap {
    background: rgba(236, 72, 153, 0.12);
    color: #db2777;
}

.ops-action-icon {
    font-size: 1rem;
    line-height: 1;
}

.ops-action-label {
    flex: 1 1 auto;
    font-size: 0.875rem;
    line-height: 1.3;
}

.ops-action-count {
    flex-shrink: 0;
    background: #f97316 !important;
    color: #fff !important;
    font-size: 0.7rem;
}

@media (max-width: 991.98px) {
    .ops-header-greeting {
        font-size: 1.15rem;
    }

    .ops-action-sidebar {
        max-height: none;
        overflow-y: visible;
    }
}

/* ---- Curriculum Progress Report ---- */

.curriculum-progress-tabs .nav-link {
    white-space: nowrap;
    color: #495057;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.curriculum-progress-tabs .nav-link:hover {
    color: #0b5ed7;
    border-bottom-color: rgba(11, 94, 215, 0.25);
}

.curriculum-progress-tabs .nav-link.active {
    color: #0b5ed7;
    background: transparent;
    border-bottom-color: #0b5ed7;
}

.curriculum-progress-list {
    display: grid;
    gap: 1.5rem;
}

.curriculum-module-group {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.08), 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.curriculum-module-group:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.12), 0 0.25rem 0.5rem rgba(15, 23, 42, 0.06);
}

.curriculum-module-group-header {
    background: linear-gradient(90deg, rgba(11, 94, 215, 0.12) 0%, rgba(11, 94, 215, 0.04) 100%);
    border-bottom: 1px solid rgba(11, 94, 215, 0.15);
}

.curriculum-module-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.curriculum-module-code,
.curriculum-module-name {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.curriculum-module-separator {
    margin: 0 0.35rem;
    color: #475569;
}

.curriculum-progress-row {
    display: grid;
    grid-template-columns: minmax(5rem, auto) minmax(8rem, 1.2fr) minmax(9rem, 1fr) minmax(10rem, 1.4fr) minmax(4.5rem, auto) minmax(6rem, auto) minmax(5rem, auto);
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #eef2f7;
    min-height: 2.75rem;
}

.curriculum-progress-row:last-child {
    border-bottom: none;
}

.curriculum-progress-row-theory {
    border-left: 4px solid #0b5ed7;
    background: linear-gradient(90deg, rgba(11, 94, 215, 0.04) 0%, transparent 100%);
}

.curriculum-progress-row-practical {
    border-left: 4px solid #0d9488;
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.04) 0%, transparent 100%);
}

.curriculum-progress-row-theory .curriculum-type-badge {
    background: rgba(11, 94, 215, 0.12);
    color: #084298;
}

.curriculum-progress-row-practical .curriculum-type-badge {
    background: rgba(13, 148, 136, 0.12);
    color: #0f766e;
}

.curriculum-progress-row-theory .curriculum-row-percent {
    color: #0b5ed7;
}

.curriculum-progress-row-practical .curriculum-row-percent {
    color: #0d9488;
}

.curriculum-progress-row-theory .curriculum-progress-bar .progress-bar {
    background: linear-gradient(90deg, #0b5ed7 0%, #3b82f6 100%);
}

.curriculum-progress-row-practical .curriculum-progress-bar .progress-bar {
    background: linear-gradient(90deg, #0d9488 0%, #34d399 100%);
}

.curriculum-row-lecturer {
    font-size: 0.875rem;
    color: #334155;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.curriculum-row-progress {
    min-width: 0;
}

.curriculum-row-hours {
    color: #334155;
    white-space: nowrap;
}

.curriculum-row-overrun,
.curriculum-row-date {
    white-space: nowrap;
}

.curriculum-progress-bar {
    height: 0.5rem;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
}

.curriculum-progress-bar .progress-bar {
    border-radius: 999px;
}

.curriculum-overrun {
    color: #d97706;
    font-weight: 600;
    margin-bottom: 0;
}

.curriculum-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.curriculum-status-completed {
    background: #dcfce7;
    color: #166534;
}

.curriculum-status-on_schedule {
    background: #dbeafe;
    color: #1d4ed8;
}

.curriculum-assign-btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    line-height: 1.4;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .curriculum-progress-row {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "type lecturer status"
            "progress progress progress"
            "hours hours hours"
            "overrun date date";
        gap: 0.5rem 0.75rem;
        padding: 0.75rem 1rem;
    }

    .curriculum-row-type {
        grid-area: type;
    }

    .curriculum-row-lecturer {
        grid-area: lecturer;
        white-space: normal;
    }

    .curriculum-row-status {
        grid-area: status;
        justify-self: end;
    }

    .curriculum-row-progress {
        grid-area: progress;
    }

    .curriculum-row-hours {
        grid-area: hours;
        white-space: normal;
    }

    .curriculum-row-overrun {
        grid-area: overrun;
    }

    .curriculum-row-date {
        grid-area: date;
    }
}

