
#tablePrintArea {
    display: none;
}

.admin-table-toolbar {
    background: #fff;
}.page-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.page-loader[hidden] {
    display: none;
}

.page-loader.is-visible {
    opacity: 1;
    visibility: visible;
}

.page-loader-card {
    min-width: 190px;
    padding: 1.4rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1rem 3rem rgba(15, 23, 42, 0.24);
    text-align: center;
}

.page-loader-spinner {
    width: 2.75rem;
    height: 2.75rem;
    margin: 0 auto 0.8rem;
    border: 4px solid #dbeafe;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: page-loader-spin 0.75s linear infinite;
}

.page-loader-title {
    color: #0f172a;
    font-weight: 700;
}

.page-loader-text {
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.85rem;
}

@keyframes page-loader-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .page-loader-spinner { animation-duration: 1.5s; }
}

.global-back-button {
    position: fixed;
    right: 1.25rem;
    top: 1rem;
    z-index: 1090;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #212529;
    box-shadow: 0 0.6rem 1.5rem rgba(15, 23, 42, 0.25);
    font-weight: 600;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.global-back-button:hover {
    background: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 0.8rem 1.8rem rgba(13, 110, 253, 0.28);
}

.global-back-button:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.35);
    outline-offset: 3px;
}

.global-back-button i {
    font-size: 1.05rem;
}

body {
    min-height: 100vh;
}

.dashboard-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    min-height: 100vh;
    flex: 0 0 280px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    z-index: 1040;
}

.sidebar-close,
.mobile-topbar,
.sidebar-backdrop {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex: 0 0 auto;
}

.sidebar-brand-title {
    font-weight: 700;
    line-height: 1.1;
}

.sidebar-brand-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78rem;
    line-height: 1.2;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.sidebar .nav-link i {
    width: 1.1rem;
    text-align: center;
    font-size: 1rem;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}


.sidebar .project-menu-toggle {
    background: transparent;
}

.sidebar .project-menu-chevron {
    transition: transform 0.2s ease;
}

.sidebar .project-menu-toggle[aria-expanded="true"] .project-menu-chevron {
    transform: rotate(180deg);
}

.sidebar .project-submenu {
    margin-left: 0.65rem;
    padding-left: 0.55rem;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar .project-submenu .nav-link {
    padding: 0.6rem 0.75rem;
    font-size: 0.92rem;
}
.dashboard-main {
    flex: 1;
    min-width: 0;
}

.dashboard-content {
    padding: 1.5rem;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.login-logo {
    width: 86px;
    height: 86px;
    object-fit: contain;
}

.login-title {
    color: #16213d;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.login-caption {
    color: #53606f;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.45;
}

.department-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 86px;
    padding: 1rem;
    color: #16213d;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.05);
}

.department-card:hover,
.department-card.active {
    color: #0d6efd;
    border-color: #0d6efd;
}

.department-card span {
    font-weight: 700;
}

.stat-box {
    background: #fff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.06);
}

.profile-shell {
    max-width: 1100px;
    margin: 0 auto;
}

.profile-passport {
    width: 95px;
    height: 115px;
    border-radius: 8px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.12);
}

.profile-passport-placeholder {
    display: grid;
    place-items: center;
    background: #e8eef8;
    color: #1f2a44;
    font-size: 2rem;
    font-weight: 700;
}

.profile-detail {
    min-height: 86px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    background: #fff;
}

.profile-detail-label {
    color: #6c757d;
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
}

.profile-detail-value {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.allocation-scroll-card {
    overflow-x: auto;
}

.allocation-wide-select {
    min-width: 760px;
}

.print-header,
.print-signature {
    display: none;
}

.signature-line {
    width: 260px;
    border-top: 1px solid #111;
    margin-bottom: 0.5rem;
}

@media (max-width: 991.98px) {
    .dashboard-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(82vw, 300px);
        min-height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        overflow-y: auto;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1030;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 1020;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        min-height: 56px;
        padding: 0.75rem 1rem;
    }

    .mobile-topbar-title {
        min-width: 0;
        flex: 1;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .card-header {
        padding: 0.8rem 1rem;
    }

    .table {
        min-width: 720px;
    }

    .modal-dialog {
        margin: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .dashboard-content {
        padding: 0.75rem;
    }

    .global-back-button {
        right: 0.8rem;
        top: 0.65rem;
        padding: 0.65rem 0.85rem;
    }

    h2,
    .h4 {
        font-size: 1.2rem;
    }

    .profile-passport {
        width: 82px;
        height: 100px;
    }
}

@media print {
    body.table-export-mode > *:not(#tablePrintArea) {
        display: none !important;
    }

    body.table-export-mode #tablePrintArea {
        display: block !important;
        padding: 12mm;
        color: #111;
        background: #fff;
    }

    body.table-export-mode #tablePrintArea .table-print-heading {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid #111;
    }

    body.table-export-mode #tablePrintArea table {
        width: 100% !important;
        border-collapse: collapse;
    }

    body.table-export-mode #tablePrintArea th,
    body.table-export-mode #tablePrintArea td {
        border: 1px solid #bbb;
        padding: 0.35rem;
        vertical-align: top;
    }

    .sidebar,
    .mobile-topbar,
    .no-print,
    .sidebar-backdrop {
        display: none !important;
    }

    body,
    .dashboard-main,
    .dashboard-content {
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .dashboard-shell {
        display: block;
        min-height: auto;
    }

    .print-header,
    .print-signature {
        display: block;
    }

    .card {
        border: 0 !important;
        box-shadow: none !important;
    }

    .table {
        min-width: 0;
        font-size: 0.82rem;
    }
}
