:root {
    --navy: #081c46;
    --blue: #1b66d1;
    --cyan: #17b9d6;
    --gold: #f4bb2a;
    --ink: #17304f;
    --muted: #6d819c;
    --line: #d9e3f0;
    --shadow: 0 20px 45px rgba(8, 28, 70, 0.12);
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: linear-gradient(180deg, #eef4fb 0%, #f8fbff 100%);
}

.form-control,
.form-select,
.input-group-text,
.btn,
.form-check-label,
.form-label {
    font-size: 14px;
}

.public-shell .site-footer,
.admin-footer {
    border-top: 1px solid var(--line);
    padding: 18px 0;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
}

.hero-shell,
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.hero-sidebar,
.sidebar-panel {
    width: 220px;
    background: linear-gradient(180deg, #0d2357 0%, #0a1f44 60%, #061430 100%);
    color: #fff;
    padding: 18px 0 0;
    box-shadow: 3px 0 20px rgba(0, 0, 0, 0.4);
}

.hero-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
}

.hero-main,
.content-panel {
    flex: 1;
    padding: 24px 28px 36px;
}

.hero-main.standalone {
    max-width: 1280px;
    margin: 0 auto;
}

.public-topbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 0 28px;
    height: 58px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.public-topbar-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.3px;
}

.public-topbar-title span {
    color: var(--blue);
}

.public-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-public {
    background: #e3f2fd;
    color: var(--blue);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.public-topbar-meta {
    font-size: 11px;
    color: var(--muted);
}

.page-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    border-radius: 12px;
    padding: 22px 28px;
    margin-bottom: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h1,
.topbar-title,
.panel-title,
.section-title,
.brand-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
}

.page-header h1 {
    font-size: 22px;
    letter-spacing: 0.5px;
    margin: 0;
}

.page-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin: 3px 0 0;
}

.header-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 20px;
}

.breadcrumb-bar .sep {
    color: #bfc8d7;
}

.breadcrumb-bar .current {
    color: var(--ink);
    font-weight: 600;
}

.breadcrumb-bar a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb-bar a:hover {
    color: var(--blue);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gold), #ffd86d);
    color: var(--navy);
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 24px rgba(244, 187, 42, 0.25);
}

.brand-mark.large {
    width: 64px;
    height: 64px;
    font-size: 1.4rem;
}

.brand-subtitle,
.topbar-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    color: #9bb7e8;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.35);
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 18px 4px;
    font-weight: 600;
}

.sidebar-logo {
    padding: 0 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-logo-mark {
    width: 52px;
    height: 52px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.sidebar-logo .ministry {
    font-family: 'Rajdhani', sans-serif;
    color: rgba(255, 255, 255, 0.75);
    font-size: 9.5px;
    letter-spacing: 0.5px;
    line-height: 1.4;
    text-transform: uppercase;
}

.sidebar-logo .program {
    font-family: 'Rajdhani', sans-serif;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-transform: uppercase;
}

.nav-item,
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    padding: 9px 18px;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.sidebar-link:hover,
.nav-item.active,
.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.07);
    border-left-color: var(--gold);
    color: #fff;
}

.nav-item.active {
    background: rgba(25, 118, 210, 0.3);
}

.nav-item .icon {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box,
.admin-stat-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
    border-left: 4px solid var(--blue);
}

.stat-box.accent {
    background: linear-gradient(135deg, rgba(244, 187, 42, 0.14), rgba(23, 185, 214, 0.1));
}

.stats-grid .stat-box:nth-child(2) {
    border-left-color: var(--cyan);
}

.stats-grid .stat-box:nth-child(3) {
    border-left-color: var(--gold);
}

.stats-grid .stat-box:nth-child(4) {
    border-left-color: #7c4dff;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #e3f2fd;
}

.stats-grid .stat-box:nth-child(2) .stat-icon {
    background: #e0f7fa;
}

.stats-grid .stat-box:nth-child(3) .stat-icon {
    background: #fff8e1;
}

.stats-grid .stat-box:nth-child(4) .stat-icon {
    background: #ede7f6;
}

.stat-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--navy);
}

.stat-label {
    color: var(--muted);
    margin-top: 6px;
    font-size: 0.88rem;
}

.glass-card,
.panel-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.section-title,
.panel-title {
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.table-modern thead th {
    background: var(--navy);
    color: #fff;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 0;
}

.dt-container .table-modern thead th,
.dt-container .table-modern thead td,
table.table-modern.dataTable thead th,
table.table-modern.dataTable thead td,
table.table-modern.dataTable > thead > tr > th,
table.table-modern.dataTable > thead > tr > td {
    background: var(--navy) !important;
    color: #fff !important;
    border-bottom: 0 !important;
}

.dt-container .table-modern thead .dt-column-title,
table.table-modern.dataTable thead .dt-column-title,
.dt-container .table-modern thead .dt-column-order,
table.table-modern.dataTable thead .dt-column-order {
    color: #fff !important;
}


.table-modern tbody td {
    border-color: #edf2f8;
}

.lab-card-box {
    background: linear-gradient(180deg, #fff, #f9fbff);
    border-radius: 18px;
    border: 1px solid var(--line);
    padding: 18px;
    height: 100%;
    transition: 0.2s ease;
}

.lab-card-link {
    text-decoration: none;
    color: inherit;
}

.lab-card-link:hover .lab-card-box {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.lab-code {
    display: inline-block;
    background: var(--navy);
    color: var(--gold);
    border-radius: 10px;
    padding: 4px 10px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    margin-bottom: 10px;
}

.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar-panel {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-badge {
    background: rgba(27, 102, 209, 0.1);
    border: 1px solid rgba(27, 102, 209, 0.15);
    color: var(--blue);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.sidebar-user {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 16px 0;
}

.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f8;
}

.list-row:last-child {
    border-bottom: 0;
}

.upload-card {
    border: 2px dashed #b6c7df;
    border-radius: 18px;
    padding: 24px;
    background: #f6faff;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, #1b66d1 0%, #081736 70%);
}

.auth-card {
    width: min(100%, 440px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.25);
}

.auth-wrap {
    padding: 24px;
}

.bootstrap-dialog .modal-header {
    background: #212529;
    color: #fff;
}

.badge-action {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}

/* Extra-small button for DataTable action columns */
.btn-xs {
    padding: 3px 7px;
    font-size: 11px;
    line-height: 1.4;
    border-radius: 6px;
    border: 1px solid transparent;
}

.btn-xs.btn-outline-secondary { border-color: #ced4da; color: #6c757d; }
.btn-xs.btn-outline-secondary:hover { background: #6c757d; color: #fff; }
.btn-xs.btn-outline-primary   { border-color: var(--blue); color: var(--blue); }
.btn-xs.btn-outline-primary:hover   { background: var(--blue); color: #fff; }
.btn-xs.btn-outline-danger    { border-color: #c62828; color: #c62828; }
.btn-xs.btn-outline-danger:hover    { background: #c62828; color: #fff; }

@media (max-width: 991.98px) {
    .hero-shell,
    .admin-layout {
        flex-direction: column;
    }

    .hero-sidebar,
    .sidebar-panel {
        width: 100%;
        position: relative;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-main,
    .content-panel {
        padding: 20px 16px 28px;
    }

    .public-topbar {
        height: auto;
        padding: 16px;
        align-items: flex-start;
        gap: 10px;
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
