:root,
[data-theme="oren"] {
    --primary: #ea580c;
    --primary-dark: #c2410c;
    --primary-deep: #9a3412;
    --primary-light: #f97316;
    --theme-grad: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
    --theme-grad-subtle: linear-gradient(135deg, rgba(234, 88, 12, 0.08) 0%, rgba(194, 65, 12, 0.03) 100%);
    --accent: #f97316;
    --accent-soft: #fff7ed;
    --accent-border: #fed7aa;
    --accent-glow: rgba(234, 88, 12, 0.2);
    --navy: #0f172a;
    --navy-light: #1e293b;
    --ink: #334155;
    --muted: #64748b;
    --border: #f1e4d8;
    --border-light: #fdf5ee;
    --surface: #ffffff;
    --bg-page: #fef7f2;
    --bg-body-grad: linear-gradient(180deg, #fff1e6 0%, #fdf6f0 360px, #faf4ee 100%);
    --bg-mesh: 
        radial-gradient(at 15% 10%, rgba(234, 88, 12, 0.09) 0px, transparent 50%),
        radial-gradient(at 85% 20%, rgba(249, 115, 22, 0.07) 0px, transparent 50%),
        radial-gradient(at 50% 80%, rgba(234, 88, 12, 0.04) 0px, transparent 60%);
    --input-bg: #f8fafc;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    --shadow-card: 0 20px 45px -12px rgba(194, 65, 12, 0.22);
    --shadow-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.08);
    font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="ice-blue"] {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-deep: #075985;
    --primary-light: #38bdf8;
    --theme-grad: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
    --theme-grad-subtle: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(3, 105, 161, 0.03) 100%);
    --accent: #0ea5e9;
    --accent-soft: #f0f9ff;
    --accent-border: #bae6fd;
    --accent-glow: rgba(2, 132, 199, 0.2);
    --navy: #0f172a;
    --navy-light: #1e293b;
    --ink: #334155;
    --muted: #64748b;
    --border: #e0edf8;
    --border-light: #eff6fc;
    --surface: #ffffff;
    --bg-page: #edf6fd;
    --bg-body-grad: linear-gradient(180deg, #e4f1fc 0%, #ecf5fd 360px, #f2f8fe 100%);
    --bg-mesh: 
        radial-gradient(at 15% 10%, rgba(2, 132, 199, 0.12) 0px, transparent 50%),
        radial-gradient(at 85% 20%, rgba(14, 165, 233, 0.09) 0px, transparent 50%),
        radial-gradient(at 50% 80%, rgba(2, 132, 199, 0.05) 0px, transparent 60%);
    --input-bg: #f8fafc;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    --shadow-card: 0 20px 45px -12px rgba(3, 105, 161, 0.22);
    --shadow-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.08);
}

/* SOFT DARK MODE (SLATE NAVY - MELEGAKAN MATA WAKTU MALAM) */
[data-theme="dark"] {
    --primary: #38bdf8;
    --primary-dark: #0ea5e9;
    --primary-deep: #0284c7;
    --primary-light: #7dd3fc;
    --theme-grad: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #0f172a 100%);
    --theme-grad-subtle: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(14, 165, 233, 0.05) 100%);
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.12);
    --accent-border: #1e293b;
    --accent-glow: rgba(56, 189, 248, 0.25);
    --navy: #f8fafc;
    --navy-light: #e2e8f0;
    --ink: #cbd5e1;
    --muted: #94a3b8;
    --border: #334155;
    --border-light: #1e293b;
    --surface: #1e293b;
    --bg-page: #0b1120;
    --bg-body-grad: linear-gradient(180deg, #0b1120 0%, #0f172a 360px, #111827 100%);
    --bg-mesh: 
        radial-gradient(at 15% 10%, rgba(14, 165, 233, 0.15) 0px, transparent 50%),
        radial-gradient(at 85% 20%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 80%, rgba(14, 165, 233, 0.06) 0px, transparent 60%);
    --input-bg: #1e293b;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 20px 45px -12px rgba(0, 0, 0, 0.65);
    --shadow-hover: 0 12px 28px -4px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .app-header {
    background: rgba(15, 23, 42, 0.88);
    border-bottom: 1px solid #1e293b;
}
[data-theme="dark"] .table-container-card,
[data-theme="dark"] .my-lab-card,
[data-theme="dark"] .session-control-card,
[data-theme="dark"] .form-card-section,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .modal-box {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
[data-theme="dark"] .modern-records-table th {
    background: #0f172a;
    color: #94a3b8;
    border-color: #334155;
}
[data-theme="dark"] .modern-records-table td {
    border-color: #334155;
}
[data-theme="dark"] .modern-records-table tr:hover td {
    background: #24344d;
}
[data-theme="dark"] .table-card-top,
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer,
[data-theme="dark"] .modal-tab-bar {
    background: #0f172a;
    border-color: #334155;
}
[data-theme="dark"] .app-global-footer {
    background: #0f172a;
    border-color: #1e293b;
    color: #94a3b8;
}
[data-theme="dark"] .footer-title-row {
    color: #f8fafc;
}
[data-theme="dark"] .footer-stats-wrap {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
[data-theme="dark"] .footer-stat-group {
    color: #e2e8f0;
}
[data-theme="dark"] .badge-num {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}
[data-theme="dark"] .badge-num-online {
    background: #064e3b;
    border-color: #059669;
    color: #a7f3d0;
}
[data-theme="dark"] .badge-num-admin {
    background: #881337;
    border-color: #e11d48;
    color: #fecdd3;
}
[data-theme="dark"] .user-chip {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .user-chip-name {
    color: #f8fafc;
}
[data-theme="dark"] .user-chip-badge {
    background: #0f172a;
    color: #94a3b8;
    border-color: #334155;
}
[data-theme="dark"] .theme-dropdown-select,
[data-theme="dark"] .session-select-styled,
[data-theme="dark"] .search-box input,
[data-theme="dark"] .field-item input,
[data-theme="dark"] .field-item select,
[data-theme="dark"] .field-item textarea {
    background: #0f172a;
    color: #f8fafc;
    border-color: #334155;
}
[data-theme="dark"] .course-code-pill,
[data-theme="dark"] .table-index {
    background: #0f172a;
    color: #cbd5e1;
    border-color: #334155;
}
[data-theme="dark"] .course-name-text,
[data-theme="dark"] .lecturer-text strong {
    color: #f1f5f9;
}
[data-theme="dark"] .btn-view {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}
[data-theme="dark"] .btn-view:hover {
    background: #1e293b;
    border-color: #64748b;
}
[data-theme="dark"] .kpi-progress-card {
    background: #1e293b;
    border-color: #334155;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-page);
    background-image: var(--bg-mesh), var(--bg-body-grad);
    background-attachment: fixed;
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
main {
    flex: 1 0 auto;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

/* ==========================================
   APP HEADER (GLASSMORPHIC & SLEEK)
   ========================================== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 0;
    box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.03);
    transition: all 0.2s ease;
}
.header-inner {
    width: min(1680px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
}
.header-nav-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}
.nav-utils {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.16s ease;
}
.brand:hover {
    transform: translateY(-1px);
}
.brand-logos {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 3px 6px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.brand-logos img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}
.brand-text strong {
    display: block;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.025em;
    line-height: 1.2;
}
.brand-text small {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: 0;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 650;
    color: #475569;
    height: 36px;
    padding: 0 11px;
    border-radius: 11px;
    border: 1px solid transparent;
    transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap !important;
    text-decoration: none;
    box-sizing: border-box;
}
.nav-item:hover {
    color: var(--primary-dark);
    background: #f1f5f9;
    transform: translateY(-1px);
}
.nav-item.active {
    background: var(--accent-soft);
    color: var(--primary-dark);
    border-color: var(--accent-border);
    font-weight: 800;
    box-shadow: 0 2px 6px var(--accent-glow);
}

/* THEME SWITCHER (DROPDOWN SELECTION & PILL) */
.theme-select-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.theme-dropdown-select {
    height: 38px;
    padding: 0 30px 0 12px;
    border-radius: 11px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-size: 12.5px;
    font-weight: 750;
    color: var(--navy);
    cursor: pointer;
    transition: all 0.18s ease;
    box-sizing: border-box;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.theme-dropdown-select:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--accent-glow);
}
.theme-dropdown-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.theme-switch-pill {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    height: 38px;
    padding: 3px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    gap: 2px;
    box-sizing: border-box;
    white-space: nowrap !important;
    flex-shrink: 0;
}
.theme-opt {
    background: transparent;
    border: 0;
    height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.theme-opt.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.theme-opt-icon {
    font-size: 14px;
    padding: 0 6px;
}
.inline-switch {
    margin-bottom: 8px;
}
.osh-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    height: 38px;
    padding: 0 14px;
    border-radius: 11px;
    transition: all 0.18s ease;
    white-space: nowrap !important;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.osh-badge:hover {
    background: #f8fafc;
    color: var(--navy);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

/* USER CHIP & LOGOUT BUTTON */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px 0 5px;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    text-decoration: none;
    white-space: nowrap !important;
    box-sizing: border-box;
    flex-shrink: 0;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.user-chip:hover,
.user-chip-active {
    background: var(--accent-soft);
    border-color: var(--accent-border);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px var(--accent-glow);
}
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--theme-grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 850;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.user-chip-name {
    font-size: 12.5px;
    font-weight: 750;
    color: var(--navy);
    white-space: nowrap !important;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}
.user-chip-badge {
    font-size: 11px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    color: #475569;
    font-weight: 700;
    white-space: nowrap !important;
    border: 1px solid #e2e8f0;
}
.badge-need-phone {
    font-size: 10.5px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 750;
    white-space: nowrap !important;
}
.chip-edit-icon {
    font-size: 11px;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}
.user-chip:hover .chip-edit-icon {
    opacity: 1;
}
.logout-btn {
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    height: 38px;
    width: 38px;
    padding: 0;
    border-radius: 11px;
    transition: all 0.18s ease;
    cursor: pointer;
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.logout-btn svg {
    display: block;
    transition: transform 0.18s ease, stroke 0.18s ease;
}
.logout-btn:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.18);
}
.logout-btn:hover svg {
    transform: translateX(1.5px);
}

/* SLEEK FLOATING TOOLTIP ON MOUSE HOVER */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -34px;
    right: 50%;
    transform: translateX(50%) scale(0.92);
    background: #0f172a;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.16s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    z-index: 1000;
}
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(50%) scale(1);
}

/* ==========================================
   HEADER LIVE DATETIME WIDGET (KEMAS & MODEN)
   ========================================== */
.header-datetime-widget {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    padding: 3px 9px;
    border-radius: 11px;
    height: 38px;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
    user-select: none;
    cursor: default;
    transition: all 0.18s ease;
}
.header-datetime-widget:hover {
    border-color: var(--accent-border);
    box-shadow: 0 2px 8px var(--accent-glow);
}
.hdt-time-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.1;
}
.hdt-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
    animation: hdtPulse 1.8s infinite;
}
@keyframes hdtPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
}
.hdt-time {
    font-family: 'Plus Jakarta Sans', -apple-system, monospace;
    font-size: 13px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: 0.02em;
}
.hdt-ampm {
    font-size: 9.5px;
    font-weight: 850;
    color: var(--primary);
    letter-spacing: 0.04em;
}
.hdt-date-wrap {
    display: flex;
    align-items: center;
    line-height: 1;
    margin-top: 2px;
}
.hdt-date {
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* Penyesuaian Tema Gelap (Dark Mode) */
[data-theme="dark"] .header-datetime-widget {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .hdt-time {
    color: #f8fafc;
}
[data-theme="dark"] .hdt-date {
    color: #94a3b8;
}

/* ==========================================
   APP GLOBAL FOOTER (PERSIS GAMBAR 1)
   ========================================== */
.app-global-footer {
    border-top: 1px solid var(--border);
    background: #ffffff;
    padding: 12px 24px;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.02);
    font-size: 12px;
    color: #475569;
    position: relative;
    z-index: 50;
}
.footer-inner {
    width: min(1380px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-brand-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.footer-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--navy);
}
.footer-dot-icon {
    font-size: 11px;
    color: var(--primary);
}
.footer-app-name {
    font-weight: 800;
    color: var(--navy);
}
.footer-dot-sep {
    color: #94a3b8;
    font-size: 10px;
}
.footer-app-desc {
    font-weight: 500;
    color: #64748b;
    font-size: 12px;
}
.footer-copyright {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

/* FOOTER STATS PILL (INTERAKTIF & LIVE DARI MYSQL) */
.footer-stats-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 5px 14px;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}
.footer-stats-wrap:hover {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
.footer-stat-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #334155;
}
.stat-icon-lead {
    font-size: 13px;
}
.stat-bullet {
    color: #cbd5e1;
    font-size: 10px;
}
.footer-v-divider {
    color: #cbd5e1;
    font-weight: 300;
    font-size: 13px;
    margin: 0 2px;
}
.online-pulse-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}
.badge-num {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 1px 6px;
    font-weight: 800;
    font-size: 11px;
    color: #0f172a;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.badge-num-online {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}
.badge-num-admin {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}
.footer-creator-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}
.designer-badge-pill {
    display: inline-block;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    letter-spacing: 0.05em;
}
[data-theme="oren"] .designer-badge-pill {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

/* ==========================================
   TOAST / FLASH NOTIFICATION (5 SAAT AUTO-CLOSE)
   ========================================== */
.flash-toast {
    position: fixed;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0,0,0,0.16);
    animation: toastPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.flash-toast.fade-out {
    opacity: 0;
    transform: translate(-50%, -15px);
    pointer-events: none;
}
.btn-toast-close {
    background: transparent;
    border: 0;
    color: inherit;
    opacity: 0.55;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    padding: 2px 5px;
    margin-left: 6px;
    border-radius: 4px;
    transition: opacity 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.btn-toast-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.08);
}
@keyframes toastPop {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
.flash-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.flash-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ==========================================
   HALAMAN LOG MASUK (GAMBAR 3 REPLICA)
   ========================================== */
.ecaps-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.85)), url('images/polimas.jpg') no-repeat center center / cover;
    background-attachment: fixed;
}
.ecaps-card {
    width: min(1080px, 100%);
    min-height: 600px;
    display: grid;
    grid-template-columns: 1.15fr 1.35fr;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.7);
}

/* PANEL KIRI: LATAR BELAKANG POLIMAS DENGAN OVERLAY TEMA */
.ecaps-left-panel {
    background: linear-gradient(145deg, rgba(194, 65, 12, 0.92) 0%, rgba(124, 45, 18, 0.95) 100%), url('images/polimas.jpg') no-repeat center center / cover;
    color: #ffffff;
    padding: 44px 38px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
[data-theme="ice-blue"] .ecaps-left-panel {
    background: linear-gradient(145deg, rgba(3, 105, 161, 0.92) 0%, rgba(8, 47, 73, 0.95) 100%), url('images/polimas.jpg') no-repeat center center / cover;
}
.ecaps-left-panel::after {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.panel-badge-row {
    margin-bottom: 24px;
}
.panel-org-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    backdrop-filter: blur(8px);
}

/* RUANG LOGO BESAR POLIMAS & JTMK (ATAS PANEL KIRI) */
.panel-logos-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 12px 0 28px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    width: fit-content;
}
.panel-logo-card {
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.panel-big-logo {
    height: 52px;
    max-width: 130px;
    object-fit: contain;
    display: block;
}
.panel-big-logo.jtmk-logo {
    height: 52px;
    border-radius: 4px;
}
.panel-sub-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
    backdrop-filter: blur(6px);
}
.panel-title {
    margin: 0 0 14px;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.03em;
    color: #ffffff;
}
.panel-desc {
    margin: 0 0 28px;
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 440px;
}
.panel-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    backdrop-filter: blur(6px);
}
.feat-icon {
    font-size: 15px;
}
.panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.75);
}
.version-tag {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    color: #fbcfe8;
}

/* PANEL KANAN: BORANG & AKAUN PANTAS */
.ecaps-right-panel {
    background: #ffffff;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-header-meta {
    text-align: right;
    margin-bottom: 20px;
}
.login-header-meta strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--navy);
}
.login-header-meta span {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
}
.login-welcome-box h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}
.login-welcome-box p {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--muted);
}
.login-notice-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    font-size: 12px;
    color: #15803d;
    font-weight: 600;
    margin-bottom: 20px;
}
.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}
.ecaps-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-group label {
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
}
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.field-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    pointer-events: none;
    opacity: 0.6;
}
.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 38px;
    background: var(--input-bg);
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--navy);
    outline: none;
    transition: 0.15s;
}
.input-wrapper input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}
[data-theme="ice-blue"] .input-wrapper input:focus {
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.toggle-eye {
    position: absolute;
    right: 10px;
    background: transparent;
    border: 0;
    font-size: 14px;
    opacity: 0.5;
    padding: 4px;
    transition: 0.15s;
}
.toggle-eye:hover { opacity: 1; }
.btn-ecaps-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px;
    background: var(--theme-grad);
    color: #ffffff;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: 0.18s;
    margin-top: 4px;
}
.btn-ecaps-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

/* PILIHAN AKAUN PANTAS DEMO (1-KLIK) */
.quick-accounts-section {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.quick-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 10px;
    text-transform: uppercase;
}
.quick-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.quick-login-form {
    display: inline-block;
    margin: 0;
}
.quick-acc-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    text-align: left;
    transition: 0.18s ease;
    cursor: pointer;
    font-family: inherit;
}
.quick-acc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.07);
}
.acc-icon { font-size: 15px; }
.acc-info strong { display: block; font-size: 11.5px; line-height: 1.2; }
.acc-info small { display: block; font-size: 10px; opacity: 0.8; }

.badge-admin {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}
.badge-blue {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.badge-green {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}
.badge-purple {
    background: #faf5ff;
    border-color: #e9d5ff;
    color: #7e22ce;
}
.badge-amber {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.ecaps-card-credit {
    margin-top: 20px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}
.ecaps-card-credit small { display: block; margin-top: 2px; }

/* ==========================================
   DASHBOARD STYLES (HERO & STATS)
   ========================================== */
.dashboard-shell,
.manage-supervisors-shell,
.supervisors-directory-shell {
    width: min(1280px, calc(100% - 40px));
    margin: 28px auto 60px;
}
.dash-hero-card,
.dashboard-hero-card {
    background: var(--theme-grad);
    color: #ffffff;
    padding: 34px 38px;
    border-radius: 22px;
    box-shadow: 0 16px 40px -10px rgba(194, 65, 12, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
[data-theme="ice-blue"] .dash-hero-card,
[data-theme="ice-blue"] .dashboard-hero-card {
    box-shadow: 0 16px 40px -10px rgba(3, 105, 161, 0.28);
}
.dash-hero-card::before,
.dashboard-hero-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -60px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-badge,
.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    backdrop-filter: blur(8px);
}
.dash-hero-text h1,
.hero-system-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 850;
    letter-spacing: -0.025em;
    line-height: 1.25;
}
.dash-hero-text p,
.hero-desc {
    margin: 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.92);
    max-width: 680px;
    line-height: 1.6;
}
.dash-hero-text code {
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 7px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 12.5px;
}
.dash-hero-stats {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
}
.hero-stat-pill,
.stat-pill {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: 14px 20px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-stat-pill:hover,
.stat-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
}
.stat-label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 5px;
    font-weight: 650;
    letter-spacing: 0.02em;
}

/* MAKMAL ANDA CARD */
.my-lab-card {
    background: #ffffff;
    border: 1.5px solid var(--accent-border);
    border-radius: 20px;
    padding: 24px 30px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}
.my-lab-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--theme-grad);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px var(--accent-glow);
}
.my-lab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.my-lab-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}
.my-lab-course {
    margin: 0 0 4px;
    font-size: 13.5px;
    color: #334155;
}
.my-lab-course strong {
    color: var(--primary);
}
.my-lab-lecturer {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted);
}
.my-lab-lecturer span {
    font-weight: 700;
    color: var(--navy);
}
.my-lab-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    transition: all 0.16s ease;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}
.btn-view {
    background: #f8fafc;
    color: #334155;
    border: 1.5px solid #cbd5e1;
}
.btn-view:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
    transform: translateY(-1px);
}
.btn-edit {
    background: var(--theme-grad);
    color: #ffffff;
    border: 0;
    box-shadow: 0 3px 10px var(--accent-glow);
}
.btn-edit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px var(--accent-glow);
}

/* JADUAL 14 MAKMAL & CONTAINER CARD */
.table-container-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}
.table-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
    border-bottom: 1px solid #f1f5f9;
}
.table-card-top h2 {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}
.table-subtitle {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted);
}
.table-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}
.btn-bulk-print {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    background: #ffffff;
    color: var(--navy);
    border: 1.5px solid #cbd5e1;
    border-radius: 11px;
    font-size: 12.5px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap !important;
    flex-shrink: 0;
    transition: all 0.16s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}
.btn-bulk-print:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: min(280px, 100%);
}
.search-icon {
    position: absolute;
    left: 12px;
    font-size: 13px;
    opacity: 0.5;
    pointer-events: none;
}
.search-box input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 34px;
    background: var(--input-bg);
    border: 1.5px solid #cbd5e1;
    border-radius: 11px;
    font-size: 12.5px;
    color: var(--navy);
    outline: none;
    transition: all 0.16s ease;
    box-sizing: border-box;
}
.search-box input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.table-responsive {
    overflow-x: auto;
}
.modern-records-table {
    width: 100%;
    border-collapse: collapse;
}
.modern-records-table th {
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    text-align: left;
}
.modern-records-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    vertical-align: middle;
    transition: background 0.15s ease;
}
.modern-records-table tr:hover td {
    background: #fcfdfe;
}
.modern-records-table tr:last-child td {
    border-bottom: 0;
}
.row-highlighted {
    background: var(--accent-soft) !important;
}
.table-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 750;
    color: #64748b;
}
.lab-main-cell strong {
    display: block;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.01em;
}
.lab-main-cell small {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 1px;
}
.badge-mine {
    display: inline-block;
    background: var(--theme-grad);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    margin-top: 4px;
}
.course-code-pill {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 750;
    margin-bottom: 3px;
}
.course-name-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}
.lecturer-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
}
.supervisors-text {
    font-size: 11.5px;
    color: var(--muted);
}
.date-text {
    font-size: 12px;
    color: #475569;
    font-weight: 500;
}
.action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    transition: all 0.16s ease;
    border: 1.5px solid transparent;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}
.btn-icon-action svg {
    display: block;
    transition: transform 0.15s ease;
}
.btn-icon-print {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}
.btn-icon-print:hover {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #bae6fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}
.btn-icon-print:hover svg {
    transform: scale(1.1);
}
.btn-icon-edit {
    background: var(--accent-soft);
    color: var(--primary-dark);
    border-color: var(--accent-border);
}
.btn-icon-edit:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--accent-glow);
}
.btn-icon-edit:hover svg {
    transform: scale(1.1);
}

/* ==========================================
   KAD RINGKASAN EKSEKUTIF / KPI PROGRESS BAR
   ========================================== */
.executive-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.kpi-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.kpi-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.kpi-icon-green {
    background: #ecfdf5;
    color: #059669;
    border: 1.5px solid #a7f3d0;
}
.kpi-icon-amber {
    background: #fffbeb;
    color: #d97706;
    border: 1.5px solid #fde68a;
}
.kpi-icon-blue {
    background: #f0f9ff;
    color: #0284c7;
    border: 1.5px solid #bae6fd;
}
.kpi-info {
    flex: 1;
    min-width: 0;
}
.kpi-title {
    font-size: 11.5px;
    font-weight: 750;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kpi-big-val {
    font-size: 24px;
    font-weight: 850;
    color: var(--navy);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.kpi-bar-track {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 10px;
    margin-top: 8px;
    overflow: hidden;
}
.kpi-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}
.kpi-bar-green {
    background: linear-gradient(90deg, #10b981, #059669);
}
.kpi-bar-blue {
    background: linear-gradient(90deg, #38bdf8, #0284c7);
}
.kpi-bar-amber {
    background: linear-gradient(90deg, #fbbf24, #d97706);
}
.kpi-footnote {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    font-weight: 600;
}

/* BUTANG CETAK BULK / SEMUA MAKMAL */
.btn-bulk-print {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    height: 38px;
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 750;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.16s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-bulk-print:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}
[data-theme="dark"] .btn-bulk-print {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}
[data-theme="dark"] .btn-bulk-print:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
}

/* ==========================================
   BAR KAWALAN SESI & TINDAKAN UTAMA
   ========================================== */
.session-control-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-soft);
}
.session-control-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.session-dropdown-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
}
.session-select-styled {
    padding: 8px 14px;
    border: 1.5px solid var(--accent-border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--navy);
    font-size: 13px;
    font-weight: 750;
    outline: none;
    transition: 0.15s;
    cursor: pointer;
}
.session-select-styled:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}
[data-theme="ice-blue"] .session-select-styled:focus {
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.btn-primary-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--theme-grad);
    color: #ffffff;
    font-size: 13px;
    font-weight: 750;
    padding: 9px 18px;
    border-radius: 10px;
    border: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: 0.18s ease;
    cursor: pointer;
}
.btn-primary-action:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-soft);
    color: var(--primary-dark);
    border: 1.5px solid var(--accent-border);
    font-size: 12.5px;
    font-weight: 750;
    padding: 8px 14px;
    border-radius: 10px;
    transition: 0.15s ease;
    cursor: pointer;
}
.btn-secondary-action:hover {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.btn-set-active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fffbeb;
    color: #b45309;
    border: 1.5px solid #fde68a;
    font-size: 12.5px;
    font-weight: 750;
    padding: 7px 13px;
    border-radius: 10px;
    transition: 0.15s ease;
    cursor: pointer;
}
.btn-set-active:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.15);
}
.badge-active-current {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0fdf4;
    color: #15803d;
    border: 1.5px solid #bbf7d0;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 20px;
}

/* KAD TAMBAH SESI AKADEMIK */
.add-session-card {
    background: #ffffff;
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 22px 26px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.add-session-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.add-session-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
}
.btn-close-panel {
    background: #f1f5f9;
    border: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.add-session-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: flex-end;
}
.field-checkbox-center {
    display: flex;
    align-items: center;
    padding-bottom: 8px;
}
.custom-chk-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}
.btn-submit-session {
    width: 100%;
    justify-content: center;
    padding: 11px;
}

/* SENARAI SESI SEDIA ADA DI DALAM PANEL */
.existing-sessions-box {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.existing-sessions-box h4 {
    margin: 0 0 4px;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--navy);
}
.sessions-help-text {
    margin: 0 0 14px;
    font-size: 12px;
    color: var(--muted);
}
.sessions-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}
.session-row-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--input-bg);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 12px;
    transition: 0.15s ease;
}
.session-row-pill.is-active-row {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.session-row-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.session-row-info strong {
    font-size: 13px;
    color: var(--navy);
}
.badge-active-tag {
    background: #22c55e;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
}
.session-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-set-active-mini {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 11.5px;
    font-weight: 750;
    padding: 4px 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.15s;
}
.btn-set-active-mini:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #b45309;
}
.btn-delete-session-mini {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    font-size: 11px;
    font-weight: 750;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.15s;
}
.btn-delete-session-mini:hover {
    background: #fda4af;
    color: #881337;
}

/* STATUS & PILL BADGES */
.session-badge-pill {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--primary-dark);
    border: 1px solid var(--accent-border);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 750;
}
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 750;
    white-space: nowrap !important;
}
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.dot-green {
    background: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
}
.dot-amber {
    background: #e11d48;
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.25);
}
.badge-smooth-ya {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.badge-smooth-tidak {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

/* EMPTY STATE */
.empty-state-box {
    text-align: center;
    padding: 55px 20px;
}
.empty-icon {
    font-size: 44px;
    margin-bottom: 12px;
    opacity: 0.8;
}
.empty-state-box h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
}
.empty-state-box p {
    margin: 0 0 20px;
    font-size: 13.5px;
    color: var(--muted);
}

/* ==========================================
   FORM EDIT STYLES
   ========================================== */
.form-shell {
    width: min(1280px, calc(100% - 40px));
    margin: 28px auto 60px;
}
.form-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.back-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    display: inline-block;
    margin-bottom: 6px;
}
.back-link:hover { text-decoration: underline; }
.form-page-title {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}
.form-page-title span {
    color: var(--primary);
}
.form-page-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}
.btn-top-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    transition: 0.15s;
}
.btn-top-view:hover {
    background: #f1f5f9;
}

.main-assessment-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.form-card-section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: var(--shadow-soft);
}
.section-badge-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--accent-soft);
    color: var(--primary);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 900;
    flex-shrink: 0;
}
.section-badge-header h2 {
    margin: 0 0 3px;
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
}
.section-badge-header p {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted);
}

.form-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.field-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field-item label {
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
}
.field-item select,
.field-item input[type="text"],
.field-item input[type="date"],
.field-item textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-size: 13.5px;
    color: var(--navy);
    outline: none;
    transition: 0.15s;
}
.field-item select:focus,
.field-item input:focus,
.field-item textarea:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(131, 24, 67, 0.1);
}
.field-item input[readonly] {
    background: #f8fafc;
    color: #475569;
    cursor: default;
}
.field-item small {
    font-size: 11px;
    color: var(--muted);
}
.field-full {
    grid-column: 1 / -1;
}

/* JADUAL PERALATAN FORM */
.inventory-table-styled,
.requirements-table-styled {
    width: 100%;
    border-collapse: collapse;
}
.inventory-table-styled th,
.requirements-table-styled th {
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    font-size: 11.5px;
    font-weight: 800;
    color: #475569;
    text-align: left;
}
.inventory-table-styled td,
.requirements-table-styled td {
    padding: 8px 10px;
    border: 1px solid var(--border);
    vertical-align: middle;
}
.input-styled {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
}
.input-styled:focus {
    border-color: var(--primary);
    background: #fff;
}
.text-center { text-align: center; }
.equipment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}
.opt-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
}
.editable-label {
    outline: none;
    border-bottom: 1px dashed transparent;
}
.editable-label:focus {
    border-bottom-color: var(--primary);
}
.btn-remove-row {
    width: 28px;
    height: 28px;
    border: 0;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    transition: 0.15s;
}
.btn-remove-row:hover {
    background: #fca5a5;
}
.btn-row-save {
    padding: 5px 10px;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 750;
    cursor: pointer;
    transition: 0.15s;
    white-space: nowrap;
}
.btn-row-save:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.add-row-bar {
    margin-top: 14px;
}
.btn-add-item {
    padding: 7px 14px;
    background: #f1f5f9;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    transition: 0.15s;
}
.btn-add-item:hover {
    background: #e2e8f0;
    border-color: #64748b;
}

/* SMOOTH RADIO */
.smooth-selector-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 18px;
}
.smooth-label {
    font-size: 13.5px;
    font-weight: 750;
    color: var(--navy);
}
.radio-options-row {
    display: flex;
    gap: 16px;
}
.custom-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.notes-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 18px;
}

.form-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding: 20px 0;
}
.btn-action-cancel {
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
}
.btn-action-cancel:hover { background: #f1f5f9; }
.btn-top-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--theme-grad);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: 0.15s;
}
.btn-top-save:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.btn-action-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    background: var(--theme-grad);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    transition: 0.18s;
}
.btn-action-save:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ==========================================
   OFFICIAL BORANG PPP-11(1) VIEW (GAMBAR 2)
   ========================================== */
.view-sticky-bar {
    position: sticky;
    top: 60px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    backdrop-filter: blur(12px);
}
.view-bar-inner {
    width: min(900px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.view-back-btn {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}
.view-bar-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--navy);
}
.view-bar-actions {
    display: flex;
    gap: 10px;
}
.btn-view-edit {
    padding: 7px 14px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
}
.btn-view-print {
    padding: 7px 16px;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 750;
    color: #ffffff;
}

.official-paper-container {
    width: min(850px, calc(100% - 30px));
    margin: 24px auto 60px;
}
.official-borang-sheet {
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 36px 42px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    color: #000;
    font-size: 11pt;
    line-height: 1.35;
}

.borang-top-header {
    text-align: right;
    font-size: 10pt;
    font-weight: bold;
    margin-bottom: 14px;
}
.borang-lampiran { margin-bottom: 1px; }

.borang-main-title {
    text-align: center;
    margin-bottom: 16px;
}
.borang-main-title h1 {
    font-size: 12pt;
    font-weight: bold;
    margin: 0 0 2px;
    text-transform: uppercase;
}
.borang-main-title h2 {
    font-size: 11.5pt;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
}

.tbl-borang-meta {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}
.tbl-borang-meta td {
    border: 1.5px solid #000;
    padding: 4px 8px;
    font-size: 10pt;
}
.meta-label {
    font-weight: bold;
}

.tbl-borang-peralatan {
    width: 100%;
    border-collapse: collapse;
    border-top: 0;
}
.tbl-borang-peralatan th {
    border: 1.5px solid #000;
    padding: 4px 6px;
    font-size: 9.5pt;
    font-weight: bold;
    text-align: center;
}
.tbl-borang-peralatan td {
    border: 1.5px solid #000;
    padding: 3px 6px;
    font-size: 9.5pt;
}
.section-row td {
    background: #fff;
    padding: 4px 6px;
}
.sub-instruction {
    font-size: 8.5pt;
    font-style: italic;
}
.options-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.check-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.borang-pensyarah-section {
    margin-top: 14px;
}
.pensyarah-header {
    font-size: 9.5pt;
    margin: 0 0 4px;
}
.pdp-smooth-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9.5pt;
    margin-bottom: 8px;
}
.bullet { font-weight: bold; }
.smooth-answer {
    font-weight: bold;
    margin-left: 6px;
}
.smooth-note {
    font-size: 8.5pt;
    font-style: italic;
    font-weight: bold;
}

.tbl-borang-keperluan {
    width: 100%;
    border-collapse: collapse;
}
.tbl-borang-keperluan th {
    border: 1.5px solid #000;
    padding: 4px 6px;
    font-size: 9.5pt;
    font-weight: normal;
    text-align: center;
}
.tbl-borang-keperluan td {
    border: 1.5px solid #000;
    padding: 4px 6px;
    font-size: 9.5pt;
    min-height: 22px;
}

.borang-signatures-area {
    margin-top: 22px;
}
.sig-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 20px;
}
.sig-col {
    font-size: 9.5pt;
}
.sig-role-title {
    font-weight: bold;
    margin: 0 0 25px;
}
.sig-space {
    height: 35px;
}
.sig-name {
    line-height: 1.35;
}

.sig-pengesahan-box {
    font-size: 9.5pt;
    line-height: 1.35;
    padding-top: 10px;
}
.pengesahan-title {
    margin: 0 0 2px;
}
.pengesahan-sub {
    margin: 0 0 4px;
}
.cadangan-title {
    margin: 0 0 6px;
}
.cadangan-lines {
    min-height: 28px;
    border-bottom: 1px solid #000;
    margin-bottom: 12px;
    white-space: pre-wrap;
}
.pbmb-sig-row {
    margin-top: 10px;
}
.pbmb-sign-space {
    max-width: 320px;
}

/* ==========================================
   SENARAI PENYELIA BMBK & DIREKTORI
   ========================================== */
.supervisors-directory-shell,
.manage-supervisors-shell {
    width: min(1280px, calc(100% - 40px));
    margin: 28px auto 60px;
}
/* VIEW TOGGLE PILL (JADUAL / KAD) */
.view-toggle-pill {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    gap: 3px;
    box-sizing: border-box;
}
.view-toggle-btn {
    background: transparent;
    border: 0;
    height: 32px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap !important;
}
.view-toggle-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.supervisors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 22px;
    margin-top: 20px;
}
.supervisor-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.supervisor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -5px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-border);
}
.sup-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 14px;
    margin-bottom: 14px;
}
.sup-lab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: var(--accent-soft);
    color: var(--primary-dark);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: -0.01em;
}
.sup-location-text {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 3px;
}
.sup-person-box {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: all 0.15s ease;
}
.sup-person-box:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}
.sup-person-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sup-person-name {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.25;
    margin-bottom: 8px;
}
.sup-person-phone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.sup-phone-text {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 750;
    height: 32px;
    padding: 0 13px;
    border-radius: 9px;
    transition: all 0.18s ease;
    white-space: nowrap !important;
    border: 0;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.25);
}
.btn-whatsapp:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp-mini {
    height: 28px;
    padding: 0 10px;
    font-size: 11.5px;
    border-radius: 7px;
}
.btn-whatsapp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: #25D366;
    color: #ffffff !important;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.16s ease;
    box-shadow: 0 2px 5px rgba(37, 211, 102, 0.25);
    flex-shrink: 0;
    margin-top: 1px;
}
.btn-whatsapp-icon:hover {
    background: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(18, 140, 126, 0.35);
}
.sup-item-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}
.sup-item-name {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.sup-num-badge {
    background: var(--accent-soft);
    color: var(--primary-dark);
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}
.sup-item-name strong {
    color: var(--navy);
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}
.btn-edit-sup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    padding: 0 13px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--primary-dark);
    border: 1px solid var(--accent-border);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap !important;
}
.btn-edit-sup:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* TAB BAR DIREKTORI */
.directory-tab-bar {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.dir-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: var(--navy);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.16s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.dir-tab-btn:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}
.dir-tab-btn.active {
    background: var(--theme-grad);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* MODAL & DIALOG GLASSMORPHIC */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background: #ffffff;
    width: min(600px, calc(100% - 24px));
    max-height: 90vh;
    border-radius: 22px;
    box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-box.modal-box-large {
    width: min(880px, calc(100% - 24px));
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.94) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    flex-shrink: 0;
}
.modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}
.btn-close-modal {
    background: #f1f5f9;
    border: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.btn-close-modal:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* TAB BAR KHAS MODAL PENGUNJUNG */
.modal-tab-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.visitor-tab-btn {
    padding: 7px 14px;
    border-radius: 9px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 12px;
    font-weight: 750;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.visitor-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}
.visitor-tab-btn.active {
    background: var(--theme-grad);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-refresh-visitor {
    margin-left: auto;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-refresh-visitor:hover {
    background: #f1f5f9;
    color: var(--primary);
    border-color: var(--accent-border);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1 1 auto;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    flex-shrink: 0;
}
.modal-lab-banner {
    background: var(--accent-soft);
    border: 1.5px solid var(--accent-border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* SUPERVISOR SELECTOR CARDS IN MODAL */
.sup-selector-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    transition: all 0.18s ease;
}
.sup-selector-card:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: #ffffff;
}
.supervisor-picker-select {
    width: 100%;
    height: 42px;
    padding: 0 36px 0 12px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.18s ease;
    outline: none;
}
.supervisor-picker-select:hover {
    border-color: #94a3b8;
}
.supervisor-picker-select:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3.5px var(--accent-glow) !important;
    background-color: #ffffff !important;
}

.input-styled {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: all 0.16s ease;
    box-sizing: border-box;
}
.input-styled:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    background: #ffffff;
}

/* HALAMAN PROFIL */
.profile-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    max-width: 650px;
    margin: 30px auto;
    box-shadow: var(--shadow-soft);
}
.profile-title-box {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}
.profile-title-box h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
}
.profile-title-box p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}
.form-note-wajib {
    font-size: 11px;
    color: #dc2626;
    font-weight: 700;
    margin-left: 4px;
}
.btn-save-profile {
    height: 42px;
    padding: 0 24px;
    border-radius: 12px;
    background: var(--theme-grad);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    border: 0;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transition: 0.15s ease;
}
.btn-save-profile:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* BUTTON SIZE TIAP-TIAP KONSISTEN & RAPI */
.btn-action,
.btn-primary-action,
.btn-secondary-action,
.btn-set-active {
    height: 38px;
    font-size: 13px;
    font-weight: 750;
    padding: 0 16px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap !important;
    box-sizing: border-box;
    cursor: pointer;
    transition: 0.15s ease;
}
.session-select-styled {
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
    box-sizing: border-box;
}
.badge-active-current {
    height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap !important;
    box-sizing: border-box;
}

/* ==========================================
   RESPONSIVE & PRINT MEDIA
   ========================================== */

/* LAPTOP / TABLET SEDERHANA (< 1100px) */
@media (max-width: 1100px) {
    .brand-text small {
        display: none;
    }
    .user-chip-badge {
        display: none;
    }
    .user-chip-name {
        max-width: 120px;
    }
    .nav-item {
        padding: 0 10px;
        font-size: 12.5px;
    }
    .osh-badge {
        padding: 0 10px;
        font-size: 12.5px;
    }
}

/* TABLET & MOBILE (< 900px) */
@media (max-width: 900px) {
    .ecaps-card { grid-template-columns: 1fr; }
    .ecaps-left-panel { padding: 30px 24px; }
    .ecaps-right-panel { padding: 30px 24px; }

    /* Header 2-Tier: Bar atas (Brand & Profil/Tema), Bar Bawah (Tab Menu) */
    .app-header {
        padding: 8px 0;
    }
    .header-inner {
        flex-wrap: wrap;
        gap: 8px 12px;
    }
    .brand {
        order: 1;
    }
    .nav-utils {
        order: 2;
        margin-left: auto;
    }
    .header-nav-wrap {
        width: 100%;
        order: 3;
        justify-content: flex-start;
    }
    .nav-links {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }

    /* Papan Pemuka Hero & Kad Makmal */
    .dash-hero-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
        gap: 20px;
    }
    .dash-hero-text h1 {
        font-size: 22px;
    }
    .dash-hero-stats {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .hero-stat-pill {
        padding: 12px 14px;
        text-align: center;
    }
    .hero-stat-pill .stat-num {
        font-size: 24px;
    }

    .my-lab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .my-lab-actions {
        width: 100%;
        display: flex;
        gap: 10px;
    }
    .my-lab-actions .btn-action,
    .my-lab-actions a {
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    /* Pemilih Sesi Akademik */
    .session-selector-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .session-control-left {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }
    .session-dropdown-group {
        width: 100%;
        justify-content: space-between;
    }
    .session-select-styled {
        flex: 1;
    }
    .btn-primary-action,
    .btn-secondary-action,
    .btn-set-active {
        width: 100%;
        justify-content: center;
    }

    /* Jadual & Carian */
    .table-card-top {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 18px 20px;
    }
    .table-card-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-left: 0;
    }
    .search-box {
        width: 100%;
        max-width: 100%;
    }
    .view-toggle-pill {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .view-toggle-btn {
        flex: 1;
        justify-content: center;
    }

    /* Grid Penyelia */
    .supervisors-grid {
        grid-template-columns: 1fr;
    }

    /* Borang Penilaian */
    .form-fields-grid {
        grid-template-columns: 1fr;
    }
    .notes-grid-row {
        grid-template-columns: 1fr;
    }
    .form-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .form-top-actions {
        width: 100%;
        display: flex;
        gap: 10px;
    }
    .form-top-actions button,
    .form-top-actions a {
        flex: 1;
        justify-content: center;
    }
}

/* SMARTPHONE SKRIN KECIL (< 480px) */
@media (max-width: 480px) {
    .header-inner {
        width: calc(100% - 24px);
    }
    .dashboard-shell,
    .supervisors-directory-shell,
    .manage-supervisors-shell,
    .form-shell {
        width: calc(100% - 24px);
        margin: 16px auto 40px;
    }
    .brand-logos img {
        width: 28px;
        height: 28px;
    }
    .brand-text strong {
        font-size: 13.5px;
    }
    .user-chip {
        padding: 0 8px 0 4px;
        gap: 5px;
    }
    .user-chip-name {
        display: none;
    }
    .logout-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    .theme-dropdown-select {
        height: 34px;
        padding: 0 24px 0 8px;
        font-size: 11.5px;
    }
    .theme-opt-icon {
        padding: 0 6px;
        font-size: 13px;
    }
    .my-lab-card {
        padding: 18px 14px;
    }
    .table-card-top {
        padding: 14px 12px;
    }
    .profile-card {
        padding: 20px 14px;
        margin: 16px auto;
    }
    .modal-box {
        border-radius: 16px;
    }
    .modal-header {
        padding: 14px 16px;
    }
    .modal-body {
        padding: 16px;
    }
    .modal-footer {
        padding: 12px 16px;
    }

    /* Footer Mobile Responsiveness */
    .app-global-footer {
        padding: 16px 12px;
    }
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }
    .footer-brand-meta {
        align-items: center;
        text-align: center;
    }
    .footer-title-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    .footer-stats-wrap {
        width: 100%;
        max-width: 380px;
        flex-direction: column;
        gap: 8px;
        padding: 10px 14px;
        border-radius: 14px;
    }
    .footer-v-divider {
        display: none;
    }
    .footer-stat-group {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm 12mm;
    }
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .app-header,
    .view-sticky-bar,
    .no-print,
    .flash-toast {
        display: none !important;
    }
    .official-paper-container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .official-borang-sheet {
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        font-size: 9pt !important;
    }
    .tbl-borang-meta td,
    .tbl-borang-peralatan th,
    .tbl-borang-peralatan td,
    .tbl-borang-keperluan th,
    .tbl-borang-keperluan td {
        border: 1px solid #000 !important;
        padding: 2.5px 5px !important;
        font-size: 8.5pt !important;
    }
    .sig-space {
        height: 22px !important;
    }
    .bulk-print-page {
        page-break-after: always !important;
        break-after: page !important;
    }
    .bulk-print-page:last-child {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
}

/* ==========================================
   SESSION IDLE WARNING - OVERLAY TERASING
   Tidak mempengaruhi flow/layout halaman asal.
   ========================================== */
.idle-session-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.idle-session-overlay.is-visible {
    display: flex;
}
.idle-session-card {
    width: min(430px, calc(100vw - 32px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
    padding: 22px;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    align-items: start;
    animation: idleCardIn .18s ease-out;
}
@keyframes idleCardIn {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.idle-session-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    font-size: 23px;
}
.idle-session-copy { min-width: 0; }
.idle-session-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--primary-dark);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.idle-session-copy h3 {
    margin: 0;
    color: var(--navy);
    font-size: 19px;
    line-height: 1.25;
}
.idle-session-copy p {
    margin: 7px 0 10px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
}
.idle-session-countdown {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
}
.idle-session-countdown strong {
    font-size: 20px;
    line-height: 1;
}
.idle-session-countdown span {
    font-size: 11px;
    font-weight: 700;
}
.idle-session-copy small {
    display: block;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.45;
}
.idle-session-continue {
    grid-column: 1 / -1;
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 11px;
    background: var(--theme-grad);
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
    box-shadow: 0 6px 16px var(--accent-glow);
}
.idle-session-continue:hover { transform: translateY(-1px); }
[data-theme="dark"] .idle-session-countdown {
    background: rgba(194, 65, 12, .16);
    border-color: rgba(251, 146, 60, .35);
    color: #fdba74;
}

/* Header desktop lebar: beri ruang cukup supaya butang log keluar tidak terkeluar. */
@media (max-width: 1280px) and (min-width: 901px) {
    .header-inner { width: calc(100% - 24px); }
    .brand-text small { display: none; }
    .nav-item, .osh-badge { padding-left: 8px; padding-right: 8px; font-size: 12px; }
    .header-datetime-widget { padding-left: 7px; padding-right: 7px; }
    .hdt-date { font-size: 9px; }
    .user-chip-name { max-width: 90px; }
    .user-chip-badge { display: none; }
}

@media (max-width: 900px) {
    .header-datetime-widget { height: 34px; padding: 2px 7px; }
    .hdt-time { font-size: 11.5px; }
    .hdt-date { font-size: 8.5px; }
}

@media (max-width: 480px) {
    .idle-session-card { padding: 18px; grid-template-columns: 42px 1fr; }
    .idle-session-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 20px; }
    .idle-session-copy h3 { font-size: 17px; }
}

/* ==========================================
   HEADER ALIGNMENT + FLOATING QUICK NAV
   Patch visual sahaja: fungsi sedia ada tidak diubah.
   ========================================== */

/* Header kini sejajar dengan lebar dashboard/form (1280px). */
.header-inner {
    width: min(1280px, calc(100% - 40px));
}

/* Sedikit kompak supaya semua utiliti header kekal dalam landasan pada desktop. */
@media (min-width: 901px) {
    .header-inner { gap: 12px; }
    .header-nav-wrap { gap: 7px; }
    .nav-utils { gap: 6px; }
    .nav-links { gap: 3px; }
    .nav-item { padding-left: 9px; padding-right: 9px; }
    .osh-badge { padding-left: 11px; padding-right: 11px; }
    .user-chip { padding-right: 9px; }
    .user-chip-name { max-width: 125px; }
}

/* Dua butang terapung di tepi kanan. Hidden di bahagian atas halaman. */
.floating-quick-nav {
    --floating-bottom: 24px;
    position: fixed;
    right: 22px;
    bottom: var(--floating-bottom);
    z-index: 46;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease, bottom .12s ease-out;
}
.floating-quick-nav.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.floating-nav-btn {
    border: 1px solid rgba(148, 163, 184, .32);
    background: rgba(255, 255, 255, .94);
    color: var(--navy);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.floating-nav-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}
.floating-home-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: var(--primary-dark);
}
.floating-home-btn svg {
    width: 19px;
    height: 19px;
}
.floating-top-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
}
.floating-nav-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border);
    background: var(--accent-soft);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .16), 0 4px 10px var(--accent-glow);
}
.floating-nav-btn:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: 2px;
}

[data-theme="dark"] .floating-nav-btn {
    background: rgba(30, 41, 59, .94);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, .28);
}
[data-theme="dark"] .floating-nav-btn:hover {
    background: #24344d;
    border-color: rgba(125, 211, 252, .42);
}

@media (max-width: 900px) {
    .header-inner {
        width: min(1280px, calc(100% - 24px));
    }
    .floating-quick-nav {
        right: 14px;
    }
    .floating-home-btn {
        width: 42px;
        padding: 0;
    }
    .floating-home-btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .floating-quick-nav {
        right: 12px;
        gap: 7px;
    }
    .floating-home-btn,
    .floating-top-btn {
        width: 40px;
        height: 40px;
        min-height: 40px;
        border-radius: 13px;
    }
}


/* ==========================================
   MOBILE LOGIN REVAMP 2026
   Visual-only patch: login/authentication functions untouched.
   ========================================== */
@media (max-width: 900px) {
    .ecaps-login-shell {
        min-height: 100dvh;
        align-items: flex-start;
        padding: 18px 12px 28px;
        background-attachment: scroll;
        background-position: center top;
    }

    .ecaps-card {
        width: min(680px, 100%);
        min-height: 0;
        grid-template-columns: 1fr;
        border-radius: 24px;
        box-shadow: 0 20px 52px rgba(2, 12, 27, .28);
        overflow: hidden;
    }

    /* Jadikan panel branding sebagai hero kompak di atas, bukan panel desktop panjang. */
    .ecaps-left-panel {
        min-height: 0;
        padding: 24px 24px 22px;
        display: block;
        border-radius: 0;
    }
    .panel-badge-row {
        margin-bottom: 12px;
    }
    .panel-org-badge {
        padding: 6px 12px;
        font-size: 10.5px;
    }
    .panel-logos-container {
        width: 100%;
        max-width: 430px;
        margin: 0 0 18px;
        padding: 10px;
        gap: 10px;
        border-radius: 16px;
        box-sizing: border-box;
    }
    .panel-logo-card {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 10px;
        border-radius: 12px;
    }
    .panel-big-logo,
    .panel-big-logo.jtmk-logo {
        width: 100%;
        max-width: 150px;
        height: 42px;
    }
    .panel-hero-content {
        max-width: 520px;
    }
    .panel-sub-badge {
        margin-bottom: 10px;
        font-size: 9.5px;
    }
    .panel-title {
        margin-bottom: 7px;
        font-size: clamp(27px, 7vw, 34px);
    }
    .panel-desc {
        margin-bottom: 0;
        max-width: 540px;
        font-size: 13px;
        line-height: 1.5;
    }
    .panel-features-grid,
    .panel-footer {
        display: none;
    }

    .ecaps-right-panel {
        padding: 26px 24px 24px;
        justify-content: flex-start;
    }
    .login-header-meta {
        text-align: left;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 4px 10px;
        margin-bottom: 22px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border);
    }
    .login-header-meta .theme-select-box {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin: 0;
    }
    .login-header-meta strong {
        font-size: 13px;
    }
    .login-header-meta span {
        font-size: 11px;
        line-height: 1.35;
    }

    .login-welcome-box h2 {
        font-size: 28px;
        line-height: 1.1;
    }
    .login-welcome-box p {
        margin-bottom: 20px;
        line-height: 1.45;
    }
    .ecaps-form {
        gap: 16px;
    }
    .input-group label {
        font-size: 13px;
    }
    .input-wrapper input {
        min-height: 50px;
        padding-top: 13px;
        padding-bottom: 13px;
        font-size: 15px;
    }
    .btn-ecaps-primary {
        min-height: 52px;
        font-size: 15px;
        border-radius: 12px;
    }

    /* Akaun demo jadi grid, tidak lagi satu senarai panjang. */
    .quick-accounts-section {
        margin-top: 24px;
        padding-top: 18px;
    }
    .quick-title {
        font-size: 10.5px;
        margin-bottom: 12px;
    }
    .quick-buttons-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }
    .quick-login-form {
        display: block;
        min-width: 0;
    }
    .quick-acc-btn {
        width: 100%;
        min-height: 62px;
        padding: 10px 11px;
        gap: 8px;
        border-radius: 12px;
        align-items: flex-start;
    }
    .acc-icon {
        flex: 0 0 auto;
        margin-top: 2px;
    }
    .acc-info {
        min-width: 0;
    }
    .acc-info strong {
        font-size: 11px;
        line-height: 1.25;
    }
    .acc-info small {
        margin-top: 3px;
        font-size: 9.5px;
        line-height: 1.25;
    }
    .ecaps-card-credit {
        margin-top: 20px;
        padding-top: 14px;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 520px) {
    .ecaps-login-shell {
        padding: 10px 8px 22px;
    }
    .ecaps-card {
        border-radius: 20px;
    }
    .ecaps-left-panel {
        padding: 20px 18px 18px;
    }
    .panel-logos-container {
        padding: 8px;
        gap: 8px;
        margin-bottom: 15px;
    }
    .panel-logo-card {
        padding: 7px 8px;
    }
    .panel-big-logo,
    .panel-big-logo.jtmk-logo {
        height: 36px;
    }
    .panel-title {
        font-size: 29px;
    }
    .panel-desc {
        font-size: 12.5px;
    }
    .ecaps-right-panel {
        padding: 22px 18px 20px;
    }
    .login-header-meta {
        margin-bottom: 18px;
        padding-bottom: 14px;
    }
    .login-welcome-box h2 {
        font-size: 26px;
    }
    .login-welcome-box p {
        font-size: 12.5px;
    }
    .quick-buttons-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .quick-acc-btn {
        min-height: 64px;
        padding: 9px;
    }
    .acc-info strong {
        font-size: 10.5px;
    }
    .acc-info small {
        font-size: 9px;
    }
}

@media (max-width: 390px) {
    .quick-buttons-row {
        grid-template-columns: 1fr;
    }
    .quick-acc-btn {
        min-height: 56px;
    }
}

/* ==========================================
   MOBILE HEADER NAV FIX 2026
   CSS-only patch: prevents user/nav controls overflowing viewport.
   ========================================== */
@media (max-width: 900px) {
    .app-header {
        padding: 8px 0 9px;
    }

    .header-inner {
        width: calc(100% - 20px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .brand {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
    }

    .header-nav-wrap {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        min-width: 0;
    }

    .nav-utils {
        order: 1;
        width: 100%;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        overflow: hidden;
    }

    .nav-links {
        order: 2;
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        overflow: visible;
        padding: 0;
    }

    .nav-item,
    .osh-badge {
        width: 100%;
        min-width: 0;
        height: 34px;
        padding: 0 7px;
        font-size: 11.5px;
        gap: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap !important;
    }

    .header-datetime-widget {
        flex: 0 1 112px;
        min-width: 92px;
        max-width: 112px;
        height: 34px;
        padding: 2px 7px;
    }

    .theme-select-box {
        flex: 0 0 auto;
        min-width: 0;
    }

    .theme-dropdown-select {
        width: 70px;
        max-width: 70px;
        height: 34px;
        padding-left: 7px;
        padding-right: 20px;
        font-size: 10.5px;
    }

    .user-chip {
        flex: 0 0 36px;
        width: 36px;
        min-width: 36px;
        height: 34px;
        padding: 0;
        justify-content: center;
        gap: 0;
        border-radius: 10px;
        overflow: hidden;
    }

    .user-avatar {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .user-chip-name,
    .user-chip-badge,
    .chip-edit-icon,
    .badge-alert-dot {
        display: none !important;
    }

    .logout-btn {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }
}

@media (max-width: 620px) {
    .nav-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-item,
    .osh-badge {
        font-size: 11px;
        padding: 0 6px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        width: calc(100% - 16px);
    }

    .brand {
        gap: 8px;
    }

    .brand-logos {
        padding: 2px 4px;
        gap: 3px;
    }

    .brand-logos img {
        width: 26px;
        height: 26px;
    }

    .brand-text strong {
        font-size: 13px;
    }

    .brand-text small {
        display: none;
    }

    .nav-utils {
        gap: 5px;
    }

    .header-datetime-widget {
        flex-basis: 104px;
        min-width: 88px;
        max-width: 104px;
    }

    .hdt-time {
        font-size: 11px;
    }

    .hdt-date {
        font-size: 8px;
    }

    .theme-dropdown-select {
        width: 64px;
        max-width: 64px;
        font-size: 10px;
    }

    .nav-links {
        gap: 5px;
    }
}
