/* ==========================================================================
   LecturerHub - Ultra Premium Glassmorphism Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-base: #0a0f1d;
    --bg-surface: #111827;
    --bg-surface-elevated: #1e293b;
    --bg-gradient: radial-gradient(circle at 15% 15%, #1e1b4b 0%, #0a0f1d 70%);

    --glass-bg: rgba(17, 24, 39, 0.65);
    --glass-bg-hover: rgba(30, 41, 59, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-focus: rgba(99, 102, 241, 0.5);
    --glass-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);

    /* Accents */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    --primary-glow: 0 0 25px rgba(99, 102, 241, 0.4);

    --secondary: #06b6d4;
    --accent: #8b5cf6;

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.3);

    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(245, 158, 11, 0.3);

    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-border: rgba(239, 68, 68, 0.3);

    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);

    /* Text */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Geometry & Transitions */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Light Mode Theme Adaptation (High-Contrast, Crisp, Clean & Elegant)
   ========================================================================== */
[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-gradient: radial-gradient(circle at 15% 15%, #e2e8f0 0%, #f8fafc 70%);

    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-bg-hover: #f1f5f9;
    --glass-border: rgba(15, 23, 42, 0.09);
    --glass-border-focus: rgba(99, 102, 241, 0.6);
    --glass-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 0 1px 1px rgba(0, 0, 0, 0.03);

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;

    --success: #16a34a;
    --success-bg: #dcfce7;
    --success-border: #bbf7d0;

    --warning: #d97706;
    --warning-bg: #fef3c7;
    --warning-border: #fde68a;

    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --danger-border: #fecaca;

    --info: #2563eb;
    --info-bg: #dbeafe;
    --info-border: #bfdbfe;
}

[data-theme="light"] body {
    background-color: var(--bg-base);
    color: var(--text-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.04) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(6, 182, 212, 0.03) 0px, transparent 50%);
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f1f5f9;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

[data-theme="light"] .sidebar {
    background: #ffffff;
    border-right-color: #e2e8f0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .card,
[data-theme="light"] .glass-panel {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
}

[data-theme="light"] .glass-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .glass-card:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .stat-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 15px -1px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .stat-card .stat-value {
    color: #0f172a !important;
}

[data-theme="light"] .stat-card .stat-label {
    color: #64748b !important;
}

[data-theme="light"] .btn-secondary {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-secondary:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-theme="light"] textarea.form-control,
[data-theme="light"] input.form-control {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] textarea.form-control:focus,
[data-theme="light"] input.form-control:focus {
    background: #ffffff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control::placeholder,
[data-theme="light"] textarea::placeholder,
[data-theme="light"] input::placeholder {
    color: #94a3b8 !important;
}

[data-theme="light"] .form-group label,
[data-theme="light"] label {
    color: #334155 !important;
}

[data-theme="light"] .form-select option {
    background: #ffffff !important;
    color: #0f172a !important;
}

[data-theme="light"] .modal-overlay {
    background: rgba(15, 23, 42, 0.45) !important;
}

[data-theme="light"] .modal-content {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18) !important;
}

[data-theme="light"] .modal-header {
    background: #ffffff !important;
    border-bottom-color: #f1f5f9 !important;
}

[data-theme="light"] .modal-footer {
    background: #f8fafc !important;
    border-top-color: #e2e8f0 !important;
}

[data-theme="light"] .notice-box,
[data-theme="light"] #reminderPreviewText {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
}

[data-theme="light"] .notice-box span,
[data-theme="light"] #reminderPreviewText span {
    color: #1e40af !important;
}

[data-theme="light"] .custom-table th {
    background: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

[data-theme="light"] .custom-table td {
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
}

[data-theme="light"] .custom-table tr:hover td {
    background: #f8fafc !important;
}

[data-theme="light"] .nav-link {
    color: #475569;
}

[data-theme="light"] .nav-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

[data-theme="light"] .nav-link.active {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

[data-theme="light"] .badge-success {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
}
[data-theme="light"] .badge-warning {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border-color: #fde68a !important;
}
[data-theme="light"] .badge-danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
}
[data-theme="light"] .badge-info {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}
[data-theme="light"] .badge-purple {
    background: #f3e8ff !important;
    color: #7e22ce !important;
    border-color: #e9d5ff !important;
}
[data-theme="light"] .badge-neutral {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] .fc {
    --fc-border-color: #e2e8f0 !important;
    --fc-page-bg-color: #ffffff !important;
    --fc-neutral-bg-color: #f8fafc !important;
}

[data-theme="light"] .fc-theme-standard td,
[data-theme="light"] .fc-theme-standard th {
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .fc .fc-col-header-cell-cushion {
    color: #475569 !important;
}

[data-theme="light"] .fc .fc-daygrid-day-number {
    color: #334155 !important;
}

[data-theme="light"] .fc .fc-toolbar-title {
    color: #0f172a !important;
}

[data-theme="light"] .fc .fc-button {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .fc .fc-button:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

[data-theme="light"] .fc .fc-button-active,
[data-theme="light"] .fc .fc-button-primary:not(:disabled):active {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35) !important;
}

[data-theme="light"] .fc-day-today {
    background: #eff6ff !important;
}

[data-theme="light"] .auth-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .auth-wrapper {
    background: radial-gradient(circle at 50% 10%, #e2e8f0 0%, #f1f5f9 55%, #f8fafc 100%);
}

[data-theme="light"] .auth-card h2 {
    background: linear-gradient(135deg, #0f172a 0%, #334155 60%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .role-switcher-container {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

[data-theme="light"] .role-tab-btn {
    color: #64748b;
}

[data-theme="light"] .role-tab-btn.active {
    background: #ffffff;
    color: #4f46e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .brand-title {
    background: linear-gradient(to right, #0f172a, #475569);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .tg-status-pill.connected {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0284c7;
}

[data-theme="light"] .tg-status-pill.disconnected {
    background: #fef3c7;
    border-color: #fde68a;
    color: #b45309;
}

[data-theme="light"] .swal2-popup {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="light"] .swal2-title,
[data-theme="light"] .swal2-html-container {
    color: #0f172a !important;
}

/* ==========================================================================
   Reset & Global Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

/* ==========================================================================
   Glassmorphic Components & Panels
   ========================================================================== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.glass-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-3px);
    background: rgba(30, 41, 59, 0.6);
    border-color: var(--glass-border-focus);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Buttons & Inputs
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    outline: none;
    white-space: nowrap;
}

.btn:disabled,
.btn[disabled] {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: btnSpin 0.65s linear infinite;
    vertical-align: middle;
    flex-shrink: 0;
}

.btn-secondary .btn-spinner,
[data-theme="light"] .btn-secondary .btn-spinner {
    border-top-color: var(--text-main);
    border-color: rgba(100, 116, 139, 0.25);
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    box-shadow: var(--primary-glow);
}
.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-color: var(--glass-border);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}
.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}
.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.825rem;
    border-radius: var(--radius-sm);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.5;
    transition: var(--transition);
    outline: none;
    box-sizing: border-box;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.form-control::placeholder {
    color: var(--text-dim);
}

.form-select {
    cursor: pointer;
    padding-right: 28px;
}

.form-select option {
    background: var(--bg-surface);
    color: var(--text-main);
    padding: 8px 12px;
}

/* ==========================================================================
   Badges & Indicators
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 10px;
    height: 26px;
    box-sizing: border-box;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap !important;
    word-break: keep-all !important;
    line-height: 1;
    flex-shrink: 0;
}

.badge-success {
    background: var(--success-bg);
    color: #34d399;
    border: 1px solid var(--success-border);
}

.badge-warning {
    background: var(--warning-bg);
    color: #fbbf24;
    border: 1px solid var(--warning-border);
}

.badge-danger {
    background: var(--danger-bg);
    color: #f87171;
    border: 1px solid var(--danger-border);
}

.badge-info {
    background: var(--info-bg);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-neutral {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-secondary {
    background: var(--bg-subtle, rgba(148, 163, 184, 0.12));
    color: var(--text-main, #334155);
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.25));
}

/* ==========================================================================
   KKP Group Cards Modern UI
   ========================================================================== */
.kkp-group-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, rgba(226, 232, 240, 0.85));
    border-radius: 18px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.kkp-group-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(99, 102, 241, 0.16), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
    border-color: rgba(99, 102, 241, 0.35);
}

.kkp-group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary, #6366f1), #a855f7);
    border-radius: 0 0 4px 4px;
    opacity: 0.9;
}

.kkp-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-subtle, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    padding: 5px 12px 5px 6px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.kkp-member-chip:hover {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.3);
}

.kkp-member-chip.is-leader {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}

.kkp-member-chip .avatar-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #6366f1), #4f46e5);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    font-weight: 800;
    flex-shrink: 0;
}

.kkp-member-chip.is-leader .avatar-circle {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.kkp-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    background: var(--bg-subtle, rgba(0, 0, 0, 0.03));
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kkp-action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary, #6366f1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
}

.kkp-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}


/* ==========================================================================
   Authentication View (Ultra-Modern Premium Glassmorphism)
   ========================================================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 10%, #0d1326 0%, #070a14 55%, #03050a 100%);
}

/* Ambient Floating Mesh Orbs */
.auth-mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
    animation: authOrbFloat 14s ease-in-out infinite alternate;
}

.auth-mesh-orb.orb-1 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(139, 92, 246, 0.15) 50%, transparent 70%);
    top: -140px;
    left: -100px;
}

.auth-mesh-orb.orb-2 {
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.28) 0%, rgba(59, 130, 246, 0.12) 50%, transparent 70%);
    bottom: -120px;
    right: -80px;
    animation-delay: -5s;
}

.auth-mesh-orb.orb-3 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, rgba(168, 85, 247, 0.08) 50%, transparent 70%);
    top: 40%;
    left: 60%;
    animation-delay: -9s;
}

@keyframes authOrbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -35px) scale(1.08); }
    100% { transform: translate(-25px, 20px) scale(0.96); }
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(32px) saturate(190%);
    -webkit-backdrop-filter: blur(32px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 28px;
    padding: 42px 36px 36px;
    box-shadow: 
        0 30px 60px -12px rgba(0, 0, 0, 0.8), 
        0 0 0 1px rgba(99, 102, 241, 0.2), 
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-align: center;
    position: relative;
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card-glow-border {
    position: absolute;
    inset: -1px;
    border-radius: 29px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), transparent 45%, rgba(6, 182, 212, 0.3));
    pointer-events: none;
    z-index: -1;
    opacity: 0.7;
}

.auth-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.auth-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.auth-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    width: 100%;
}

.auth-logo-badge {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 12px;
    box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    transition: transform 0.3s ease;
}

.auth-logo-badge:hover {
    transform: scale(1.04) rotate(1deg);
}

.auth-logo-halo {
    position: absolute;
    inset: -4px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(6, 182, 212, 0.3));
    z-index: -1;
    filter: blur(8px);
    opacity: 0.8;
}

.auth-logo-title {
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 2px;
    color: var(--text-main);
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
}

.auth-logo-accent {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card p.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 4px;
    margin-bottom: 26px;
    padding: 0 8px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrapper .form-control {
    width: 100%;
    padding: 13px 44px 13px 16px;
    font-size: 0.94rem;
    background: rgba(11, 17, 33, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text-main);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-input-wrapper .form-control:focus {
    background: rgba(15, 23, 42, 0.95);
    border-color: #6366f1;
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.22);
    outline: none;
}

.auth-input-icon-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-input-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-auth-submit {
    width: 100%;
    margin-top: 14px;
    padding: 14px 22px;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth-submit-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.btn-auth-submit-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -4px rgba(99, 102, 241, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
}

.btn-auth-submit:hover .btn-auth-submit-shine {
    left: 150%;
}

.btn-auth-submit:active {
    transform: translateY(0) scale(0.98);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 16px;
    gap: 12px;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.auth-divider-text {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.btn-auth-face {
    width: 100%;
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-main);
    border: 1.5px solid rgba(99, 102, 241, 0.35);
    backdrop-filter: blur(12px);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.1);
}

.btn-auth-face-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.25s ease, background 0.25s ease;
}

.face-live-pulse {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #06b6d4;
    box-shadow: 0 0 8px #06b6d4;
    animation: pulseDot 1.8s infinite;
}

.btn-auth-face-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-auth-face-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #f8fafc;
}

.btn-auth-face-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-auth-face-arrow {
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform 0.25s ease, color 0.25s ease;
}

.btn-auth-face:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.14));
    border-color: rgba(99, 102, 241, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.28);
}

.btn-auth-face:hover .btn-auth-face-icon-wrap {
    transform: scale(1.08);
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
}

.btn-auth-face:hover .btn-auth-face-arrow {
    color: #38bdf8;
    transform: translateX(3px);
}

.btn-auth-face:active {
    transform: translateY(0);
}

.auth-security-badge {
    margin-top: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    font-size: 0.74rem;
    font-weight: 500;
}

.auth-footer-copyright {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Light Theme Auth Enhancements */
[data-theme="light"] .auth-wrapper {
    background: radial-gradient(circle at 50% 10%, #f1f5f9 0%, #e2e8f0 55%, #cbd5e1 100%);
}

[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .auth-card-glow-border {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), transparent 45%, rgba(6, 182, 212, 0.2));
}

[data-theme="light"] .auth-input-wrapper .form-control {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .auth-input-wrapper .form-control:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.16);
}

[data-theme="light"] .btn-auth-face {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-auth-face-title {
    color: #0f172a;
}

[data-theme="light"] .btn-auth-face:hover {
    background: #f1f5f9;
    border-color: #6366f1;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .auth-divider-line {
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.12), transparent);
}

[data-theme="light"] .auth-security-badge {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

/* Face Recognition & Biometric Scanner Modal */
.face-scanner-wrap {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.face-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0b0f19;
    display: flex;
    align-items: center;
    justify-content: center;
}

.face-video-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.face-scanner-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.face-scanner-oval {
    width: 180px;
    height: 230px;
    border-radius: 50% / 45%;
    border: 2px dashed rgba(99, 102, 241, 0.6);
    position: relative;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
    transition: all 0.3s ease;
}

.face-scanner-oval.detected {
    border: 2.5px solid #22c55e;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 25px rgba(34, 197, 94, 0.6);
}

.face-scanner-oval.aligning {
    border: 2.5px solid #f59e0b;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.4);
}

.face-scanner-beam {
    position: absolute;
    top: 0;
    left: 5%;
    width: 90%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #6366f1, #38bdf8, transparent);
    box-shadow: 0 0 14px #38bdf8, 0 0 24px #6366f1;
    border-radius: 50%;
    animation: faceScanLaser 2.2s infinite ease-in-out;
}

.face-scanner-oval.detected .face-scanner-beam {
    background: linear-gradient(90deg, transparent, #22c55e, #86efac, transparent);
    box-shadow: 0 0 14px #22c55e, 0 0 24px #4ade80;
}

@keyframes faceScanLaser {
    0% { top: 5%; opacity: 0.2; }
    50% { top: 92%; opacity: 1; }
    100% { top: 5%; opacity: 0.2; }
}

.face-scanner-status {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #f8fafc;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.face-scanner-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    animation: statusPulse 1.2s infinite;
}

.face-scanner-status.success .status-dot {
    background: #22c55e;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}

@media (max-width: 480px) {
    .face-scanner-wrap {
        max-width: 100%;
        border-radius: 16px;
    }
    .face-video-container {
        aspect-ratio: 1 / 1;
        min-height: 270px;
    }
    .face-scanner-oval {
        width: 155px;
        height: 200px;
    }
    .face-scanner-status {
        bottom: 10px;
        padding: 5px 12px;
        font-size: 0.74rem;
        max-width: 92%;
        white-space: normal;
        text-align: center;
        border-radius: 12px;
    }
}

.profile-face-card {
    transition: all 0.2s ease;
}
.profile-face-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
}


/* ==========================================================================
   Layout: Sidebar & Main Content
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    z-index: 50;
    transition: var(--transition);
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    padding: 6px 4px 16px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
    gap: 12px;
}

.brand-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    user-select: none;
}

.brand-actions-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sidebar-nav {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    user-select: none;
    -webkit-user-select: none;
}

.nav-link * {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(99, 102, 241, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.sidebar-pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #ffffff;
    border-radius: 9999px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
    line-height: 1;
    flex-shrink: 0;
    margin-left: auto;
    transition: var(--transition);
}

.sidebar-pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #ffffff;
    border-radius: 9999px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
    line-height: 1;
    flex-shrink: 0;
    margin-left: auto;
    transition: var(--transition);
}

/* =========================================================================
   DESKTOP COLLAPSED SIDEBAR (MINIMALIST / ICON-ONLY MODE)
   ========================================================================= */
.sidebar.collapsed {
    width: 78px !important;
    padding: 20px 10px !important;
    align-items: center !important;
}

/* 1. Header & Actions in Collapsed State */
.sidebar.collapsed .sidebar-brand {
    padding: 4px 0 16px !important;
    margin-bottom: 16px !important;
    align-items: center !important;
    width: 100% !important;
}

.sidebar.collapsed .brand-header-row {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
}

.sidebar.collapsed .brand-title,
.sidebar.collapsed .sidebar-brand-status {
    display: none !important;
}

.sidebar.collapsed .brand-actions-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
}

.sidebar.collapsed .btn-theme-toggle,
.sidebar.collapsed .btn-hamburger {
    width: 40px !important;
    height: 40px !important;
    border-radius: var(--radius-md) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 2. Navigation Items in Collapsed State */
.sidebar.collapsed .sidebar-nav {
    width: 100% !important;
    align-items: center !important;
    gap: 8px !important;
}

.sidebar.collapsed .sidebar-nav li {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

.sidebar.collapsed .nav-link {
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: var(--radius-md) !important;
    position: relative !important;
    gap: 0 !important;
}

.sidebar.collapsed .nav-link span {
    display: none !important;
}

.sidebar.collapsed .nav-link div {
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0 !important;
}

.sidebar.collapsed .nav-link i,
.sidebar.collapsed .nav-link svg {
    width: 20px !important;
    height: 20px !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.sidebar.collapsed .sidebar-pending-badge {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    min-width: 16px !important;
    height: 16px !important;
    font-size: 0.62rem !important;
    padding: 1px 4px !important;
    border-radius: 9999px !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.6) !important;
    margin-left: 0 !important;
}

/* 3. User Info & Logout in Collapsed State */
.sidebar.collapsed .sidebar-user {
    width: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 16px !important;
    gap: 10px !important;
}

.sidebar.collapsed .user-info {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    flex: none !important;
    border-radius: 12px !important;
}

.sidebar.collapsed .user-details,
.sidebar.collapsed .user-name,
.sidebar.collapsed .user-role {
    display: none !important;
}

.sidebar.collapsed .user-avatar {
    width: 38px !important;
    height: 38px !important;
    margin: 0 auto !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
}

.sidebar.collapsed .sidebar-logout-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    margin: 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 4. Main Wrapper Smooth Transition & Expansion */
.main-wrapper {
    flex: 1;
    margin-left: 280px;
    padding: 32px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-wrapper.expanded {
    margin-left: 78px !important;
}

.sidebar-user {
    padding-top: 14px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    flex: 1;
    min-width: 0;
    user-select: none;
    border: 1px solid transparent;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
    transform: translateY(-1px);
}

[data-theme="light"] .user-info:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.sidebar-logout-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    outline: none;
}

.sidebar-logout-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
    transform: translateY(-2px) scale(1.04);
}

.sidebar-logout-btn:active {
    transform: translateY(0) scale(0.98);
}

[data-theme="light"] .sidebar-logout-btn {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

[data-theme="light"] .sidebar-logout-btn:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.user-details {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

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

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 20px;
    flex-wrap: nowrap;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.top-action-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.top-action-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}

.mobile-only-btn {
    display: none;
}

.top-bar-title {
    min-width: 0;
}

.top-bar-title h1 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    line-height: 1.25;
    color: var(--text-main);
}

.top-bar-title p {
    color: var(--text-muted);
    font-size: 0.885rem;
    line-height: 1.45;
    margin: 0;
}

/* ==========================================================================
   Dashboard Metrics Widgets
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
}

.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.metric-icon.indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}
.metric-icon.emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
.metric-icon.amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
.metric-icon.rose {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.metric-content h3 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.metric-content span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.students-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

/* ==========================================================================
   FullCalendar Custom Dark Glass Overrides
   ========================================================================== */
.fc {
    font-family: var(--font-body);
}

.fc-theme-standard .fc-scrollgrid {
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.fc-theme-standard th, .fc-theme-standard td {
    border-color: var(--glass-border) !important;
}

.fc .fc-toolbar-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
}

.fc .fc-button {
    background: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px !important;
    transition: var(--transition);
}

.fc .fc-button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.fc .fc-button-active, .fc .fc-button-primary:not(:disabled):active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5) !important;
}

.fc-daygrid-day-number {
    color: var(--text-muted) !important;
    font-weight: 600;
    padding: 8px !important;
}

.fc-day-today {
    background: rgba(99, 102, 241, 0.08) !important;
}

.fc-event {
    border-radius: 6px !important;
    padding: 2px 6px !important;
    font-size: 0.825rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    border: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.fc-event:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* ==========================================================================
   Tables & Data Grid
   ========================================================================== */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Base .table class for all data tables */
.table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.88rem;
}

.table thead th {
    background: rgba(15, 23, 42, 0.55);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 14px;
    border-bottom: 2px solid var(--glass-border);
    white-space: nowrap;
}

.table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    color: var(--text-main);
}

.table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

[data-theme="light"] .table thead th {
    background: #f1f5f9;
    color: #475569;
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .table tbody td {
    border-bottom-color: #f1f5f9;
    color: #0f172a;
}

[data-theme="light"] .table tbody tr:hover td {
    background: #f8fafc;
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.custom-table th {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 18px;
    border-bottom: 1px solid var(--glass-border);
}

.custom-table th:first-child {
    border-top-left-radius: var(--radius-md);
}
.custom-table th:last-child {
    border-top-right-radius: var(--radius-md);
}

.custom-table td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.925rem;
    vertical-align: middle;
    transition: var(--transition);
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.custom-table tr:last-child td {
    border-bottom: none;
}

/* Checkbox Style */
.custom-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ==========================================================================
   Progress Bar & Analytics
   ========================================================================== */
.progress-track {
    width: 100%;
    height: 12px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 29, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000000 !important;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Ensure SweetAlert2 confirmation & alert popups always display in front of open modals */
.swal2-container {
    z-index: 1000005 !important;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #111827;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 650px;
    max-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
    transform: scale(0.95);
    transition: transform 0.25s ease;
    margin: auto;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    background: inherit;
}

.modal-header h3,
#appModalTitle {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    line-height: 1.35;
    word-break: break-word;
}

.modal-body {
    padding: 22px 24px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-shrink: 0;
    margin-top: auto;
    z-index: 10;
    position: relative;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.35rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-close:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(90deg);
}



/* ==========================================================================
   Responsive Adaptations & Modern Hamburger Sidebar Navigation
   ========================================================================== */
.btn-theme-toggle,
.btn-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #f59e0b;
    color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.35);
    transform: scale(1.05);
}

.btn-hamburger:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.35);
    transform: scale(1.05);
}

[data-theme="light"] .btn-theme-toggle,
[data-theme="light"] .btn-hamburger {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

[data-theme="light"] .btn-theme-toggle:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #b45309;
}

[data-theme="light"] .btn-hamburger:hover {
    background: #e0e7ff;
    border-color: #6366f1;
    color: #4338ca;
}

/* ==========================================================================
   Desktop: Mini Sidebar (Icon-Only Collapsed Mode)
   ========================================================================== */
@media (min-width: 1025px) {
    .mobile-only-btn {
        display: none !important;
    }

    .sidebar {
        width: 280px;
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
        overflow-x: hidden;
    }

    .sidebar.collapsed {
        width: 78px !important;
        padding: 20px 8px !important;
    }

    .sidebar.collapsed .brand-header-row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .sidebar.collapsed .brand-title {
        display: none !important;
    }

    .sidebar.collapsed .brand-actions-group {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    .sidebar.collapsed .brand-telegram-status {
        display: none !important;
    }

    .sidebar.collapsed .sidebar-nav .nav-link {
        justify-content: center;
        padding: 12px 0;
        gap: 0;
    }

    .sidebar.collapsed .sidebar-nav .nav-link span {
        display: none !important;
    }

    .sidebar.collapsed .sidebar-user {
        justify-content: center;
        padding: 12px 0 0;
    }

    .sidebar.collapsed .sidebar-user .user-details,
    .sidebar.collapsed .sidebar-user .btn-close {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 280px;
        width: calc(100% - 280px);
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .main-wrapper.expanded {
        margin-left: 78px !important;
        width: calc(100% - 78px) !important;
    }
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 45;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   Responsive Grid & Action Helpers
   ========================================================================== */
.top-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.assignment-cards-grid,
.student-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.course-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .mobile-only-btn {
        display: inline-flex !important;
    }
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        z-index: 100;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }
    .main-wrapper {
        margin-left: 0 !important;
        padding: 16px 12px calc(96px + env(safe-area-inset-bottom, 16px)) 12px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 20px;
    }
    .top-bar-left {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
    }
    .top-bar-title h1 {
        font-size: 1.3rem;
        word-break: break-word;
    }
    .top-bar-title p {
        font-size: 0.8rem;
    }
    .top-bar-right {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
        justify-content: flex-start;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
}

.settings-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.settings-actions-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 900px) {
    .course-layout-grid,
    .settings-grid-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.submissions-desktop-view,
.students-desktop-view,
.courses-classes-desktop-view {
    display: block;
}

.submissions-mobile-view,
.students-mobile-view,
.courses-classes-mobile-view,
.courses-mobile-tabs,
.mobile-top-header,
.mobile-bottom-nav {
    display: none;
}

.subtabs-switcher-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.subtabs-switcher-group .btn {
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Assignments Main Switcher (Approval vs Kelola Tugas) */
.assignments-main-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--bg-surface);
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}
.assignments-main-switcher .btn {
    flex: 1;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}


/* Hide mobile bottom sheets and mobile elements globally on desktop */
.mob-action-sheet,
.mob-action-backdrop {
    display: none;
}

@media (min-width: 769px) {
    .mobile-top-header,
    .mobile-bottom-nav,
    .mob-action-sheet,
    .mob-action-backdrop,
    .mob-center-bump,
    .mob-radial-menu,
    .submissions-mobile-view,
    .students-mobile-view,
    .courses-classes-mobile-view,
    .courses-mobile-tabs {
        display: none !important;
    }
    .submissions-desktop-view,
    .students-desktop-view,
    .courses-classes-desktop-view {
        display: block !important;
    }
    /* Hide sidebar hamburger button on desktop as requested */
    .sidebar .btn-hamburger,
    #sidebarBrandHamburgerBtn {
        display: none !important;
    }
}

/* ==========================================================================
   Mobile-Specific App Layout (Top Profile Header + Bottom Navigation Bar)
   ========================================================================== */
@media (max-width: 768px) {
    /* Completely disable and hide drawer sidebar on mobile screens */
    .sidebar,
    .sidebar.mobile-open {
        display: none !important;
    }
    .sidebar-backdrop,
    .sidebar-backdrop.active {
        display: none !important;
    }
    .mobile-only-btn {
        display: none !important;
    }

    /* Hide desktop notification bell in top-bar on mobile (already present in fixed mobile-top-header) */
    #dosenNotificationWrap,
    #mhsNotificationWrap,
    .desktop-only-bell,
    .top-bar-right #dosenNotificationWrap,
    .top-bar-right #mhsNotificationWrap,
    .top-bar #dosenNotificationWrap,
    .top-bar #mhsNotificationWrap {
        display: none !important;
    }

    .app-layout {
        display: block !important;
        min-height: 100vh !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative !important;
    }

    /* Fixed Mobile Top App Header (Never moves on scroll) */
    .mobile-top-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 48px !important;
        z-index: 1000 !important;
        padding: 0 8px !important;
        box-sizing: border-box !important;
        background: rgba(15, 23, 42, 0.94) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid var(--glass-border) !important;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12) !important;
    }

    [data-theme="light"] .mobile-top-header {
        background: rgba(255, 255, 255, 0.96) !important;
        border-bottom-color: rgba(15, 23, 42, 0.08) !important;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04) !important;
    }

    .mobile-top-left {
        display: flex;
        align-items: center;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }

    .mobile-brand-title {
        font-size: 0.92rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        white-space: nowrap;
        background: linear-gradient(135deg, #6366f1, #06b6d4);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    [data-theme="light"] .mobile-brand-title {
        background: linear-gradient(135deg, #4f46e5, #0891b2);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .mobile-top-right {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }

    .mobile-theme-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        max-width: 28px;
        border-radius: 7px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: var(--glass-bg, rgba(255, 255, 255, 0.06));
        border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.12));
        color: var(--text-main, #f8fafc);
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-theme-btn:hover {
        background: var(--primary-light, rgba(99, 102, 241, 0.15));
        border-color: var(--primary, #6366f1);
        color: var(--primary, #6366f1);
    }

    .mobile-theme-btn:active {
        transform: scale(0.94);
    }

    [data-theme="light"] .mobile-theme-btn {
        background: #ffffff !important;
        border-color: #cbd5e1 !important;
        color: #334155 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    #dosenMobileNotificationWrap,
    #mhsMobileNotificationWrap {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        flex-shrink: 0;
    }

    #dosenMobileNotificationWrap .notification-bell-btn,
    #mhsMobileNotificationWrap .notification-bell-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        max-width: 28px;
        border-radius: 7px;
        flex-shrink: 0;
    }

    .mobile-tg-badge .tg-status-pill {
        padding: 2px 7px;
        font-size: 0.64rem;
    }

    .mobile-user-chip {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 6px 2px 2px;
        border-radius: 9999px;
        background: rgba(99, 102, 241, 0.1);
        border: 1px solid rgba(99, 102, 241, 0.25);
        cursor: pointer;
        transition: all 0.2s ease;
        flex-shrink: 1;
        min-width: 0;
        max-width: 170px;
        overflow: hidden;
    }

    [data-theme="light"] .mobile-user-chip {
        background: rgba(99, 102, 241, 0.06);
        border-color: rgba(99, 102, 241, 0.2);
    }

    .mobile-user-chip:active {
        transform: scale(0.96);
    }

    .mobile-user-avatar {
        width: 22px;
        height: 22px;
        min-width: 22px;
        max-width: 22px;
        border-radius: 50%;
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        color: #ffffff;
        font-weight: 700;
        font-size: 0.70rem;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 1px 4px rgba(99, 102, 241, 0.25);
    }

    .mobile-user-meta {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
        overflow: hidden;
        min-width: 0;
        flex: 1;
        gap: 1px;
    }

    .mobile-user-name-row {
        display: flex;
        align-items: center;
        gap: 3px;
        min-width: 0;
    }

    .mobile-user-name {
        font-size: 0.65rem;
        font-weight: 700;
        color: var(--text-main);
        max-width: 76px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-user-tg-status {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
    }

    .mobile-user-badge,
    .mobile-user-chip .mobile-user-badge,
    .mobile-user-chip .ketua-badge-glow {
        font-size: 0.54rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        background: linear-gradient(135deg, #6366f1, #4f46e5);
        padding: 1px 5px !important;
        border-radius: 9999px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 2px !important;
        width: fit-content !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        letter-spacing: 0.2px !important;
        line-height: 1.15 !important;
        box-shadow: none !important;
        transition: all 0.2s ease;
    }

    .mobile-user-badge.student-badge {
        background: linear-gradient(135deg, #10b981, #059669) !important;
    }

    .mobile-user-badge.unverified-user-badge {
        background: rgba(245, 158, 11, 0.18) !important;
        color: #fbbf24 !important;
        border: 1px solid rgba(245, 158, 11, 0.4) !important;
    }

    .mobile-user-badge.verified-user-badge {
        box-shadow: 0 0 6px rgba(56, 189, 248, 0.25) !important;
    }

    .mobile-logout-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        max-width: 28px;
        border-radius: 7px;
        background: rgba(239, 68, 68, 0.12);
        color: #ef4444;
        border: 1px solid rgba(239, 68, 68, 0.25);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: var(--transition);
        flex-shrink: 0 !important;
    }

    .mobile-logout-btn:hover {
        background: rgba(239, 68, 68, 0.2);
        color: #dc2626;
        border-color: #ef4444;
    }

    .mobile-logout-btn:active {
        transform: scale(0.94);
    }

    [data-theme="light"] .mobile-logout-btn {
        background: #fef2f2 !important;
        border-color: #fecaca !important;
        color: #dc2626 !important;
    }

    /* Mobile Screen (<= 480px) - Keep User Name & Telegram Status cleanly displayed without crowding */
    @media (max-width: 480px) {
        .mobile-top-header {
            padding: 0 6px !important;
            height: 48px !important;
        }
        .mobile-brand-title {
            font-size: 0.88rem !important;
        }
        .mobile-top-right {
            gap: 3px !important;
        }
        #dosenMobileNotificationWrap,
        #mhsMobileNotificationWrap {
            margin: 0 !important;
        }
        .mobile-user-chip {
            display: inline-flex !important;
            align-items: center !important;
            gap: 3px !important;
            padding: 2px 5px 2px 2px !important;
            border-radius: 9999px !important;
            background: rgba(99, 102, 241, 0.1) !important;
            border: 1px solid rgba(99, 102, 241, 0.25) !important;
            max-width: 165px !important;
            overflow: hidden !important;
            flex-shrink: 1 !important;
            min-width: 0 !important;
        }
        .mobile-user-avatar {
            width: 21px !important;
            height: 21px !important;
            min-width: 21px !important;
            max-width: 21px !important;
            font-size: 0.66rem !important;
            border: 1px solid rgba(99, 102, 241, 0.35);
        }
        .mobile-user-meta {
            display: flex !important;
            flex-direction: column !important;
            line-height: 1.1 !important;
            min-width: 0 !important;
            overflow: hidden !important;
            flex: 1 !important;
            gap: 1px !important;
        }
        .mobile-user-name {
            font-size: 0.63rem !important;
            font-weight: 700 !important;
            max-width: 70px !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }
        .mobile-user-badge,
        .mobile-user-chip .mobile-user-badge,
        .mobile-user-chip .ketua-badge-glow {
            font-size: 0.52rem !important;
            font-weight: 700 !important;
            padding: 1px 4.5px !important;
            gap: 2px !important;
            white-space: nowrap !important;
            max-width: 100% !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }
        .mobile-theme-btn,
        .mobile-logout-btn,
        #dosenMobileNotificationWrap .notification-bell-btn,
        #mhsMobileNotificationWrap .notification-bell-btn {
            width: 27px !important;
            height: 27px !important;
            min-width: 27px !important;
            max-width: 27px !important;
            border-radius: 7px !important;
            flex-shrink: 0 !important;
        }
    }

    /* ==========================================================================
       Mobile Bottom Navigation Bar & Semi-Circular Radial Arc Menu (v2.7.6)
       ========================================================================== */
    .mob-radial-backdrop {
        display: none;
    }

    .mob-radial-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(10, 15, 29, 0.65);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mob-radial-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    [data-theme="light"] .mob-radial-backdrop {
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    /* Floating Capsule Bottom Nav - Match Modern Mobile Pill Design */
    .mobile-bottom-nav {
        display: flex !important;
        align-items: center;
        justify-content: space-around;
        position: fixed;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        right: 12px;
        width: auto;
        max-width: 400px;
        margin: 0 auto;
        height: 52px;
        padding: 0 4px;
        box-sizing: border-box;
        background: #ffffff;
        border-radius: 26px;
        box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(0, 0, 0, 0.06);
        z-index: 1000;
        transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    }

    [data-theme="dark"] .mobile-bottom-nav {
        background: rgba(15, 23, 42, 0.94);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(0, 0, 0, 0.3);
    }

    /* Center Wave SVG Bump - Smooth Organic Dome */
    .mob-center-bump {
        position: absolute;
        top: -18px;
        left: 50%;
        transform: translateX(-50%);
        width: 110px;
        height: 20px;
        pointer-events: none;
        z-index: 1;
        color: #ffffff;
        transition: color 0.3s ease, opacity 0.25s ease;
    }

    [data-theme="dark"] .mob-center-bump {
        color: rgba(15, 23, 42, 0.94);
    }

    .mob-center-bump svg {
        width: 100%;
        height: 100%;
        display: block;
    }

    /* Focus on floating menu: Blur and fade background navbar items when radial menu is open */
    .mobile-bottom-nav.radial-open {
        background: rgba(255, 255, 255, 0.35) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
        box-shadow: none !important;
    }

    [data-theme="dark"] .mobile-bottom-nav.radial-open {
        background: rgba(15, 23, 42, 0.35) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
        box-shadow: none !important;
    }

    .mobile-bottom-nav.radial-open .mob-center-bump {
        opacity: 0.2;
    }

    .mobile-bottom-nav.radial-open .mob-nav-link,
    .mobile-bottom-nav.radial-open .mob-center-label {
        filter: blur(4px);
        opacity: 0.12;
        transform: scale(0.88);
        pointer-events: none;
    }

    .mob-nav-link {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 4px 0;
        color: #94a3b8;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 14px;
        position: relative;
        z-index: 2;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    [data-theme="dark"] .mob-nav-link {
        color: #64748b;
    }

    .mob-nav-link:active {
        transform: scale(0.92);
    }

    .mob-nav-icon-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 22px;
        border-radius: 11px;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        background: transparent;
    }

    .mob-nav-link.active .mob-nav-icon-wrapper {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.22));
        color: #4f46e5;
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(99, 102, 241, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(99, 102, 241, 0.25);
        animation: mobIconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    [data-theme="dark"] .mob-nav-link.active .mob-nav-icon-wrapper {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.32), rgba(139, 92, 246, 0.4));
        color: #c7d2fe;
        box-shadow: 0 3px 14px rgba(99, 102, 241, 0.45), 0 0 10px rgba(139, 92, 246, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(165, 180, 252, 0.45);
    }

    @keyframes mobIconPop {
        0% {
            transform: translateY(0) scale(0.82);
        }
        50% {
            transform: translateY(-3px) scale(1.12);
        }
        75% {
            transform: translateY(-1px) scale(0.97);
        }
        100% {
            transform: translateY(-1px) scale(1);
        }
    }

    .mob-nav-link.active svg {
        filter: drop-shadow(0 2px 5px rgba(99, 102, 241, 0.35));
        stroke-width: 2.2px !important;
    }

    [data-theme="dark"] .mob-nav-link.active svg {
        filter: drop-shadow(0 2px 6px rgba(165, 180, 252, 0.5));
    }

    .mob-nav-label {
        font-size: 0.60rem;
        font-weight: 500;
        letter-spacing: 0.1px;
        transition: all 0.25s ease;
        white-space: nowrap;
    }

    .mob-nav-link.active .mob-nav-label {
        color: #4f46e5;
        font-weight: 700;
        letter-spacing: 0.15px;
    }

    [data-theme="dark"] .mob-nav-link.active .mob-nav-label {
        color: #e0e7ff;
        text-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
    }

    /* Glowing Dynamic Underline Indicator Pill */
    .mob-nav-link::after {
        content: '';
        position: absolute;
        bottom: 2px;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: 16px;
        height: 3px;
        border-radius: 9999px;
        background: linear-gradient(90deg, #6366f1, #a855f7);
        opacity: 0;
        transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
        box-shadow: 0 0 8px rgba(99, 102, 241, 0.7);
    }

    .mob-nav-link.active::after {
        transform: translateX(-50%) scaleX(1);
        opacity: 1;
    }

    [data-theme="dark"] .mob-nav-link.active::after {
        background: linear-gradient(90deg, #818cf8, #c084fc);
        box-shadow: 0 0 12px rgba(129, 140, 248, 0.9);
    }

    .mobile-pending-badge {
        position: absolute;
        top: -6px;
        right: -9px;
        background: #ef4444;
        color: #ffffff;
        font-size: 0.6rem;
        font-weight: 800;
        border-radius: 9999px;
        min-width: 16px;
        height: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
        border: 2px solid #ffffff;
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
        line-height: 1;
        z-index: 3;
    }

    [data-theme="dark"] .mobile-pending-badge {
        border-color: #0f172a;
    }

    /* Center Elevated Action Button (FAB) */
    .mob-nav-center-wrapper {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 10;
        top: -12px;
    }

    .mob-nav-fab {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, #6366f1, #7c3aed);
        border: none;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease;
        outline: none;
        padding: 0;
        margin-bottom: 2px;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    .mob-nav-fab:active {
        transform: scale(0.92);
    }

    .mob-fab-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    /* Rotate into × when active / open */
    .mob-nav-fab.active {
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
        box-shadow: 0 8px 22px rgba(239, 68, 68, 0.55) !important;
    }

    .mob-nav-fab.active .mob-fab-icon {
        transform: rotate(135deg);
    }

    .mob-center-label {
        display: none !important;
    }

    .mob-nav-fab.has-active-sub:not(.active) {
        box-shadow: 0 0 22px rgba(99, 102, 241, 0.85), 0 8px 22px rgba(99, 102, 241, 0.5);
        animation: fabAuraPulse 2.4s infinite alternate ease-in-out;
    }

    @keyframes fabAuraPulse {
        0% {
            box-shadow: 0 0 16px rgba(99, 102, 241, 0.5), 0 6px 18px rgba(99, 102, 241, 0.35);
        }
        100% {
            box-shadow: 0 0 28px rgba(139, 92, 246, 0.85), 0 8px 26px rgba(99, 102, 241, 0.6);
        }
    }

    .mob-fab-active-dot {
        position: absolute;
        top: 2px;
        right: 2px;
        width: 11px;
        height: 11px;
        border-radius: 50%;
        background: #10b981;
        border: 2px solid #ffffff;
        display: none;
        box-shadow: 0 0 6px #10b981;
    }

    [data-theme="dark"] .mob-fab-active-dot {
        border-color: #0f172a;
    }

    .mob-nav-fab.has-active-sub:not(.active) .mob-fab-active-dot {
        display: block;
        animation: pulseSubDot 2s infinite;
    }

    @keyframes pulseSubDot {
        0%, 100% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.25); opacity: 0.75; }
    }

    /* Fitur & Layanan Action Bottom Sheet Modal */
    .mob-action-backdrop {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(11, 17, 32, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 10001;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .mob-action-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    .mob-action-sheet {
        display: block !important;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: #0f172a;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 26px 26px 0 0;
        box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.75);
        z-index: 10002;
        transform: translateY(105%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.36s cubic-bezier(0.32, 1, 0.23, 1), visibility 0.36s;
        padding: 12px 16px calc(24px + env(safe-area-inset-bottom, 0px)) 16px;
        max-height: 85vh;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-sizing: border-box;
    }

    [data-theme="light"] .mob-action-sheet {
        background: #ffffff;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.15);
    }

    .mob-action-sheet.active {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .mob-sheet-handle {
        width: 38px;
        height: 4px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 2px;
        margin: 4px auto 14px auto;
    }

    [data-theme="light"] .mob-sheet-handle {
        background: rgba(0, 0, 0, 0.2);
    }

    .mob-sheet-header {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 22px;
    }

    .mob-sheet-title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1.15rem;
        font-weight: 800;
        color: #f8fafc;
        letter-spacing: -0.02em;
    }

    [data-theme="light"] .mob-sheet-title {
        color: #0f172a;
    }

    .mob-sheet-title-icon {
        display: inline-flex;
        vertical-align: middle;
    }

    .mob-sheet-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px 8px;
        padding: 0 4px 18px 4px;
        max-width: 440px;
        margin: 0 auto;
    }

    .mob-grid-item {
        background: transparent;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 2px;
        cursor: pointer;
        outline: none;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .mob-grid-item:active {
        transform: scale(0.92);
    }

    .mob-squircle-icon {
        width: 58px;
        height: 58px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.2s ease;
    }

    .mob-grid-label {
        font-size: 0.72rem;
        font-weight: 600;
        color: #cbd5e1;
        text-align: center;
        white-space: nowrap;
        letter-spacing: 0.1px;
    }

    [data-theme="light"] .mob-grid-label {
        color: #334155;
    }

    /* Squircle Color Themes */
    .squircle-purple {
        background: rgba(99, 102, 241, 0.14);
        border: 1.5px solid rgba(129, 140, 248, 0.32);
        color: #818cf8;
    }
    [data-theme="light"] .squircle-purple {
        background: #eef2ff;
        border-color: #c7d2fe;
        color: #4f46e5;
    }

    .squircle-green {
        background: rgba(16, 185, 129, 0.14);
        border: 1.5px solid rgba(52, 211, 153, 0.32);
        color: #34d399;
    }
    [data-theme="light"] .squircle-green {
        background: #ecfdf5;
        border-color: #a7f3d0;
        color: #059669;
    }

    .squircle-red {
        background: rgba(239, 68, 68, 0.14);
        border: 1.5px solid rgba(248, 113, 113, 0.32);
        color: #f87171;
    }
    [data-theme="light"] .squircle-red {
        background: #fef2f2;
        border-color: #fecaca;
        color: #dc2626;
    }

    .squircle-cyan {
        background: rgba(6, 182, 212, 0.14);
        border: 1.5px solid rgba(34, 211, 238, 0.32);
        color: #22d3ee;
    }
    [data-theme="light"] .squircle-cyan {
        background: #ecfeff;
        border-color: #a5f3fc;
        color: #0891b2;
    }

    .squircle-indigo {
        background: rgba(79, 70, 229, 0.14);
        border: 1.5px solid rgba(99, 102, 241, 0.32);
        color: #a5b4fc;
    }
    [data-theme="light"] .squircle-indigo {
        background: #e0e7ff;
        border-color: #c7d2fe;
        color: #4338ca;
    }

    .squircle-pink {
        background: rgba(244, 63, 94, 0.14);
        border: 1.5px solid rgba(251, 113, 133, 0.32);
        color: #fb7185;
    }
    [data-theme="light"] .squircle-pink {
        background: #fff1f2;
        border-color: #fecdd3;
        color: #e11d48;
    }

    .squircle-blue {
        background: rgba(59, 130, 246, 0.14);
        border: 1.5px solid rgba(96, 165, 250, 0.32);
        color: #60a5fa;
    }
    [data-theme="light"] .squircle-blue {
        background: #eff6ff;
        border-color: #bfdbfe;
        color: #2563eb;
    }

    .squircle-teal {
        background: rgba(20, 184, 166, 0.14);
        border: 1.5px solid rgba(45, 212, 191, 0.32);
        color: #2dd4bf;
    }
    [data-theme="light"] .squircle-teal {
        background: #f0fdfa;
        border-color: #99f6e4;
        color: #0d9488;
    }

    .squircle-orange {
        background: rgba(249, 115, 22, 0.14);
        border: 1.5px solid rgba(251, 146, 60, 0.32);
        color: #fb923c;
    }
    [data-theme="light"] .squircle-orange {
        background: #fff7ed;
        border-color: #fed7aa;
        color: #ea580c;
    }

    .squircle-violet {
        background: rgba(139, 92, 246, 0.14);
        border: 1.5px solid rgba(167, 139, 250, 0.32);
        color: #a78bfa;
    }
    [data-theme="light"] .squircle-violet {
        background: #f5f3ff;
        border-color: #ddd6fe;
        color: #7c3aed;
    }

    .squircle-amber {
        background: rgba(245, 158, 11, 0.14);
        border: 1.5px solid rgba(251, 191, 36, 0.32);
        color: #fbbf24;
    }
    [data-theme="light"] .squircle-amber {
        background: #fffbeb;
        border-color: #fde68a;
        color: #d97706;
    }

    .squircle-sky {
        background: rgba(14, 165, 233, 0.14);
        border: 1.5px solid rgba(56, 189, 248, 0.32);
        color: #38bdf8;
    }
    [data-theme="light"] .squircle-sky {
        background: #f0f9ff;
        border-color: #bae6fd;
        color: #0284c7;
    }

    /* Bottom Center Red Close Button */
    .mob-sheet-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        padding-top: 8px;
        padding-bottom: 6px;
    }

    .mob-sheet-close-btn {
        width: 54px;
        height: 54px;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 35%, #ef4444, #dc2626 65%, #991b1b);
        color: #ffffff;
        border: none;
        box-shadow: 0 0 28px rgba(239, 68, 68, 0.7), 0 6px 18px rgba(0, 0, 0, 0.45);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
        outline: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mob-sheet-close-btn:active {
        transform: scale(0.9);
    }

    .thesis-only-bottom-nav {
        justify-content: space-around !important;
        max-width: 300px !important;
        padding: 0 16px !important;
    }

    /* Mobile Hamburger disabled on mobile */
    .mobile-hamburger-btn {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        padding-top: 70px !important;
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        min-height: 100vh !important;
        overflow-y: visible !important;
    }

    /* Side-by-side subtabs on mobile (Menunggu & Riwayat) */
    .subtabs-switcher-group {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .subtabs-switcher-group .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 8px 6px !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
        letter-spacing: -0.01em !important;
    }

    /* Side-by-side main assignments switcher on mobile */
    .assignments-main-switcher {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        padding: 4px !important;
        margin-bottom: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .assignments-main-switcher .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 8px 4px !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
        letter-spacing: -0.01em !important;
        box-sizing: border-box !important;
    }
    .assignments-main-switcher .btn span:not(.badge) {
        overflow: hidden;
        text-overflow: ellipsis;
    }


    /* Settings subtabs icon-only horizontal row on mobile */
    .settings-subtabs-nav {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        width: 100% !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        margin-bottom: 16px !important;
    }
    .settings-subtabs-nav .settings-tab-text {
        display: none !important;
    }
    .settings-subtab-btn {
        flex: 1 !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 10px 0 !important;
        border-radius: 12px !important;
        height: 44px !important;
        min-width: 0 !important;
    }

    /* Metric cards: Exactly 2 rows with 2 cards each (2 bar, 2 data per bar) */
    .metrics-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }
    .metric-card {
        padding: 12px 10px !important;
        gap: 10px !important;
        border-radius: 14px !important;
        min-width: 0 !important;
    }
    .metric-icon {
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
        font-size: 1.15rem !important;
        flex-shrink: 0 !important;
    }
    .metric-content {
        min-width: 0 !important;
        overflow: hidden !important;
    }
    .metric-content h3 {
        font-size: 1.25rem !important;
        margin-bottom: 2px !important;
    }
    .metric-content span {
        font-size: 0.72rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    /* Mobile Courses & Classes Tabs */
    .courses-mobile-tabs {
        display: flex !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
        width: 100% !important;
    }

    /* Mobile Sub-Tabs Switcher: Menunggu & Riwayat side-by-side grid */
    .subtabs-switcher-group {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 16px !important;
    }
    .subtabs-switcher-group .btn {
        width: 100% !important;
        padding: 8px 8px !important;
        font-size: 0.85rem !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        gap: 6px !important;
    }

    .assignments-main-switcher {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 4px !important;
        margin-bottom: 14px !important;
    }
    .assignments-main-switcher .btn {
        width: 100% !important;
        padding: 8px 4px !important;
        font-size: 0.8rem !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        gap: 4px !important;
    }


    .courses-classes-desktop-view,
    .submissions-desktop-view,
    .students-desktop-view {
        display: none !important;
    }
    .courses-classes-mobile-view,
    .submissions-mobile-view,
    .students-mobile-view {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .course-layout-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .course-layout-grid[data-active-mobile-subtab="SUBJECTS"] .courses-classes-col {
        display: none !important;
    }
    .course-layout-grid[data-active-mobile-subtab="CLASSES"] .courses-subjects-col {
        display: none !important;
    }

    /* Student Stats Grid: 2 rows with 2 cards per row on mobile (2 bar, tiap bar 2 data) */
    .students-stat-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }
    .students-stat-grid .glass-card {
        padding: 12px 14px !important;
    }
    .students-stat-grid .glass-card > div:first-child {
        font-size: 0.72rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .students-stat-grid .glass-card > div:last-child {
        font-size: 1.25rem !important;
        margin-top: 2px !important;
    }

    /* Anti-overflow container guards on mobile */
    .glass-panel, .glass-card {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        padding: 14px !important;
    }
    .table-responsive {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .assignment-drawer-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .assignment-drawer-header > div:first-child {
        width: 100% !important;
    }
    .assignment-drawer-header > div:last-child {
        width: 100% !important;
    }
    .assignment-drawer-header > div:last-child button {
        width: 100% !important;
        justify-content: center !important;
        padding: 7px 12px !important;
        font-size: 0.82rem !important;
    }

    .settings-grid-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }

    .settings-actions-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        margin-top: 20px !important;
    }
    .settings-actions-group .btn {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .stat-card {
        padding: 12px 14px;
    }
    .stat-card .stat-value {
        font-size: 1.35rem;
    }
    .stat-card .stat-label {
        font-size: 0.75rem;
    }
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    .fc .fc-toolbar-title {
        font-size: 1.1rem !important;
        text-align: center;
    }
    .fc-button {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
    }
    .filter-bar,
    .controls-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .filter-bar .form-control,
    .filter-bar .form-select,
    .filter-bar .btn {
        width: 100% !important;
    }
    .modal-overlay {
        padding: 10px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100dvh - 20px) !important;
        margin: auto !important;
        border-radius: 18px !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    .modal-header {
        padding: 14px 16px !important;
        gap: 10px !important;
        flex-shrink: 0 !important;
    }
    .modal-header h3,
    #appModalTitle {
        font-size: 0.95rem !important;
    }
    .modal-body {
        padding: 16px !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .modal-footer {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) 16px !important;
        flex-direction: column-reverse !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .modal-footer .btn,
    .modal-footer div .btn {
        width: 100% !important;
        justify-content: center !important;
        min-height: 42px !important;
        font-size: 0.9rem !important;
    }
    .modal-footer > div,
    .modal-footer > div > div {
        width: 100% !important;
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: 8px !important;
    }
    .auth-card {
        padding: 30px 18px 24px;
        border-radius: 20px;
    }
    .auth-card h2 {
        font-size: 1.45rem;
    }
    .role-switcher-container {
        padding: 4px;
    }
    .role-tab-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .assignment-cards-grid,
    .student-tasks-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
    .top-action-group {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .top-action-group .btn {
        flex: 1 1 auto;
        font-size: 0.78rem !important;
        padding: 8px 10px !important;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .brand-title {
        font-size: 1.2rem;
    }
    .top-bar-title h1 {
        font-size: 1.15rem;
    }
    .custom-table th,
    .custom-table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Telegram Live Status & Verified Badge in Sidebar
   ========================================================================== */
.brand-telegram-status {
    margin-top: 10px;
    width: 100%;
}

.tg-status-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.775rem;
    font-weight: 500;
    transition: var(--transition);
    gap: 6px;
}

.tg-status-pill.connected {
    background: rgba(0, 136, 204, 0.12);
    border: 1px solid rgba(0, 136, 204, 0.35);
    color: #38bdf8;
}

.tg-status-pill.connected .tg-status-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tg-status-pill.connected .verified-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.5));
}

.tg-status-pill.disconnected {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.tg-status-pill.disconnected .tg-status-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tg-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    display: inline-block;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.btn-tg-connect-mini {
    background: linear-gradient(135deg, #0088cc, #00aced);
    color: #ffffff;
    border: none;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.btn-tg-connect-mini:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.5);
    color: #fff;
}

.btn-tg-unlink-mini {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.7rem;
    transition: var(--transition);
}

.btn-tg-unlink-mini:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.user-tg-verified-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.user-tg-verified-icon.is-verified {
    color: #38bdf8;
    filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.6));
}

.user-tg-verified-icon.is-unverified {
    color: #f59e0b;
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.5));
}

.user-tg-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* Telegram Connect Modal Box */
.tg-connect-card {
    background: rgba(0, 136, 204, 0.08);
    border: 1px solid rgba(0, 136, 204, 0.25);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.tg-connect-card h4 {
    color: #38bdf8;
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.btn-tg-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #0088cc, #0077b5);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.35);
    cursor: pointer;
    border: none;
}

.btn-tg-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.5);
    color: white;
}

/* ==========================================================================
   Modern Wave / Soundwave Equalizer Loading Overlay (Requested Design)
   ========================================================================== */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 99999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.wave-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 64px;
}

.wave-loader .bar {
    width: 9px;
    height: 54px;
    background-color: #ffffff;
    border-radius: 999px;
    transform-origin: center;
    animation: waveBars 1.1s ease-in-out infinite;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

.wave-loader .bar:nth-child(1) {
    animation-delay: -1.0s;
}

.wave-loader .bar:nth-child(2) {
    animation-delay: -0.8s;
}

.wave-loader .bar:nth-child(3) {
    animation-delay: -0.6s;
}

.wave-loader .bar:nth-child(4) {
    animation-delay: -0.8s;
}

.wave-loader .bar:nth-child(5) {
    animation-delay: -1.0s;
}

@keyframes waveBars {
    0%, 100% {
        transform: scaleY(0.35);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

#loadingText {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.02em;
    margin: 0 auto;
    text-align: center !important;
    max-width: 520px;
    width: 90%;
    line-height: 1.55;
    padding: 0 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: loadingPulseText 2s ease-in-out infinite;
}

@keyframes loadingPulseText {
    0%, 100% {
        opacity: 0.85;
    }
    50% {
        opacity: 1;
    }
}

/* =========================================================================
   PWA INSTALLATION BANNER
   ========================================================================= */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999 !important;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 520px;
    width: calc(100% - 32px);
    animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (max-width: 768px) {
    .pwa-install-banner {
        bottom: calc(72px + env(safe-area-inset-bottom));
        padding: 10px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .pwa-install-banner > div:last-child {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    .pwa-install-banner .btn {
        flex: 1;
        justify-content: center;
    }
}

/* =========================================================================
   BUTTON LOADING SPINNER ANIMATION & ICON SPINNING
   ========================================================================= */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: btnSpinAnimation 0.75s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
}

@keyframes btnSpinAnimation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.icon-spin, .spin {
    animation: btnSpinAnimation 0.75s linear infinite !important;
    display: inline-flex !important;
    transform-origin: 50% 50% !important;
}

.btn-refreshing {
    pointer-events: none !important;
    opacity: 0.85 !important;
}

.btn-refreshing .refresh-icon-wrap,
.btn-refreshing svg,
.btn-refreshing i,
.btn-refreshing .icon-spin,
.icon-spin svg {
    display: inline-flex !important;
    animation: btnSpinAnimation 0.75s linear infinite !important;
    transform-origin: 50% 50% !important;
}

.btn:disabled,
button:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    filter: grayscale(15%);
}

/* =========================================================================
   CUSTOM APP LOGO STYLES
   ========================================================================= */
.auth-custom-logo {
    max-height: 175px;
    max-width: 380px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 2px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.28));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-custom-logo:hover {
    transform: scale(1.035);
}

/* =========================================================================
   PDF VIEWER MODAL & ENHANCED MOBILE PREVIEW
   ========================================================================= */
#pdfViewerModal {
    z-index: 1000000 !important;
}

.pdf-viewer-dialog {
    max-width: 960px !important;
    width: 94% !important;
    height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #0f172a;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85);
}

.pdf-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid var(--glass-border);
    gap: 14px;
    flex-shrink: 0;
}

.pdf-viewer-header-text {
    flex: 1;
    min-width: 0;
}

.pdf-viewer-header-text h3 {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.pdf-viewer-header-text span {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
}

.pdf-viewer-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pdf-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    text-decoration: none;
}

.pdf-viewer-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    font-size: 1.35rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}

.pdf-viewer-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    transform: rotate(90deg);
}

.pdf-viewer-body {
    flex: 1;
    padding: 0 !important;
    background: #0b0f19;
    overflow: hidden;
    position: relative;
    display: flex;
}

.pdf-viewer-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

.pdf-viewer-footer {
    padding: 14px 22px;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.pdf-footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 16px;
}

.pdf-footer-student-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.pdf-student-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.pdf-student-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.pdf-student-name {
    font-size: 0.925rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-student-nim {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.pdf-student-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.pdf-status-pill {
    flex-shrink: 0;
}

.pdf-footer-action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pdf-btn-acc,
.pdf-btn-reject {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
}

/* Light Theme Adaptations for PDF Modal */
[data-theme="light"] .pdf-viewer-dialog {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .pdf-viewer-header {
    background: #f8fafc;
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .pdf-viewer-footer {
    background: #f8fafc;
    border-top-color: #e2e8f0;
}

[data-theme="light"] .pdf-viewer-close-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* =========================================================================
   MOBILE RESPONSIVE PDF VIEWER (<= 768px)
   ========================================================================= */
@media (max-width: 768px) {
    #pdfViewerModal {
        padding: 0 !important;
    }

    .pdf-viewer-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        transform: none !important;
    }

    .pdf-viewer-header {
        padding: 10px 14px;
        gap: 10px;
    }

    .pdf-viewer-header-text h3 {
        font-size: 0.925rem;
    }

    .pdf-viewer-header-text span {
        font-size: 0.74rem;
        margin-top: 1px;
    }

    .pdf-tab-btn {
        padding: 6px 10px;
        font-size: 0.76rem;
    }

    .pdf-viewer-close-btn {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
        border-radius: 8px;
    }

    .pdf-viewer-footer {
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }

    .pdf-footer-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .pdf-footer-student-meta {
        background: rgba(255, 255, 255, 0.04);
        padding: 6px 10px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    [data-theme="light"] .pdf-footer-student-meta {
        background: #f1f5f9;
        border-color: #e2e8f0;
    }

    .pdf-student-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        border-radius: 7px;
    }

    .pdf-student-name {
        font-size: 0.825rem;
    }

    .pdf-student-nim {
        font-size: 0.75rem;
    }

    .pdf-footer-action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 8px;
    }

    .pdf-footer-action-buttons .btn {
        width: 100%;
        padding: 11px 10px;
        font-size: 0.875rem;
        font-weight: 600;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
        border-radius: 9px;
        box-sizing: border-box;
    }
}

/* =========================================================================
   CALENDAR FILTER BAR & MOBILE RESPONSIVE LAYOUT
   ========================================================================= */
.calendar-filter-bar {
    margin-bottom: 24px;
    padding: 14px 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.calendar-filter-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
}

.calendar-filter-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.calendar-filter-selects {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-filter-select {
    width: auto;
    padding: 7px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    min-width: 140px;
}

.calendar-filter-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 768px) {
    .calendar-filter-bar {
        padding: 12px 14px;
        margin-bottom: 16px;
        gap: 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-filter-controls {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        flex-wrap: nowrap;
    }

    .calendar-filter-label {
        font-size: 0.82rem;
        gap: 4px;
    }

    .calendar-filter-selects {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .calendar-filter-select {
        width: 100% !important;
        min-width: 0 !important;
        padding: 6px 8px !important;
        font-size: 0.78rem !important;
        height: 36px;
        text-overflow: ellipsis;
    }

    .calendar-filter-hint {
        font-size: 0.75rem;
        line-height: 1.4;
        width: 100%;
    }
}

/* =========================================================================
   Student List Filter Bar (2-Bar Mobile Layout)
   ========================================================================= */
.student-filter-bar {
    margin-bottom: 20px;
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.student-search-bar {
    position: relative;
    width: 260px;
    flex: 0 1 260px;
}

.student-filter-dropdowns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-select-class {
    width: auto;
    min-width: 140px;
    font-size: 0.85rem;
}

.student-select-tg {
    width: auto;
    min-width: 165px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .student-filter-bar {
        padding: 12px 14px;
        margin-bottom: 16px;
        gap: 10px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    /* Bar 1: Full-width search bar */
    .student-search-bar {
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    /* Bar 2: Exactly 2 equal columns side-by-side (50% - 50%) */
    .student-filter-dropdowns {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .student-select-class,
    .student-select-tg {
        width: 100% !important;
        min-width: 0 !important;
        height: 38px;
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
        text-overflow: ellipsis;
    }

    .student-reset-btn {
        width: 100% !important;
        margin-top: 2px;
        justify-content: center;
    }
}

/* =========================================================================
   Submissions Filter Bar (2-Bar Mobile Layout)
   ========================================================================= */
.submissions-filter-bar {
    margin-bottom: 20px;
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.submissions-search-wrapper {
    position: relative;
    width: 220px;
    flex: 0 1 220px;
}

.submissions-filter-dropdowns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sub-filter-subj {
    width: auto;
    min-width: 145px;
    font-size: 0.85rem;
}

.sub-filter-class {
    width: auto;
    min-width: 115px;
    font-size: 0.85rem;
}

.sub-filter-meeting {
    width: auto;
    min-width: 125px;
    font-size: 0.85rem;
}

.sub-filter-status {
    width: auto;
    min-width: 135px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .submissions-filter-bar {
        padding: 12px 14px;
        margin-bottom: 16px;
        gap: 10px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    /* Bar 1: Full-width search bar */
    .submissions-search-wrapper {
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    /* Bar 2: Clean equal columns side-by-side in 1 single row */
    .submissions-filter-dropdowns {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .sub-filter-subj,
    .sub-filter-class,
    .sub-filter-meeting,
    .sub-filter-status {
        width: 100% !important;
        min-width: 0 !important;
        height: 38px;
        font-size: 0.78rem !important;
        padding: 6px 8px !important;
        text-overflow: ellipsis;
    }
}

/* =========================================================================
   Materials & Learning Modules (Bahan Ajar) Styles
   ========================================================================= */
.materials-filter-bar {
    margin-bottom: 20px;
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.materials-search-wrapper {
    position: relative;
    width: 260px;
    flex: 0 1 260px;
}

.materials-filter-dropdowns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mat-filter-subj {
    width: auto;
    min-width: 160px;
    font-size: 0.85rem;
}

.mat-filter-class {
    width: auto;
    min-width: 130px;
    font-size: 0.85rem;
}

.mat-filter-meeting {
    width: auto;
    min-width: 140px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .materials-filter-bar {
        padding: 12px 14px;
        margin-bottom: 16px;
        gap: 10px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    /* Bar 1: Full-width search bar */
    .materials-search-wrapper {
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    /* Bar 2: Clean side-by-side grid */
    .materials-filter-dropdowns {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .mat-filter-subj,
    .mat-filter-class,
    .mat-filter-meeting {
        width: 100% !important;
        min-width: 0 !important;
        height: 38px;
        font-size: 0.78rem !important;
        padding: 6px 8px !important;
        text-overflow: ellipsis;
    }

    .mat-reset-btn {
        width: 100% !important;
        margin-top: 2px;
        justify-content: center;
    }
}

/* Material Cards Grid */
.materials-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.material-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.material-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.25);
    border-color: rgba(99, 102, 241, 0.35);
}

.material-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.material-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.type-badge-pdf {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.type-badge-pptx {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.type-badge-docx {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #0ea5e9;
}

.type-badge-link {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.material-card-body {
    margin-bottom: 14px;
}

.material-subject-title {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.material-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-description {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-card-meta {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.material-file-info {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 60%;
}

.material-filename {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-main);
    font-weight: 500;
}

.material-date-info {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.material-card-actions {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 6px;
    align-items: center;
}

.material-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 12px;
}

.material-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    padding: 7px 10px;
}

@media (max-width: 768px) {
    .materials-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .material-card {
        padding: 14px;
    }
}

/* =========================================================================
   Progress & Analytics Dashboard Enhancements
   ========================================================================= */
.progress-overview-banner {
    margin-bottom: 24px;
    padding: 22px 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.progress-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.progress-banner-content {
    flex: 1;
    min-width: 0;
}

.progress-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.progress-banner-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.progress-banner-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.5;
}

.progress-percent-card {
    text-align: center;
    padding: 12px 20px;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.progress-percent-number {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.progress-percent-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    display: block;
}

.progress-subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.subject-progress-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.subject-progress-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.35);
}

/* Mobile Responsiveness for Progress (<= 768px) */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    .metric-card {
        padding: 12px 14px !important;
        gap: 10px !important;
        border-radius: var(--radius-md) !important;
    }

    .metric-icon {
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
        font-size: 1.1rem !important;
    }

    .metric-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .metric-content h3 {
        font-size: 1.3rem !important;
        margin-bottom: 2px !important;
    }

    .metric-content span {
        font-size: 0.72rem !important;
        line-height: 1.25 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .progress-overview-banner {
        padding: 16px 16px 18px !important;
        margin-bottom: 16px !important;
    }

    .progress-banner-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .progress-badges-row {
        gap: 6px !important;
        margin-bottom: 6px !important;
    }

    .progress-banner-title {
        font-size: 1.2rem !important;
        margin-bottom: 4px !important;
    }

    .progress-banner-desc {
        font-size: 0.82rem !important;
        line-height: 1.4 !important;
    }

    .progress-percent-card {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 14px !important;
        border-radius: var(--radius-md) !important;
        background: rgba(99, 102, 241, 0.08) !important;
    }

    .progress-percent-number {
        font-size: 1.8rem !important;
    }

    .progress-percent-label {
        font-size: 0.75rem !important;
        margin-top: 0 !important;
    }

    .progress-subject-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .subject-progress-card {
        padding: 14px 16px !important;
    }
}

/* =========================================================================
   SETTINGS SUB-TABS NAVIGATION (SINGLE ROW ON DESKTOP)
   ========================================================================= */
.settings-subtabs-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 2px 6px 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.settings-subtabs-nav::-webkit-scrollbar {
    height: 4px;
}

.settings-subtabs-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.settings-subtab-btn {
    border-radius: 9999px !important;
    padding: 7px 14px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.settings-subtab-btn:hover {
    transform: translateY(-1px);
}

@media (min-width: 992px) {
    .settings-subtabs-nav {
        flex-wrap: nowrap !important;
        overflow-x: visible !important;
        gap: 10px;
    }
    .settings-subtab-btn {
        padding: 8px 16px !important;
        font-size: 0.86rem !important;
    }
}

/* ==========================================================================
   Grading & Activity Points Gamification System Styling
   ========================================================================== */
.point-preset-btn, .point-form-preset {
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    border-radius: 10px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.point-preset-btn.active, .point-form-preset.active {
    background: linear-gradient(135deg, var(--primary), #8b5cf6) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
    border-color: transparent !important;
}

.badge-purple {
    background: rgba(168, 85, 247, 0.15) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.student-gamify-banner {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.student-gamify-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.25);
}

@keyframes skeletonPulse {
    0% { opacity: 0.45; }
    50% { opacity: 0.95; }
    100% { opacity: 0.45; }
}

.skeleton-shimmer {
    animation: skeletonPulse 1.4s ease-in-out infinite;
}

/* =========================================================================
   REAL-TIME NOTES (Rich Writing Editor & Notulen Layout)
   ========================================================================= */
.notes-workspace-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 16px;
    height: calc(100vh - 165px);
    max-height: calc(100vh - 165px);
    min-height: 520px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.notes-sidebar-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 16px;
    box-sizing: border-box;
}

.notes-sidebar-header {
    flex-shrink: 0;
    margin-bottom: 4px;
}

.notes-list-scroll-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.notes-editor-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    box-sizing: border-box;
}

.notes-list-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.notes-list-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.25);
    border-radius: 4px;
}

.notes-list-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.note-list-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.note-list-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateX(3px);
}

.note-list-item.active {
    box-shadow: 0 4px 16px -2px rgba(99, 102, 241, 0.25);
}

#activeNoteTitle:focus,
#quickNoteTitle:focus {
    outline: none !important;
    border-bottom-color: var(--primary) !important;
}

/* Rich Editor Toolbar & Layout */
.rich-notes-toolbar-wrapper {
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 10px 10px 0 0;
    padding: 6px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    user-select: none;
    z-index: 10;
}

[data-theme="light"] .rich-notes-toolbar-wrapper {
    background: rgba(241, 245, 249, 0.92);
}

.editor-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding-right: 6px;
    margin-right: 4px;
    border-right: 1px solid var(--glass-border);
}

.editor-btn-group:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

.editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 28px;
    padding: 0 6px;
    font-size: 0.84rem;
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}

.editor-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

[data-theme="light"] .editor-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
    color: #111827;
}

.editor-btn:active, .editor-btn.is-active {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
}

.editor-select {
    height: 28px;
    padding: 0 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

[data-theme="light"] .editor-select {
    background: #ffffff;
    color: #1e293b;
}

.editor-select option {
    background: #1e293b;
    color: #f8fafc;
}

[data-theme="light"] .editor-select option {
    background: #ffffff;
    color: #1e293b;
}

/* Color Palette Popovers */
.editor-palette-picker {
    position: relative;
    display: inline-block;
}

.editor-palette-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
    z-index: 100;
    grid-template-columns: repeat(5, 22px);
    gap: 6px;
}

.editor-palette-picker:focus-within .editor-palette-dropdown,
.editor-palette-picker:hover .editor-palette-dropdown {
    display: grid;
}

.editor-color-dot {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.15s ease;
}

.editor-color-dot:hover {
    transform: scale(1.2);
}

/* Rich Notes Editor Container */
.rich-notes-editor {
    flex: 1;
    min-height: 400px;
    max-height: 62vh;
    overflow-y: auto;
    font-size: 0.96rem;
    line-height: 1.7;
    border: 1px solid var(--glass-border);
    border-top: none;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 0 0 10px 10px;
    padding: 18px 22px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

[data-theme="light"] .rich-notes-editor {
    background: rgba(255, 255, 255, 0.85);
}

.rich-notes-editor:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.rich-notes-editor::-webkit-scrollbar {
    width: 7px;
}

.rich-notes-editor::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

/* Typography inside Rich Editor */
.rich-notes-editor h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 16px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--glass-border);
}

.rich-notes-editor h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 14px 0 8px;
}

.rich-notes-editor h3 {
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 12px 0 6px;
}

.rich-notes-editor p {
    margin-bottom: 10px;
}

.rich-notes-editor ul, 
.rich-notes-editor ol {
    margin: 8px 0 12px 24px;
}

.rich-notes-editor li {
    margin-bottom: 4px;
}

.rich-notes-editor blockquote {
    border-left: 4px solid var(--primary);
    background: rgba(99, 102, 241, 0.08);
    padding: 10px 16px;
    margin: 12px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-main);
}

.rich-notes-editor hr {
    border: none;
    border-top: 2px dashed var(--glass-border);
    margin: 18px 0;
}

.rich-notes-editor code {
    background: rgba(255, 255, 255, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88em;
    color: #f43f5e;
}

.rich-notes-editor a {
    color: #38bdf8;
    text-decoration: underline;
    font-weight: 500;
}

/* Table styling inside notes */
.rich-notes-editor table.note-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 0.88rem;
    border: 1px solid var(--glass-border);
}

.rich-notes-editor table.note-table th {
    background: rgba(99, 102, 241, 0.22);
    font-weight: 700;
    text-align: left;
    padding: 8px 12px;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.rich-notes-editor table.note-table td {
    padding: 8px 12px;
    border: 1px solid var(--glass-border);
}

.rich-notes-editor table.note-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Interactive To-Do Checklist */
.rich-notes-editor .note-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.rich-notes-editor .note-todo-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 3px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.rich-notes-editor .note-todo-item.checked {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Timestamp Stamp Badge */
.note-timestamp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 2px 10px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 4px 0;
}

/* Category Filter Tabs in Sidebar */
.note-cat-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.note-cat-pill {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: #94a3b8;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.note-cat-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.note-cat-pill.active {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
}

.note-cat-pill .badge-count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.68rem;
    font-weight: 800;
}

.note-cat-pill.active .badge-count {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Light Theme High Contrast for Category Tabs */
[data-theme="light"] .note-cat-pill {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    font-weight: 700;
}

[data-theme="light"] .note-cat-pill span {
    color: inherit !important;
}

[data-theme="light"] .note-cat-pill:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

[data-theme="light"] .note-cat-pill.active {
    background: #4f46e5 !important;
    border-color: #4338ca !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.35);
}

[data-theme="light"] .note-cat-pill.active span {
    color: #ffffff !important;
}

[data-theme="light"] .note-cat-pill .badge-count {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .note-cat-pill.active .badge-count {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Note List Item Styles (High Contrast in both Dark & Light Themes) */
.note-list-item {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-left-width: 5px !important;
    border-left-style: solid !important;
    transition: all 0.2s ease;
}

.note-list-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-top-color: rgba(255, 255, 255, 0.15);
    border-right-color: rgba(255, 255, 255, 0.15);
    border-bottom-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.note-list-item.active {
    background: rgba(99, 102, 241, 0.15) !important;
    border-top-color: rgba(99, 102, 241, 0.4);
    border-right-color: rgba(99, 102, 241, 0.4);
    border-bottom-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.note-item-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 175px;
}

[data-theme="light"] .note-list-item {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-left-width: 5px !important;
    border-left-style: solid !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .note-list-item:hover {
    background: #f8fafc !important;
    border-top-color: #cbd5e1 !important;
    border-right-color: #cbd5e1 !important;
    border-bottom-color: #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .note-list-item.active {
    background: #eef2ff !important;
    border-top-color: #a5b4fc !important;
    border-right-color: #a5b4fc !important;
    border-bottom-color: #a5b4fc !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.18);
}

[data-theme="light"] .note-list-item .note-item-title {
    color: #0f172a !important;
}

[data-theme="light"] .note-list-item .note-item-time {
    color: #475569 !important;
}

[data-theme="light"] .note-list-item .note-item-snippet {
    color: #334155 !important;
    font-weight: 500;
}

/* Note Item Category Badge & Snippet Styling */
.note-item-category {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

[data-theme="light"] .note-item-category {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 700 !important;
}

.note-item-snippet {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 3px;
}

[data-theme="light"] .note-item-snippet {
    color: #334155 !important;
}

.note-item-time {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
}

[data-theme="light"] .note-item-time {
    color: #64748b !important;
}

/* Special Button Styling for Template & Export */
.editor-btn-template {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
    font-weight: 700;
    padding: 0 10px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
}

[data-theme="light"] .editor-btn-template {
    background: #e0e7ff !important;
    color: #312e81 !important;
    border: 1px solid #a5b4fc !important;
    font-weight: 700 !important;
}

.editor-btn-template:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
}

[data-theme="light"] .editor-btn-template:hover {
    background: #4338ca !important;
    color: #ffffff !important;
}

.editor-btn-export {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    font-weight: 700;
    padding: 0 10px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
}

[data-theme="light"] .editor-btn-export {
    background: #dcfce7 !important;
    color: #14532d !important;
    border: 1px solid #86efac !important;
    font-weight: 700 !important;
}

.editor-btn-export:hover {
    background: #10b981 !important;
    color: #ffffff !important;
}

[data-theme="light"] .editor-btn-export:hover {
    background: #15803d !important;
    color: #ffffff !important;
}

/* Note Action Palette & Secondary Buttons in Light Theme */
[data-theme="light"] #noteColorPalette .btn-secondary {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 600;
}

[data-theme="light"] #noteColorPalette .btn-secondary:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

[data-theme="light"] .rich-notes-toolbar-wrapper .editor-btn {
    color: #1e293b !important;
    border-color: #e2e8f0;
}

[data-theme="light"] .rich-notes-toolbar-wrapper .editor-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .rich-notes-toolbar-wrapper .editor-select {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .rich-notes-toolbar-wrapper .editor-select option {
    background: #ffffff !important;
    color: #0f172a !important;
}

/* Note Cat Header Label */
.note-cat-header-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}
[data-theme="light"] .note-cat-header-label {
    color: #0f172a !important;
}

[data-theme="light"] #activeNoteTitle {
    color: #0f172a !important;
}

[data-theme="light"] #activeNoteTitle::placeholder {
    color: #94a3b8 !important;
}

[data-theme="light"] #noteSaveStatus {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #86efac !important;
    font-weight: 700 !important;
}

/* Voice Dictation Pulse Animation */
@keyframes voicePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        border-color: #ef4444;
    }
    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
        border-color: #f87171;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        border-color: #ef4444;
    }
}

.voice-recording-active {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border-color: #ef4444 !important;
    animation: voicePulse 1.5s infinite;
}

/* Images inside Rich Notes Editor */
.rich-notes-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    display: block;
    transition: transform 0.2s;
}

.rich-notes-editor img:hover {
    outline: 2px solid var(--primary);
}

/* Editor Action & Export Dropdowns */
.editor-menu-wrapper {
    position: relative;
    display: inline-block;
}

.editor-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
    z-index: 105;
    min-width: 170px;
    flex-direction: column;
    gap: 2px;
}

.editor-menu-wrapper:focus-within .editor-menu-dropdown,
.editor-menu-wrapper:hover .editor-menu-dropdown {
    display: flex;
}

.editor-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text-main);
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.15s ease;
}

.editor-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

[data-theme="light"] .editor-menu-dropdown {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
}

[data-theme="light"] .editor-menu-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Fullscreen Editor Mode */
.notes-fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10006 !important;
    background: #0b0f19 !important;
    padding: 16px 24px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.notes-fullscreen-mode .notes-editor-col {
    height: 100%;
}

.notes-fullscreen-mode .rich-notes-editor {
    max-height: calc(100vh - 180px) !important;
    min-height: calc(100vh - 200px) !important;
}

/* Print Styles for Meeting Notes */
@media print {
    body * {
        visibility: hidden;
    }
    .notes-editor-col,
    .notes-editor-col * {
        visibility: visible;
    }
    .notes-editor-col {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 20px !important;
    }
    .rich-notes-toolbar-wrapper,
    .notes-sidebar-col,
    .btn,
    .badge,
    #noteColorPalette {
        display: none !important;
    }
    .rich-notes-editor {
        border: none !important;
        background: transparent !important;
        color: #000000 !important;
        padding: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }
    #activeNoteTitle {
        color: #000000 !important;
        border-bottom: 2px solid #000000 !important;
    }
}

/* Enhanced Catatan & Notulensi Styles */
.note-hero-add-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.42) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.note-hero-add-btn:hover {
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 8px 26px rgba(99, 102, 241, 0.6) !important;
    filter: brightness(1.1) !important;
}
.note-hero-add-btn:active {
    transform: translateY(0) scale(0.99) !important;
}

.note-item-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
[data-theme="light"] .note-item-category-tag {
    background: #eef2ff !important;
    color: #4338ca !important;
    border-color: #c7d2fe !important;
}

.note-item-todo-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
[data-theme="light"] .note-item-todo-badge {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
}

.note-todo-progress-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
}
[data-theme="light"] .note-todo-progress-card {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.note-find-replace-bar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    animation: fadeIn 0.2s ease;
}
[data-theme="light"] .note-find-replace-bar {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
}

.note-official-header {
    margin-bottom: 16px;
}
[data-theme="light"] .note-official-header h2 {
    color: #0f172a !important;
}

.note-print-signatures {
    display: none;
}
@media print {
    .note-print-signatures {
        display: flex !important;
        justify-content: space-between;
        margin-top: 50px;
        page-break-inside: avoid;
    }
    .note-sig-col {
        text-align: center;
        width: 220px;
    }
    .note-sig-space {
        height: 70px;
    }
}


/* =========================================================================
   KKP GROUPS & THESIS RESPONSIVENESS
   ========================================================================= */
.courses-subtab-nav button {
    transition: all 0.2s ease;
}

/* =========================================================================
   TTS (TEKA-TEKI SILANG / CROSSWORD PUZZLE) STYLES
   ========================================================================= */
.modal-content.tts-modal-dialog {
    max-width: 980px !important;
    width: 96% !important;
}

.tts-play-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 1.25fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.tts-board-container {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

[data-theme="light"] .tts-board-container {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.tts-gameboard-scroll-area {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
    padding: 8px 0;
    box-sizing: border-box;
}

.tts-gameboard-grid {
    display: inline-grid;
    gap: 3px;
    background: rgba(17, 24, 39, 0.88);
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center top;
}

[data-theme="light"] .tts-gameboard-grid {
    background: #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.tts-cell-wrapper {
    width: var(--tts-cell-size, 36px);
    height: var(--tts-cell-size, 36px);
    min-width: var(--tts-cell-size, 26px);
    min-height: var(--tts-cell-size, 26px);
    position: relative;
    background: #ffffff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-sizing: border-box;
}

.tts-cell-wrapper.tts-word-highlight {
    background: #e0e7ff !important;
    box-shadow: 0 0 0 1.5px rgba(99, 102, 241, 0.5) !important;
}

.tts-cell-wrapper.tts-cell-current,
.tts-cell-wrapper:focus-within {
    background: #fef3c7 !important;
    transform: scale(1.06);
    box-shadow: 0 0 0 2px #f59e0b, 0 4px 12px rgba(245, 158, 11, 0.35) !important;
    z-index: 10;
}

.tts-cell-inactive {
    width: var(--tts-cell-size, 36px);
    height: var(--tts-cell-size, 36px);
    background: #111827;
    border-radius: 5px;
    opacity: 0.85;
}

[data-theme="light"] .tts-cell-inactive {
    background: #334155;
    opacity: 0.95;
}

.tts-cell-input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    text-align: center;
    font-size: calc(var(--tts-cell-size, 36px) * 0.48);
    font-weight: 900;
    color: #1e1b4b;
    text-transform: uppercase;
    padding: 0;
    cursor: pointer;
    box-sizing: border-box;
}

.tts-cell-num {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: calc(var(--tts-cell-size, 36px) * 0.28);
    font-weight: 800;
    color: #475569;
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

.tts-clue-item {
    transition: background 0.18s ease, transform 0.18s ease;
}

.tts-clue-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateX(3px);
}

.tts-clue-item.tts-active-clue-row {
    background: rgba(99, 102, 241, 0.22) !important;
    border-left: 3px solid var(--primary) !important;
    padding-left: 8px !important;
}

[data-theme="light"] .tts-clue-item:hover {
    background: rgba(99, 102, 241, 0.08) !important;
}

[data-theme="light"] .tts-clue-item.tts-active-clue-row {
    background: #e0e7ff !important;
    border-left: 3px solid #6366f1 !important;
}

/* Mobile Sticky Active Clue Bar */
.tts-sticky-clue-bar {
    width: 100%;
    background: rgba(30, 27, 75, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    margin-bottom: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

[data-theme="light"] .tts-sticky-clue-bar {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.tts-clue-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tts-clue-text-body {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
    word-break: break-word;
}

.tts-quick-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .tts-quick-tools {
    border-top-color: #e2e8f0;
}

.tts-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    transition: all 0.15s ease;
}

.tts-tool-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="light"] .tts-tool-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

[data-theme="light"] .tts-tool-btn:hover {
    background: #eef2ff;
    border-color: #6366f1;
    color: #4f46e5;
}

.tts-view-switch {
    display: none;
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    margin-bottom: 12px;
    box-sizing: border-box;
}

.tts-view-switch-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 0.825rem;
    font-weight: 700;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tts-view-switch-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

@media (max-width: 768px) {
    .tts-view-switch {
        display: flex !important;
    }
    .modal-content.tts-modal-dialog {
        max-width: 98% !important;
        width: 98% !important;
        padding: 12px 8px !important;
        margin: 6px auto !important;
    }
    .tts-play-workspace {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    .tts-play-workspace[data-mobile-view="board"] .tts-clues-container {
        display: none !important;
    }
    .tts-play-workspace[data-mobile-view="clues"] .tts-board-container {
        display: none !important;
    }
    .tts-play-workspace[data-mobile-view="clues"] .tts-clues-container {
        display: flex !important;
        width: 100% !important;
        max-height: 70vh !important;
    }
    .tts-board-container {
        padding: 8px !important;
        border-radius: 10px !important;
    }
    .tts-gameboard-scroll-area {
        justify-content: flex-start !important;
        padding: 6px 2px !important;
        width: 100% !important;
    }
    .tts-sticky-clue-bar {
        position: sticky;
        top: 0;
        z-index: 20;
        margin-bottom: 8px;
        padding: 8px 10px !important;
    }
}


/* ==========================================================================
   Modern Cool Search Input Component
   ========================================================================== */
.cool-search-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.cool-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cool-search-input {
    width: 100%;
    height: 40px;
    padding: 8px 34px 8px 38px;
    font-size: 0.86rem;
    font-weight: 500;
    font-family: var(--font-body);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cool-search-input::placeholder {
    color: var(--text-dim);
    font-weight: 400;
}

.cool-search-input:focus {
    background: rgba(15, 23, 42, 0.85);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 4px 16px rgba(99, 102, 241, 0.18);
}

.cool-search-wrapper:focus-within .cool-search-icon {
    color: #a5b4fc;
    transform: translateY(-50%) scale(1.1);
}

.cool-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cool-search-clear:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

[data-theme="light"] .cool-search-input {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(0, 0, 0, 0.09);
    color: #0f172a;
}

[data-theme="light"] .cool-search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 4px 16px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .cool-search-clear {
    background: rgba(0, 0, 0, 0.06);
    color: #64748b;
}

@media (max-width: 768px) {
    .notes-workspace-container {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }
    
    .notes-sidebar-col {
        max-height: none !important;
        min-height: auto !important;
        height: auto !important;
    }

    .notes-list-scroll-area {
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    #activeNoteContent {
        min-height: 260px !important;
    }

    .tts-play-workspace {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .tts-board-container {
        padding: 8px !important;
    }

    .tts-gameboard-grid {
        max-width: 100% !important;
    }

    .modal-content.tts-modal-dialog {
        width: 98% !important;
        max-height: 96vh !important;
        margin: 4px auto !important;
        padding: 8px !important;
    }

    /* Thesis Sub-Tab Bar scrollable on mobile */
    .thesis-subtab-bar {
        display: flex !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        margin-bottom: 16px !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .thesis-subtab-btn {
        flex-shrink: 0 !important;
        padding: 7px 12px !important;
        font-size: 0.76rem !important;
        gap: 5px !important;
        white-space: nowrap !important;
    }

    .thesis-subtab-btn .tab-text-full {
        display: none !important;
    }

    .thesis-subtab-btn .tab-text-short {
        display: inline !important;
    }

    .thesis-pending-badge {
        padding: 1px 5px !important;
        font-size: 0.68rem !important;
    }
}

/* ==========================================================================
   Thesis Sub-Tab Bar Component
   ========================================================================== */
.thesis-subtab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
    width: 100%;
}

.thesis-subtab-btn {
    border-radius: 9999px;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.thesis-pending-badge {
    padding: 2px 7px;
    font-size: 0.72rem;
    border-radius: 9999px;
}

@media (min-width: 769px) {
    .thesis-subtab-btn .tab-text-short {
        display: none !important;
    }
}

/* ==========================================================================
   CALENDAR FULLSCREEN MODE & RESPONSIVE ENGINE
   ========================================================================== */
.calendar-container-wrapper.calendar-fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 999999 !important;
    background: var(--bg-main, #0f172a) !important;
    padding: 16px 24px 20px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: none !important;
}

[data-theme="light"] .calendar-container-wrapper.calendar-fullscreen-mode {
    background: #ffffff !important;
}

/* Native HTML5 Fullscreen API Support */
#calendarGlassPanel:fullscreen,
#calendarGlassPanel:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    background: var(--bg-main, #0f172a) !important;
    padding: 16px 24px 20px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

[data-theme="light"] #calendarGlassPanel:fullscreen,
[data-theme="light"] #calendarGlassPanel:-webkit-full-screen {
    background: #ffffff !important;
}

#calendarGlassPanel::backdrop {
    background: var(--bg-main, #0f172a) !important;
}

[data-theme="light"] #calendarGlassPanel::backdrop {
    background: #ffffff !important;
}

/* Fullscreen Header Toolbar */
.calendar-container-wrapper.calendar-fullscreen-mode .calendar-fullscreen-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1)) !important;
    flex-shrink: 0 !important;
}

.calendar-fullscreen-header .fs-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.calendar-fullscreen-header .fs-header-icon {
    font-size: 1.3rem !important;
    flex-shrink: 0 !important;
}

.calendar-fullscreen-header .fs-header-titles {
    min-width: 0 !important;
}

.calendar-fullscreen-header .fs-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--text-main, #f8fafc) !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.calendar-fullscreen-header .fs-subtitle {
    font-size: 0.76rem !important;
    color: var(--text-muted, #94a3b8) !important;
    white-space: nowrap !important;
    display: block !important;
}

.calendar-fullscreen-header .fs-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.calendar-fullscreen-header .fs-exit-btn {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

.calendar-fullscreen-header .fs-exit-btn:hover {
    background: #dc2626 !important;
}

/* FullCalendar Container & Sizing in Fullscreen */
.calendar-container-wrapper.calendar-fullscreen-mode #dosenCalendar {
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.calendar-container-wrapper.calendar-fullscreen-mode .fc {
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.calendar-container-wrapper.calendar-fullscreen-mode .fc-view-harness {
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
}

.calendar-container-wrapper.calendar-fullscreen-mode .fc-scrollgrid {
    border-radius: var(--radius-md, 8px) !important;
    overflow: hidden !important;
    border-color: var(--glass-border, rgba(255, 255, 255, 0.1)) !important;
}

/* Global FullCalendar Toolbar Refinements */
.fc .fc-header-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px 12px !important;
    margin-bottom: 12px !important;
}

.fc .fc-toolbar-chunk {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.fc .fc-toolbar-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: var(--text-main, #f8fafc) !important;
}

[data-theme="light"] .fc .fc-toolbar-title {
    color: #0f172a !important;
}

.fc .fc-button {
    padding: 6px 12px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm, 6px) !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.fc .fc-col-header-cell-cushion {
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    padding: 6px 4px !important;
    color: var(--text-muted, #94a3b8) !important;
}

.fc .fc-daygrid-day-number {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    padding: 4px 6px !important;
}

.fc .fc-daygrid-day-events {
    margin-top: 2px !important;
}

body.calendar-body-fullscreen {
    overflow: hidden !important;
}

/* Responsive Handling for Mobile & Narrow Viewports */
@media (max-width: 768px) {
    .calendar-container-wrapper.calendar-fullscreen-mode {
        padding: 8px 10px 12px !important;
    }

    #calendarGlassPanel:fullscreen,
    #calendarGlassPanel:-webkit-full-screen {
        padding: 8px 10px 12px !important;
    }

    .calendar-fullscreen-header {
        margin-bottom: 8px !important;
        padding-bottom: 8px !important;
    }

    .calendar-fullscreen-header .fs-title {
        font-size: 0.95rem !important;
    }

    .calendar-fullscreen-header .fs-subtitle {
        display: none !important;
    }

    .calendar-fullscreen-header .fs-add-btn .btn-text-desktop {
        display: none !important;
    }

    .calendar-fullscreen-header .fs-refresh-btn {
        display: none !important;
    }

    .calendar-fullscreen-header .fs-exit-btn span {
        display: none !important;
    }

    .calendar-fullscreen-header .fs-exit-btn::after {
        content: "Keluar" !important;
        font-size: 0.78rem !important;
    }

    .fc .fc-header-toolbar {
        justify-content: space-between !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
    }

    .fc .fc-toolbar-chunk:nth-child(2) {
        order: -1 !important;
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        margin-bottom: 2px !important;
    }

    .fc .fc-toolbar-title {
        font-size: 1.05rem !important;
        text-align: center !important;
    }

    .fc .fc-button {
        padding: 4px 8px !important;
        font-size: 0.76rem !important;
    }

    .fc .fc-col-header-cell-cushion {
        font-size: 0.74rem !important;
        padding: 4px 2px !important;
    }

    .fc .fc-daygrid-day-number {
        font-size: 0.75rem !important;
        padding: 2px 4px !important;
    }

    .fc .fc-daygrid-event {
        font-size: 0.7rem !important;
        padding: 1px 2px !important;
    }

    .fc .fc-daygrid-more-link {
        font-size: 0.7rem !important;
        font-weight: 600 !important;
    }
}

/* =========================================================================
   NOTIFICATION CENTER & BELL COMPONENT (DOSEN & MAHASISWA)
   ========================================================================= */
.notification-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md, 10px);
    background: var(--glass-bg, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.12));
    color: var(--text-main, #f8fafc);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-bell-btn:hover {
    background: var(--primary-light, rgba(99, 102, 241, 0.15));
    border-color: var(--primary, #6366f1);
    color: var(--primary, #6366f1);
    transform: translateY(-1px);
}

.notification-bell-btn:active {
    transform: translateY(0);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 9999px;
    text-align: center;
    padding: 0 4px;
    border: 2px solid var(--bg-main, #0f172a);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    pointer-events: none;
    animation: notifPulse 2s infinite ease-in-out;
}

@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Light Mode Overrides */
[data-theme="light"] .notification-bell-btn {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .notification-bell-btn:hover {
    background: #eef2ff !important;
    border-color: #6366f1 !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .notification-badge {
    border-color: #ffffff;
}

/* Notification Items inside Modal / Dialog */
.notif-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 460px;
    overflow-y: auto;
    padding-right: 4px;
}

.notif-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: var(--radius-md, 12px);
    background: var(--glass-bg, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.notif-card:hover {
    background: var(--glass-card-hover, rgba(255, 255, 255, 0.06));
    border-color: var(--primary, #6366f1);
    transform: translateX(2px);
}

.notif-card.unread {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.notif-card.unread::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary, #6366f1);
    box-shadow: 0 0 6px var(--primary, #6366f1);
}

.notif-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon-box.submitted {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.notif-icon-box.accepted {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.notif-icon-box.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.notif-icon-box.info {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.notif-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
    margin: 0;
}

.notif-time {
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
}

.notif-message {
    font-size: 0.82rem;
    color: var(--text-muted, #cbd5e1);
    line-height: 1.4;
    margin: 0;
    word-break: break-word;
}

/* Light Theme overrides for Notification Cards */
[data-theme="light"] .notif-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .notif-card:hover {
    background: #f1f5f9;
}

[data-theme="light"] .notif-card.unread {
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
}

[data-theme="light"] .notif-title {
    color: #0f172a;
}

[data-theme="light"] .notif-message {
    color: #475569;
}

/* ==========================================================================
   RESPONSIVE LAYOUT FIX: Main Content Area (Dosen & Mahasiswa)
   ========================================================================== */

/* Pastikan konten utama tidak overflow dari lebar yang tersedia */
#dosenMainContent,
#mhsMainContent {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* Glass panel yang membungkus tabel harus membatasi overflow */
.glass-panel {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Filter bar grades: wrap responsif pada layar kecil */
.grades-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* Form select di dalam glass-panel filter menyesuaikan lebar minimum */
.glass-panel .form-select,
.glass-panel .form-control {
    max-width: 100%;
    box-sizing: border-box;
}

/* Perbaikan responsif form-select pada layar medium (tablet/laptop kecil) */
@media (max-width: 1280px) {
    .glass-panel .form-select[style*="min-width: 220px"],
    .glass-panel .form-select[style*="min-width: 240px"] {
        min-width: 160px !important;
        flex: 1 1 160px;
    }
}

@media (max-width: 1024px) {
    /* Pastikan main wrapper tidak melampaui viewport */
    .main-wrapper {
        overflow-x: hidden !important;
    }

    /* Filter bar pada penilaian: full width di layar kecil */
    .glass-panel .form-select[style*="min-width"] {
        min-width: 120px !important;
        flex: 1 1 120px;
    }

    /* Tabel penilaian: kurangi padding container pada layar kecil */
    .glass-panel {
        padding: 16px !important;
    }

    /* Top bar action buttons: wrap agar tidak overflow */
    #dosenTopActions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
}

@media (max-width: 900px) {
    /* Stat cards di grades tampil 2 kolom */
    .students-stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Kurangi font size judul tab pada layar kecil */
    .top-bar-title h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    /* Hilangkan overflow pada main content saat mobile & beri ruang aman untuk floating bottom nav */
    #dosenMainContent,
    #mhsMainContent {
        overflow-x: hidden;
        padding: 0 0 calc(96px + env(safe-area-inset-bottom, 16px)) 0 !important;
        box-sizing: border-box;
    }

    /* Glass panel: padding minimal di mobile */
    .glass-panel {
        padding: 14px !important;
        border-radius: 14px !important;
    }

    /* Form select menyesuaikan lebar penuh di mobile */
    .glass-panel .form-select {
        min-width: unset !important;
        width: 100% !important;
    }

    /* Stat grid: 2 kolom di mobile */
    .students-stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Tabel: font lebih kecil dan padding minimal */
    .table thead th {
        font-size: 0.72rem !important;
        padding: 8px 10px !important;
    }

    .table tbody td {
        padding: 8px 10px !important;
        font-size: 0.82rem !important;
    }

    /* Input nilai di tabel grades: lebih kecil di mobile */
    .table .form-control[style*="width: 75px"] {
        width: 58px !important;
        font-size: 0.8rem !important;
    }
}

/* ==========================================================================
   SEARCHABLE STUDENT DROPDOWN (DROPBOX - SEARCH)
   ========================================================================== */
.searchable-dropdown-wrap {
    position: relative;
    width: 100%;
}

.searchable-dropdown-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.searchable-dropdown-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.searchable-dropdown-input {
    width: 100%;
    height: 42px;
    padding: 8px 36px 8px 38px !important;
    font-size: 0.875rem;
    font-family: inherit;
    border-radius: 10px !important;
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.searchable-dropdown-input:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
    background: rgba(15, 23, 42, 0.9) !important;
}

[data-theme="light"] .searchable-dropdown-input {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .searchable-dropdown-input:focus {
    background: #ffffff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.searchable-dropdown-clear {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: color 0.15s ease;
    z-index: 2;
}

.searchable-dropdown-clear:hover {
    color: var(--danger);
}

.searchable-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 270px;
    overflow-y: auto;
    background: rgba(17, 24, 39, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5);
    z-index: 1050;
    padding: 6px;
    display: none;
    box-sizing: border-box;
}

.searchable-dropdown-menu.open {
    display: block;
    animation: searchableFadeIn 0.16s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes searchableFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

[data-theme="light"] .searchable-dropdown-menu {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.searchable-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    margin-bottom: 2px;
}

.searchable-dropdown-item:hover,
.searchable-dropdown-item.focused {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.35);
}

[data-theme="light"] .searchable-dropdown-item:hover,
[data-theme="light"] .searchable-dropdown-item.focused {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.searchable-dropdown-empty {
    padding: 20px 14px;
    text-align: center;
    font-size: 0.83rem;
    color: var(--text-muted);
}

.searchable-highlight {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    font-weight: 800;
    padding: 0 2px;
    border-radius: 3px;
}

[data-theme="light"] .searchable-highlight {
    background: #fef08a;
    color: #b45309;
}

.searchable-selected-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.12);
    border: 1.5px solid var(--primary);
    border-radius: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

[data-theme="light"] .searchable-selected-badge {
    background: #eef2ff;
    border-color: #6366f1;
}

/* ==========================================================================
   Gradebook Filter Bar & Action Controls (Penilaian Akademik)
   ========================================================================== */
.gradebook-filter-bar {
    margin-bottom: 20px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.gradebook-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.gradebook-filter-label {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.gradebook-filter-selects {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
}

.gradebook-filter-selects .form-select,
.gradebook-select {
    min-width: 180px;
    max-width: 340px;
    height: 42px;
    line-height: 1.4;
    padding: 8px 12px;
    font-size: 0.86rem;
    box-sizing: border-box;
    flex: 1 1 auto;
}

.gradebook-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gradebook-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 600;
}

.gradebook-action-btn.btn-primary {
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Mobile Screens (<= 768px): clean vertical layout, no stacking or overlapping */
@media (max-width: 768px) {
    .gradebook-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .gradebook-filter-group {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
        flex: none !important;
    }

    .gradebook-filter-label {
        font-size: 0.88rem !important;
        margin-bottom: 2px !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .gradebook-filter-selects {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
        flex: none !important;
    }

    .gradebook-filter-selects .form-select,
    .gradebook-select {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        line-height: 1.4 !important;
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
        box-sizing: border-box !important;
        flex: none !important;
        display: block !important;
    }

    .gradebook-filter-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        margin-top: 4px !important;
        padding-top: 10px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        box-sizing: border-box !important;
    }

    [data-theme="light"] .gradebook-filter-actions {
        border-top-color: #e2e8f0 !important;
    }

    .gradebook-action-btn {
        flex: 1 1 0 !important;
        justify-content: center !important;
        padding: 9px 8px !important;
        font-size: 0.82rem !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    .gradebook-table-top-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .gradebook-search-wrap {
        width: 100% !important;
    }

    .gradebook-search-wrap input {
        width: 100% !important;
    }
}

/* =========================================================================
   SQL QUEST GAMIFICATION SYSTEM (RPG DATABASE ADVENTURE)
   ========================================================================= */
.sqlquest-wrapper {
    position: relative;
    width: 100%;
}

.sqlquest-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 960px) {
    .sqlquest-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Player Stats HUD Container */
.sqlquest-stats-hud {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* Individual Stat Chip (Pill) */
.sqlquest-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sqlquest-stat-chip:hover {
    transform: translateY(-1px);
}

.sqlquest-stat-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.85;
}

/* HP Chip (Rose / Ruby) */
.sqlquest-hp-chip {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fda4af;
}
.sqlquest-hp-chip .sqlquest-stat-label {
    color: #f43f5e;
}
.sqlquest-hp-hearts {
    letter-spacing: 3px;
    font-size: 0.95rem;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(244, 63, 94, 0.3));
}

/* XP Chip (Amber / Gold) */
.sqlquest-xp-chip {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}
.sqlquest-xp-chip .sqlquest-stat-label {
    color: #f59e0b;
}
.sqlquest-xp-val {
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sqlquest-xp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.sqlquest-xp-cell {
    color: #fbbf24;
}

.sqlquest-refill-btn {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 700;
    animation: heartPulse 1.5s infinite ease-in-out;
}

/* Reward Pill */
.sqlquest-reward-pill {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 5px 14px;
    border-radius: 20px;
    color: #10b981;
    font-weight: 800;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Mission Pills */
.sqlquest-mission-btn {
    font-size: 0.78rem;
    border-radius: 8px;
    padding: 5px 11px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sqlquest-mission-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.sqlquest-mission-btn.is-current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.sqlquest-mission-btn.is-completed {
    background: rgba(16, 185, 129, 0.14) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #10b981 !important;
    font-weight: 700;
}

/* Console & Feedback Blocks */
.sqlquest-console-narrative {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.55;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 14px;
    border-radius: 10px;
}

.sqlquest-console-hint {
    font-size: 0.82rem;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border-left: 4px solid #fbbf24;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    line-height: 1.45;
}

.sqlquest-meta-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
}

.sqlquest-chip-btn {
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    user-select: none;
}

.sqlquest-chip-btn:hover {
    background: rgba(99, 102, 241, 0.25) !important;
    color: #a5b4fc !important;
    border-color: rgba(99, 102, 241, 0.6) !important;
    transform: translateY(-1px);
}

/* Low HP heart warning pulse */
@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.sqlquest-hp-critical {
    display: inline-block;
    animation: heartPulse 1.2s infinite ease-in-out;
}

#sqlQuestInput {
    background: rgba(11, 15, 25, 0.75);
    border: 1px solid var(--glass-border);
    color: #38bdf8;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#sqlQuestInput:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

/* =========================================================================
   Light Mode Theme Adaptation for SQL Quest
   ========================================================================= */
[data-theme="light"] .sqlquest-wrapper .glass-panel {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .sqlquest-stats-hud {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .sqlquest-hp-chip {
    background: #fff1f2 !important;
    border: 1px solid #fecdd3 !important;
    color: #e11d48 !important;
}
[data-theme="light"] .sqlquest-hp-chip .sqlquest-stat-label {
    color: #be123c !important;
}

[data-theme="light"] .sqlquest-xp-chip {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    color: #b45309 !important;
}
[data-theme="light"] .sqlquest-xp-chip .sqlquest-stat-label {
    color: #92400e !important;
}
[data-theme="light"] .sqlquest-xp-val {
    color: #b45309 !important;
}

[data-theme="light"] .sqlquest-xp-badge {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    color: #b45309 !important;
}

[data-theme="light"] .sqlquest-xp-cell {
    color: #b45309 !important;
}

[data-theme="light"] .sqlquest-reward-pill {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
}

[data-theme="light"] .sqlquest-mission-btn {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

[data-theme="light"] .sqlquest-mission-btn:hover {
    background: #e0e7ff !important;
    border-color: #c7d2fe !important;
    color: #4338ca !important;
}

[data-theme="light"] .sqlquest-mission-btn.is-current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

[data-theme="light"] .sqlquest-mission-btn.is-completed {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #047857 !important;
}

[data-theme="light"] .sqlquest-console-narrative {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

[data-theme="light"] .sqlquest-console-hint {
    background: #fffbeb !important;
    border-left-color: #f59e0b !important;
    color: #92400e !important;
}

[data-theme="light"] .sqlquest-meta-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .sqlquest-wrapper h3,
[data-theme="light"] .sqlquest-wrapper h4,
[data-theme="light"] .sqlquest-wrapper label {
    color: #0f172a !important;
}

[data-theme="light"] .sqlquest-wrapper p {
    color: #334155 !important;
}

[data-theme="light"] .sqlquest-wrapper #sqlQuestInput {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] .sqlquest-wrapper table th {
    background: #f8fafc !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .sqlquest-wrapper table td {
    color: #1e293b !important;
    border-color: #f1f5f9 !important;
}

[data-theme="light"] .sqlquest-wrapper table tr {
    border-color: #e2e8f0 !important;
}

/* =========================================================================
   BIMBINGAN PA (PEMBIMBING AKADEMIK) - PRESENSI KELAS & BIMBINGAN KLASIKAL
   ========================================================================= */

.pa-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   PA Ketua Kelas & Bimbingan PA - Ultra Premium Design Overhaul
   ========================================================================== */

/* Hero Banner Card */
.pa-hero-card {
    padding: 24px 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 0 1px 1px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.pa-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #6366f1, #06b6d4);
}

[data-theme="dark"] .pa-hero-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.78) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5);
}

.pa-hero-content-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.pa-hero-info-col {
    flex: 1;
    min-width: 280px;
}

.pa-hero-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.pa-class-pill {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(6, 182, 212, 0.08));
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.25);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pa-meta-chip {
    font-size: 0.80rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

[data-theme="dark"] .pa-meta-chip {
    background: rgba(255, 255, 255, 0.05);
}

.pa-hero-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 4px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    letter-spacing: -0.01em;
}

.pa-student-count-badge {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 2px 10px;
    border-radius: 9999px;
}

.pa-hero-actions-col {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.pa-class-select {
    font-weight: 600;
    min-width: 160px;
    height: 38px;
    border-radius: 10px;
}

.pa-btn-refresh {
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.pa-btn-klasikal {
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pa-btn-klasikal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.pa-subtab-container {
    margin-top: 18px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

/* Segmented Subtab Navigation */
.pa-segmented-nav {
    display: inline-flex;
    background: rgba(241, 245, 249, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
    flex-wrap: wrap;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .pa-segmented-nav {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pa-seg-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    user-select: none;
}

.pa-seg-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .pa-seg-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pa-seg-btn.active {
    background: #ffffff !important;
    color: #4f46e5 !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .pa-seg-btn.active {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pa-tab-badge {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
}

.pa-seg-btn.active .pa-tab-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

/* Responsive Text & Visibility Utilities for PA */
.pa-badge-text-mobile,
.pa-title-mobile,
.pa-count-mobile {
    display: none;
}

.pa-badge-text-desktop,
.pa-title-desktop,
.pa-count-desktop,
.pa-class-pill-desktop {
    display: inline;
}

/* ==========================================================================
   Bento KPI Cards Deck (5 Columns Uniform Deck)
   ========================================================================== */
.pa-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

@media (max-width: 1024px) {
    .pa-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pa-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.pa-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
}

.pa-kpi-card.kpi-total::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.pa-kpi-card.kpi-hadir::before { background: linear-gradient(90deg, #10b981, #34d399); }
.pa-kpi-card.kpi-sakit::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.pa-kpi-card.kpi-izin::before  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.pa-kpi-card.kpi-alpa::before  { background: linear-gradient(90deg, #ef4444, #f87171); }

[data-theme="dark"] .pa-kpi-card {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pa-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .pa-kpi-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

/* Subtle Ambient Gradients per KPI card */
.pa-kpi-card.kpi-total {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, var(--bg-card) 100%);
}
.pa-kpi-card.kpi-hadir {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.07) 0%, var(--bg-card) 100%);
}
.pa-kpi-card.kpi-sakit {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.07) 0%, var(--bg-card) 100%);
}
.pa-kpi-card.kpi-izin {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.07) 0%, var(--bg-card) 100%);
}
.pa-kpi-card.kpi-alpa {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.07) 0%, var(--bg-card) 100%);
}

[data-theme="dark"] .pa-kpi-card.kpi-total {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(15, 23, 42, 0.7) 100%);
}
[data-theme="dark"] .pa-kpi-card.kpi-hadir {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.7) 100%);
}
[data-theme="dark"] .pa-kpi-card.kpi-sakit {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(15, 23, 42, 0.7) 100%);
}
[data-theme="dark"] .pa-kpi-card.kpi-izin {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.7) 100%);
}
[data-theme="dark"] .pa-kpi-card.kpi-alpa {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(15, 23, 42, 0.7) 100%);
}

/* Elevated Squircle Icon Holders */
.pa-kpi-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pa-kpi-card:hover .pa-kpi-icon {
    transform: scale(1.08);
}

.pa-kpi-icon.blue {
    background: rgba(59, 130, 246, 0.14);
    color: #3b82f6;
}
.pa-kpi-icon.green {
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
}
.pa-kpi-icon.purple {
    background: rgba(139, 92, 246, 0.14);
    color: #8b5cf6;
}
.pa-kpi-icon.amber {
    background: rgba(245, 158, 11, 0.14);
    color: #f59e0b;
}
.pa-kpi-icon.rose {
    background: rgba(239, 68, 68, 0.14);
    color: #ef4444;
}

.pa-kpi-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pa-kpi-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 6px;
    letter-spacing: -0.02em;
}

.pa-kpi-pct-badge {
    font-size: 0.74rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.14);
    padding: 2px 7px;
    border-radius: 9999px;
    line-height: 1;
    vertical-align: middle;
}

.pa-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 3px;
    line-height: 1.2;
    word-break: break-word;
}

/* Control Toolbar */
.pa-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 22px;
}

.pa-toolbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pa-toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Date navigation capsule */
.pa-date-capsule {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3px 6px;
    gap: 3px;
}

[data-theme="dark"] .pa-date-capsule {
    background: rgba(255, 255, 255, 0.05);
}

.pa-date-nav-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pa-date-nav-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.pa-date-input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
    color: var(--text-muted);
}

.pa-date-input {
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
}

/* Eliminate duplicate browser native calendar indicator by stretching it transparently across input */
.pa-date-input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pa-today-btn {
    border: none;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.08));
    color: #4f46e5;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pa-today-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: scale(1.02);
}

/* Search input with icon */
.pa-search-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pa-search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.pa-search-input {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 14px 8px 36px;
    color: var(--text-main);
    font-size: 0.84rem;
    outline: none;
    min-width: 200px;
    transition: all 0.2s ease;
}

[data-theme="dark"] .pa-search-input {
    background: rgba(255, 255, 255, 0.04);
}

.pa-search-input:focus {
    border-color: #6366f1;
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.pa-select-action {
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 0 12px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 180px;
    outline: none;
    transition: all 0.2s ease;
}

.pa-select-action:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.pa-toolbar-btn {
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.pa-btn-simpan-aksi {
    height: 38px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 0 18px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    white-space: nowrap;
}

.pa-btn-simpan-aksi:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.pa-btn-simpan-aksi:active {
    transform: translateY(0);
}

/* Attendance Table */
.pa-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.pa-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.pa-table thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    padding: 10px 8px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

[data-theme="dark"] .pa-table thead th {
    background: rgba(15, 23, 42, 0.95);
    color: #94a3b8;
}

.pa-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.pa-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

.pa-table td {
    padding: 9px 8px;
    vertical-align: middle;
}

.pa-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.04);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

[data-theme="dark"] .pa-num-badge {
    background: rgba(255, 255, 255, 0.06);
}

.pa-nim-badge {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.pa-wa-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(37, 211, 102, 0.12);
    color: #25d366;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    vertical-align: middle;
}

.pa-wa-link:hover {
    background: #25d366;
    color: #ffffff;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
}

.pa-student-name {
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    font-size: 0.88rem;
}

.pa-phone-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.pa-time-cell {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Status Badges */
.pa-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1;
}

.pa-status-badge.hadir {
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .pa-status-badge.hadir {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.pa-status-badge.tidak-hadir {
    background: rgba(239, 68, 68, 0.14);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

[data-theme="light"] .pa-status-badge.tidak-hadir {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

/* Pill Toggle Buttons: [ HADIR | SAKIT | IZIN | ALPA ] */
.pa-pill-group {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 2px;
    gap: 1.5px;
}

[data-theme="dark"] .pa-pill-group {
    background: rgba(255, 255, 255, 0.06);
}

.pa-pill-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.pa-pill-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .pa-pill-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pa-pill-btn.btn-hadir.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.45);
}

.pa-pill-btn.btn-sakit.active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.45);
}

.pa-pill-btn.btn-izin.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
}

.pa-pill-btn.btn-alpa.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
}

.pa-actions-cell {
    min-width: 245px;
    text-align: center;
}

.pa-note-cell {
    min-width: 190px;
    vertical-align: middle;
}

.pa-note-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.pa-note-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    opacity: 0.55;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
}

.pa-note-input {
    width: 100%;
    height: 33px;
    padding: 4px 26px 4px 28px;
    font-size: 0.80rem;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pa-note-input::placeholder {
    color: var(--text-dim);
    font-size: 0.76rem;
    font-style: italic;
    opacity: 0.8;
}

[data-theme="dark"] .pa-note-input {
    background: rgba(30, 41, 59, 0.55);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
}

.pa-note-input:hover {
    border-color: rgba(2, 132, 199, 0.5);
    background: var(--bg-card, #ffffff);
}

.pa-note-input:focus {
    border-color: #0284c7;
    background: var(--bg-card, #ffffff);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

[data-theme="dark"] .pa-note-input:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(15, 23, 42, 0.85);
}

[data-theme="dark"] .pa-note-input:focus {
    background: rgba(15, 23, 42, 0.95);
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.pa-note-clear-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 1px 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.pa-note-clear-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.pa-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.pa-quick-chip {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}

.pa-quick-chip:hover {
    background: var(--primary, #6366f1);
    color: #ffffff;
    border-color: var(--primary, #6366f1);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .pa-quick-chip {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

[data-theme="dark"] .pa-quick-chip:hover {
    background: #6366f1;
    color: #ffffff;
    border-color: #818cf8;
}

/* ==========================================================================
   MOBILE CARD VIEW FOR ATTENDANCE TABLE (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .pa-container {
        padding: 10px 12px calc(80px + env(safe-area-inset-bottom, 16px)) !important;
    }
    .pa-hero-card {
        padding: 16px 16px !important;
        border-radius: 16px !important;
        margin-bottom: 16px !important;
    }
    /* Mobile Header & Visibility */
    .pa-badge-text-desktop,
    .pa-title-desktop,
    .pa-count-desktop,
    .pa-class-pill-desktop {
        display: none !important;
    }
    .pa-badge-text-mobile,
    .pa-title-mobile,
    .pa-count-mobile {
        display: inline !important;
    }
    .pa-hero-badges-row {
        gap: 6px !important;
        margin-bottom: 8px !important;
    }
    .pa-hero-badges-row .ketua-badge-glow {
        padding: 3px 9px !important;
        font-size: 0.74rem !important;
        letter-spacing: 0.3px !important;
    }
    .pa-hero-title {
        font-size: 1.05rem !important;
        gap: 8px !important;
    }
    .pa-student-count-badge {
        font-size: 0.72rem !important;
        padding: 2px 8px !important;
    }
    .pa-hero-actions-col {
        width: 100% !important;
        margin-top: 4px !important;
        display: flex !important;
        gap: 8px !important;
    }
    .pa-hero-actions-col .btn {
        flex: 1 !important;
        justify-content: center !important;
        font-size: 0.78rem !important;
        padding: 7px 10px !important;
    }

    /* Subtabs Horizontal Ribbon on Mobile */
    .pa-subtab-container {
        margin-top: 14px !important;
        padding-top: 12px !important;
    }
    .pa-segmented-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .pa-segmented-nav::-webkit-scrollbar {
        display: none !important;
    }
    .pa-seg-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 7px 12px !important;
        font-size: 0.80rem !important;
    }

    /* Mobile Bento KPI Grid */
    .pa-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }
    .pa-kpi-card.kpi-total {
        grid-column: span 2 !important;
    }
    .pa-kpi-card {
        padding: 12px 14px !important;
        border-radius: 14px !important;
        gap: 12px !important;
    }
    .pa-kpi-icon {
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
    }
    .pa-kpi-val {
        font-size: 1.35rem !important;
    }
    .pa-kpi-label {
        font-size: 0.72rem !important;
    }

    .pa-toolbar {
        padding: 12px 14px !important;
        border-radius: 14px !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .pa-toolbar-left {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .pa-date-capsule {
        width: 100% !important;
        box-sizing: border-box !important;
        justify-content: space-between !important;
        padding: 4px 8px !important;
    }

    .pa-search-wrapper {
        width: 100% !important;
    }

    .pa-search-input {
        width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
    }

    .pa-toolbar-right {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .pa-select-action {
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
        height: 38px !important;
        font-size: 0.80rem !important;
    }

    .pa-toolbar-btn {
        flex-shrink: 0 !important;
        height: 38px !important;
        font-size: 0.80rem !important;
        padding: 0 12px !important;
        white-space: nowrap !important;
    }

    /* Prominent toolbar save button on mobile */
    #btnSimpanAksiPa,
    .pa-toolbar .pa-btn-simpan-aksi {
        width: 100% !important;
        height: 42px !important;
        justify-content: center !important;
        font-size: 0.88rem !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
        margin-top: 2px !important;
    }
    .pa-table-wrapper {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow-x: visible !important;
        padding: 0 !important;
        margin-bottom: 16px !important;
    }
    .pa-table {
        min-width: 0 !important;
        width: 100% !important;
        display: block !important;
        border: none !important;
    }
    .pa-table thead {
        display: none !important;
    }
    .pa-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .pa-table tbody tr {
        display: flex !important;
        flex-direction: column !important;
        background: var(--bg-card, #ffffff) !important;
        border: 1px solid rgba(226, 232, 240, 0.9) !important;
        border-radius: 16px !important;
        padding: 14px 16px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
        gap: 8px !important;
        position: relative !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    }
    [data-theme="dark"] .pa-table tbody tr {
        background: rgba(17, 24, 39, 0.75) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    }
    .pa-table td {
        padding: 0 !important;
        border: none !important;
    }
    /* Row Checkbox: top right */
    .pa-td-check {
        position: absolute !important;
        top: 14px !important;
        right: 14px !important;
        z-index: 2 !important;
    }
    .pa-td-no {
        display: none !important;
    }
    /* Name cell: top row */
    .pa-name-cell {
        order: 1 !important;
        padding-right: 32px !important;
    }
    .pa-name-cell .pa-student-name {
        font-size: 0.96rem !important;
        font-weight: 800 !important;
        color: var(--text-main) !important;
    }
    /* NIM cell: middle row */
    .pa-nim-cell {
        order: 2 !important;
    }
    /* Time cell: below NIM */
    .pa-time-cell {
        order: 3 !important;
        font-size: 0.74rem !important;
        color: var(--text-dim) !important;
    }
    /* Status Badge: covered by active pill */
    .pa-status-cell {
        display: none !important;
    }
    /* Action Pills: bottom full-width touch group */
    .pa-actions-cell {
        order: 4 !important;
        width: 100% !important;
        margin-top: 4px !important;
    }
    .pa-actions-cell .pa-pill-group {
        width: 100% !important;
        display: flex !important;
        box-sizing: border-box !important;
        background: rgba(241, 245, 249, 0.9) !important;
        border: 1px solid rgba(226, 232, 240, 0.8) !important;
        border-radius: 12px !important;
        padding: 3px !important;
        gap: 3px !important;
    }
    [data-theme="dark"] .pa-actions-cell .pa-pill-group {
        background: rgba(15, 23, 42, 0.6) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
    }
    .pa-actions-cell .pa-pill-btn {
        flex: 1 !important;
        text-align: center !important;
        padding: 8px 2px !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        border-radius: 9px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    /* Note Cell: full-width input right below actions */
    .pa-note-cell {
        order: 5 !important;
        width: 100% !important;
        margin-top: 6px !important;
    }
    .pa-note-wrapper {
        min-width: 0 !important;
        width: 100% !important;
    }
    .pa-note-input {
        height: 38px !important;
        font-size: 0.82rem !important;
        border-radius: 10px !important;
    }
    .pa-quick-chips {
        gap: 5px !important;
        margin-top: 6px !important;
    }
    .pa-quick-chip {
        padding: 3px 9px !important;
        font-size: 0.72rem !important;
        border-radius: 7px !important;
    }
}


.ketua-badge-glow {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.45);
}

/* Bulk Import Modal Styling */
.pa-import-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pa-import-textarea {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 12px;
    font-family: monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    resize: vertical;
}

.pa-import-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
    width: fit-content;
}

/* Classical Consultation Cards */
.pa-classical-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius, 14px);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pa-classical-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.pa-classical-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.pa-classical-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pa-classical-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pa-classical-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pa-classical-notes {
    font-size: 0.86rem;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #6366f1;
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
}

[data-theme="light"] .pa-classical-notes {
    background: #f8fafc;
    border-left-color: #4f46e5;
}

/* Responsive Toolbar */
@media (max-width: 768px) {
    .pa-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .pa-toolbar-left, .pa-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* Dosen PA Dashboard & KPI Enhancements */
.pa-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .pa-charts-grid {
        grid-template-columns: 1fr;
    }
}

.pa-risk-panel {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 5px solid #ef4444;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 22px;
}

[data-theme="light"] .pa-risk-panel {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #ef4444;
}

.pa-subtab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pa-subtab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Ketua Kelas & Thesis Only 2-Tab Bottom Nav (Mobile Screens <= 768px Only) */
.ketua-only-bottom-nav,
.thesis-only-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .ketua-only-bottom-nav,
    .thesis-only-bottom-nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        max-width: 320px !important;
        height: 46px !important;
        border-radius: 23px !important;
        padding: 3px 6px !important;
        gap: 6px !important;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    }

    [data-theme="dark"] .ketua-only-bottom-nav,
    [data-theme="dark"] .thesis-only-bottom-nav {
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }

    .ketua-only-bottom-nav .mob-nav-link,
    .thesis-only-bottom-nav .mob-nav-link {
        flex: 1 !important;
        height: 100% !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !important;
        padding: 2px 6px !important;
        border-radius: 18px !important;
        transition: all 0.2s ease !important;
        text-decoration: none !important;
        color: var(--text-muted) !important;
    }

    .ketua-only-bottom-nav .mob-nav-link::after,
    .thesis-only-bottom-nav .mob-nav-link::after {
        display: none !important;
    }

    .ketua-only-bottom-nav .mob-nav-icon-wrapper,
    .thesis-only-bottom-nav .mob-nav-icon-wrapper {
        width: 28px !important;
        height: 18px !important;
        border-radius: 9px !important;
    }

    .ketua-only-bottom-nav .mob-nav-label,
    .thesis-only-bottom-nav .mob-nav-label {
        font-size: 0.58rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.1px !important;
        line-height: 1.1 !important;
    }

    .ketua-only-bottom-nav .mob-nav-link.active,
    .thesis-only-bottom-nav .mob-nav-link.active {
        background: rgba(99, 102, 241, 0.10) !important;
        color: var(--primary, #4f46e5) !important;
    }

    [data-theme="dark"] .ketua-only-bottom-nav .mob-nav-link.active,
    [data-theme="dark"] .thesis-only-bottom-nav .mob-nav-link.active {
        background: rgba(99, 102, 241, 0.20) !important;
        color: #a5b4fc !important;
    }

    .ketua-only-bottom-nav .mob-nav-link.active .mob-nav-icon-wrapper,
    .thesis-only-bottom-nav .mob-nav-link.active .mob-nav-icon-wrapper {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: inherit !important;
        transform: none !important;
    }

    .ketua-only-bottom-nav .mob-nav-link.active .mob-nav-label,
    .thesis-only-bottom-nav .mob-nav-link.active .mob-nav-label {
        color: inherit !important;
        font-weight: 700 !important;
        transform: none !important;
    }
}

@media (min-width: 769px) {
    .ketua-only-bottom-nav,
    .thesis-only-bottom-nav,
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* =========================================================================
   UNIVERSAL EXCEL SPREADSHEET PREVIEW STYLING (SheetJS Integration)
   ========================================================================= */
.excel-viewer-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-main, #ffffff);
}

.excel-sheets-tabs {
    scrollbar-width: thin;
}

.excel-sheet-tab-btn:hover {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
}

.excel-table-scroll {
    scrollbar-width: thin;
}

.excel-table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.excel-table-scroll::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.35);
    border-radius: 4px;
}

.excel-table-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.6);
}

.excel-preview-table tr:hover td {
    background: rgba(16, 185, 129, 0.06) !important;
}

[data-theme="dark"] .excel-viewer-wrapper {
    background: #0f172a;
}

[data-theme="dark"] .excel-preview-table th {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .excel-preview-table td {
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .excel-first-row td {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #34d399 !important;
}

/* =========================================================================
   LECTURERHUB 2026 - ULTRA-MODERN COMPREHENSIVE DESIGN REFINEMENT
   State-of-the-Art Visual Polish for Desktop & Mobile (Dark & Light)
   ========================================================================= */

/* --- 1. Global Typography & Core Micro-Interactions --- */
html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Sleek Minimalist Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.55);
}

/* Glassmorphism 2.0 Surface Elevations */
.card,
.glass-panel,
.glass-card {
    border-radius: 20px !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease !important;
}

.card:hover,
.glass-panel:hover,
.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.35) !important;
    box-shadow: 0 20px 42px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

[data-theme="light"] .card,
[data-theme="light"] .glass-panel,
[data-theme="light"] .glass-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
}

[data-theme="light"] .card:hover,
[data-theme="light"] .glass-panel:hover,
[data-theme="light"] .glass-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(99, 102, 241, 0.15) !important;
}

/* --- 2. Desktop Sidebar & Navigation Overhaul --- */
.sidebar {
    background: rgba(11, 15, 25, 0.82) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.94) !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.03) !important;
}

.brand-title {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

[data-theme="light"] .brand-title {
    background: linear-gradient(135deg, #0f172a 0%, #334155 50%, #475569 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.sidebar-nav {
    gap: 7px !important;
}

.nav-link {
    padding: 11px 16px !important;
    border-radius: 14px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav-link:hover {
    color: #f8fafc !important;
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateX(3px) !important;
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.24) 0%, rgba(139, 92, 246, 0.16) 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.45) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px -3px rgba(99, 102, 241, 0.28) !important;
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22%;
    height: 56%;
    width: 3.5px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #6366f1, #06b6d4);
    box-shadow: 0 0 10px #6366f1;
}

[data-theme="light"] .nav-link {
    color: #475569 !important;
}

[data-theme="light"] .nav-link:hover {
    color: #0f172a !important;
    background: #f1f5f9 !important;
}

[data-theme="light"] .nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    color: #4f46e5 !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12) !important;
}

/* Sidebar User Bottom Card */
.sidebar-user {
    padding-top: 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.user-info {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    padding: 8px 12px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="light"] .user-info {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .user-info:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.user-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35) !important;
}

/* --- 3. Top Bar (Header Area) Refinements --- */
.top-bar-title h1 {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: var(--text-main) !important;
}

.top-bar-title p {
    font-size: 0.88rem !important;
    color: var(--text-muted) !important;
    margin-top: 2px !important;
}

/* Bell Notification Button */
.notification-bell-btn,
#dosenNotificationWrap .notification-bell-btn,
#mhsMobileNotificationWrap .notification-bell-btn {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.notification-bell-btn:hover {
    background: rgba(99, 102, 241, 0.18) !important;
    border-color: rgba(99, 102, 241, 0.45) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25) !important;
}

[data-theme="light"] .notification-bell-btn {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .notification-bell-btn:hover {
    background: #f1f5f9 !important;
    border-color: #6366f1 !important;
    color: #4f46e5 !important;
}

/* Theme Toggle Button */
.btn-theme-toggle {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-main) !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px) !important;
}

[data-theme="light"] .btn-theme-toggle {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .btn-theme-toggle:hover {
    background: #f1f5f9 !important;
}

/* --- 4. Stat Cards & Bento Metrics Deck --- */
.stat-card,
.kpi-card,
.bento-card {
    border-radius: 20px !important;
    padding: 22px 20px !important;
    position: relative !important;
    overflow: hidden !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.stat-card:hover,
.kpi-card:hover,
.bento-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.3) !important;
}

.stat-card .stat-icon,
.kpi-card .kpi-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.35) !important;
    flex-shrink: 0 !important;
    transition: transform 0.25s ease !important;
}

.stat-card:hover .stat-icon,
.kpi-card:hover .kpi-icon {
    transform: scale(1.08) rotate(2deg) !important;
}

.stat-value,
.kpi-value {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    font-feature-settings: 'tnum' !important;
    color: var(--text-main) !important;
}

.stat-label,
.kpi-label {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-top: 4px !important;
}

/* --- 5. Modern Buttons & Form Controls --- */
.btn {
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-family: var(--font-heading) !important;
    padding: 10px 18px !important;
    font-size: 0.92rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn:hover {
    transform: translateY(-2px) !important;
}

.btn:active {
    transform: translateY(0) scale(0.98) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px -2px rgba(99, 102, 241, 0.45) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    box-shadow: 0 10px 24px -2px rgba(99, 102, 241, 0.6) !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-main) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

[data-theme="light"] .btn-secondary {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .btn-secondary:hover {
    background: #e2e8f0 !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px -2px rgba(16, 185, 129, 0.4) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px -2px rgba(239, 68, 68, 0.4) !important;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px -2px rgba(245, 158, 11, 0.4) !important;
}

.btn-sm {
    padding: 7px 14px !important;
    font-size: 0.82rem !important;
    border-radius: 10px !important;
}

/* Modern Form Controls */
.form-control,
select.form-control,
textarea.form-control {
    border-radius: 13px !important;
    padding: 11px 16px !important;
    font-size: 0.92rem !important;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.22) !important;
    outline: none !important;
}

[data-theme="light"] .form-control,
[data-theme="light"] select.form-control,
[data-theme="light"] textarea.form-control {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] select.form-control:focus,
[data-theme="light"] textarea.form-control:focus {
    background: #ffffff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.16) !important;
}

/* --- 6. Universal Reusable Modals & Dialogs --- */
.modal-overlay {
    backdrop-filter: blur(24px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
    background: rgba(0, 0, 0, 0.65) !important;
    z-index: 1000000 !important;
}

body.modal-open .pwa-install-banner,
body:has(.modal-overlay.active) .pwa-install-banner,
body:has(.swal2-container.swal2-shown) .pwa-install-banner {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.modal-content {
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100dvh - 36px) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    animation: modalSpringIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
}

@keyframes modalSpringIn {
    0% { opacity: 0; transform: scale(0.94) translateY(12px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 20px 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    position: relative !important;
    flex-shrink: 0 !important;
    z-index: 10 !important;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 24px;
    width: 60px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
}

.modal-header h3 {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

.modal-body {
    padding: 22px 24px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    box-sizing: border-box !important;
}

.modal-footer {
    padding: 15px 24px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    flex-shrink: 0 !important;
    margin-top: auto !important;
    z-index: 10 !important;
    position: relative !important;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25) !important;
    box-sizing: border-box !important;
}

[data-theme="light"] .modal-content {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18) !important;
}

[data-theme="light"] .modal-header {
    border-bottom-color: #f1f5f9 !important;
}

[data-theme="light"] .modal-footer {
    background: #f8fafc !important;
    border-top-color: #e2e8f0 !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05) !important;
}

/* --- 7. Modern Mobile Experience (<= 768px) --- */
@media (max-width: 768px) {
    .mobile-top-header {
        background: rgba(11, 15, 25, 0.88) !important;
        backdrop-filter: blur(24px) saturate(190%) !important;
        -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
        padding: 10px 16px !important;
        height: 60px !important;
    }

    [data-theme="light"] .mobile-top-header {
        background: rgba(255, 255, 255, 0.94) !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
    }

    .mobile-user-chip {
        border-radius: 9999px !important;
        padding: 4px 10px 4px 4px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        transition: all 0.2s ease !important;
    }

    [data-theme="light"] .mobile-user-chip {
        background: #f1f5f9 !important;
        border-color: #e2e8f0 !important;
    }

    .mobile-user-avatar {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
    }

    /* Floating Capsule Bottom Navigation */
    .mobile-bottom-nav {
        border-radius: 9999px !important;
        background: rgba(15, 23, 42, 0.92) !important;
        backdrop-filter: blur(28px) saturate(190%) !important;
        -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.6), 0 2px 10px rgba(0, 0, 0, 0.4) !important;
        height: 56px !important;
    }

    [data-theme="light"] .mobile-bottom-nav {
        background: rgba(255, 255, 255, 0.95) !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }

    .mob-nav-link.active {
        color: #6366f1 !important;
    }

    .mob-nav-link.active .mob-nav-icon-wrap {
        background: rgba(99, 102, 241, 0.15) !important;
        box-shadow: 0 0 14px rgba(99, 102, 241, 0.35) !important;
    }

    /* Quick Action Sheet Modal */
    .mob-action-sheet {
        border-radius: 28px 28px 0 0 !important;
        background: rgba(15, 23, 42, 0.95) !important;
        backdrop-filter: blur(32px) saturate(190%) !important;
        -webkit-backdrop-filter: blur(32px) saturate(190%) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.6) !important;
    }

    [data-theme="light"] .mob-action-sheet {
        background: rgba(255, 255, 255, 0.98) !important;
        border-top-color: #e2e8f0 !important;
        box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.1) !important;
    }

    .mob-grid-item {
        border-radius: 18px !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        padding: 14px 8px !important;
        transition: all 0.22s ease !important;
    }

    .mob-grid-item:active {
        transform: scale(0.95) !important;
        background: rgba(99, 102, 241, 0.15) !important;
    }

    [data-theme="light"] .mob-grid-item {
        background: #f8fafc !important;
        border-color: #e2e8f0 !important;
    }
}

/* --- 8. Tables & Lists Enhancements --- */
.table-responsive,
.table-wrapper {
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

[data-theme="light"] .table-responsive,
[data-theme="light"] .table-wrapper {
    border-color: #e2e8f0 !important;
}

table thead th {
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--text-muted) !important;
    padding: 14px 18px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="light"] table thead th {
    background: #f8fafc !important;
    border-bottom-color: #e2e8f0 !important;
    color: #475569 !important;
}

table tbody td {
    padding: 14px 18px !important;
    font-size: 0.9rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: background 0.18s ease !important;
}

[data-theme="light"] table tbody td {
    border-bottom-color: #f1f5f9 !important;
}

table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.05) !important;
}

[data-theme="light"] table tbody tr:hover td {
    background: #f8fafc !important;
}

/* --- 9. FullCalendar Event Badges & Highlights --- */
.fc .fc-event {
    border-radius: 8px !important;
    padding: 3px 6px !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    border: none !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

.fc .fc-event:hover {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.fc-day-today {
    background: rgba(99, 102, 241, 0.06) !important;
}

[data-theme="light"] .fc-day-today {
    background: rgba(99, 102, 241, 0.04) !important;
}

/* --- 10. SweetAlert2 Popups Design Alignment --- */
.swal2-container {
    z-index: 1000005 !important;
    padding: 12px !important;
}

.swal2-popup {
    border-radius: 24px !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    font-family: var(--font-heading) !important;
    max-height: calc(100dvh - 32px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

[data-theme="dark"] .swal2-popup {
    background: rgba(15, 23, 42, 0.95) !important;
    color: #f8fafc !important;
}

[data-theme="light"] .swal2-popup {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

.swal2-html-container {
    max-height: 55vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 1rem 1.4rem !important;
    box-sizing: border-box !important;
}

.swal2-actions {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    width: 100% !important;
    padding: 8px 16px 16px !important;
    box-sizing: border-box !important;
    z-index: 5 !important;
}

.swal2-confirm,
.swal2-cancel {
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-family: var(--font-heading) !important;
    padding: 10px 20px !important;
}

@media (max-width: 768px) {
    .swal2-actions {
        flex-direction: column-reverse !important;
        gap: 8px !important;
    }
    .swal2-actions button {
        width: 100% !important;
        margin: 0 !important;
        min-height: 42px !important;
    }
}

@media (max-height: 540px) {
    .modal-content {
        max-height: calc(100dvh - 12px) !important;
    }
    .modal-header {
        padding: 10px 16px !important;
    }
    .modal-body {
        padding: 10px 16px !important;
    }
    .modal-footer {
        padding: 8px 16px !important;
        flex-direction: row !important;
    }
    .modal-footer .btn,
    .modal-footer > div .btn {
        min-height: 36px !important;
        padding: 6px 12px !important;
    }
}

/* =========================================================================
   WIDE MODAL OVERRIDES (BI STRATEGY REKAP & LARGE DATA TABLES)
   ========================================================================= */
.modal-content.bistrategy-rekap-dialog {
    width: 95vw !important;
    max-width: 1080px !important;
}

.modal-content.bistrategy-play-dialog {
    width: 96vw !important;
    max-width: 1180px !important;
}

.modal-content.modal-lg {
    width: 94vw !important;
    max-width: 1040px !important;
}

.modal-content.modal-xl {
    width: 96vw !important;
    max-width: 1240px !important;
}

/* Modal Tables & Compact Clue Grids */
.tts-clues-table th,
.tts-clues-table td {
    padding: 8px 8px !important;
    vertical-align: middle !important;
}

[data-theme="light"] .tts-clues-table th {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .tts-clues-table td {
    border-bottom: 1px solid #f1f5f9 !important;
}

.tts-clues-table tr:hover td {
    background: rgba(99, 102, 241, 0.04) !important;
}

/* BI Strategy Rekap Table Responsive Styling */
.bistrategy-table-scroll-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 14px !important;
    background: rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .bistrategy-table-scroll-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

.bistrategy-rekap-table {
    width: 100% !important;
    min-width: 820px !important;
    border-collapse: collapse !important;
}

.bistrategy-rekap-table th {
    padding: 12px 14px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: var(--text-muted) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    white-space: nowrap !important;
}

.bistrategy-rekap-table td {
    padding: 12px 14px !important;
    font-size: 0.88rem !important;
    border-bottom: 1px solid var(--glass-border) !important;
    vertical-align: middle !important;
}

.bistrategy-rekap-table tr:hover td {
    background: rgba(99, 102, 241, 0.06) !important;
}

[data-theme="light"] .bistrategy-rekap-table th {
    background: #f8fafc !important;
    border-bottom-color: #e2e8f0 !important;
    color: #475569 !important;
}

[data-theme="light"] .bistrategy-rekap-table td {
    border-bottom-color: #f1f5f9 !important;
}

[data-theme="light"] .bistrategy-rekap-table tr:hover td {
    background: #f8fafc !important;
}

@media (max-width: 768px) {
    .modal-content.bistrategy-rekap-dialog,
    .modal-content.bistrategy-play-dialog,
    .modal-content.modal-lg,
    .modal-content.modal-xl {
        width: 96vw !important;
        max-width: 96vw !important;
        margin: 6px auto !important;
    }
}

/* ==========================================================================
   DOSEN EXECUTIVE ANALYTICS DASHBOARD (MENU DASHBOARD DENGAN GRAFIK)
   ========================================================================== */
.overview-dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-bottom: 48px;
    animation: fadeIn 0.35s ease-out;
}

/* Welcome Hero Card */
.overview-welcome-card {
    position: relative;
    overflow: hidden;
    padding: 24px 28px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.16) 0%, rgba(14, 165, 233, 0.1) 50%, rgba(139, 92, 246, 0.12) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

[data-theme="light"] .overview-welcome-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(14, 165, 233, 0.06) 50%, rgba(243, 244, 246, 0.95) 100%);
    border-color: rgba(99, 102, 241, 0.22);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
}

.overview-welcome-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.overview-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #38bdf8 100%);
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}

.overview-welcome-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.overview-welcome-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.overview-welcome-chips {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.overview-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

[data-theme="light"] .overview-chip {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.overview-chip.live-dot::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

/* KPI Summary Cards */
.overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

@media (max-width: 1400px) {
    .overview-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .overview-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .overview-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.overview-kpi-card {
    padding: 20px 22px;
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.overview-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.overview-kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.overview-kpi-icon.blue { background: rgba(56, 189, 248, 0.16); color: #0284c7; }
.overview-kpi-icon.indigo { background: rgba(99, 102, 241, 0.16); color: #6366f1; }
.overview-kpi-icon.emerald { background: rgba(16, 185, 129, 0.16); color: #10b981; }
.overview-kpi-icon.amber { background: rgba(245, 158, 11, 0.16); color: #f59e0b; }
.overview-kpi-icon.rose { background: rgba(239, 68, 68, 0.16); color: #ef4444; }
.overview-kpi-icon.purple { background: rgba(168, 85, 247, 0.16); color: #a855f7; }
.overview-kpi-icon.cyan { background: rgba(6, 182, 212, 0.16); color: #06b6d4; }

.overview-kpi-content {
    flex: 1;
    min-width: 0;
}

.overview-kpi-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
}

.overview-kpi-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.overview-kpi-meta {
    font-size: 0.77rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Charts Grid System */
.overview-charts-grid-row1 {
    display: grid;
    grid-template-columns: 1.75fr 1fr;
    gap: 20px;
}

.overview-charts-grid-row2 {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .overview-charts-grid-row1,
    .overview-charts-grid-row2 {
        grid-template-columns: 1fr;
    }
}

.overview-chart-card {
    padding: 22px 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.overview-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.overview-chart-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overview-chart-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.overview-chart-wrap {
    position: relative;
    flex: 1;
    min-height: 270px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lower Section Grid */
.overview-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .overview-bottom-grid {
        grid-template-columns: 1fr;
    }
}

/* Agenda & Watchlist item styles */
.overview-list-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.overview-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.overview-item-card:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(2px);
}

[data-theme="light"] .overview-item-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .overview-item-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.overview-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.overview-item-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-item-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Quick shortcut action chips */
.overview-shortcut-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.overview-shortcut-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.overview-shortcut-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

[data-theme="light"] .overview-shortcut-btn {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .overview-shortcut-btn:hover {
    background: #f8fafc;
    border-color: #6366f1;
}

/* Action Alerts & Banners */
.overview-alerts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overview-alert-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--text-main);
    flex-wrap: wrap;
    transition: all 0.25s ease;
}

[data-theme="light"] .overview-alert-banner {
    background: #fffbeb;
    border-color: #fde68a;
}

.overview-alert-banner.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .overview-alert-banner.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.overview-alert-banner.alert-primary {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .overview-alert-banner.alert-primary {
    background: #eef2ff;
    border-color: #c7d2fe;
}

/* Progress Bar for Attendance & Completion */
.overview-progress-bar {
    width: 100%;
    height: 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
    margin-top: 6px;
}

[data-theme="light"] .overview-progress-bar {
    background: #e2e8f0;
}

.overview-progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* ==========================================================================
   BIMBINGAN APLIKASI & SISTEM (SOFTWARE MENTORSHIP WORKSPACE)
   ========================================================================== */
.thesis-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

@media (max-width: 640px) {
    .thesis-app-grid {
        grid-template-columns: 1fr;
    }
}

.thesis-app-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.thesis-app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    border-color: rgba(99, 102, 241, 0.35);
}

[data-theme="light"] .thesis-app-card {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .thesis-app-card:hover {
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.12);
}

.thesis-app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.thesis-app-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
    margin: 4px 0 8px 0;
    letter-spacing: -0.01em;
}

.thesis-tech-tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 14px 0;
}

.thesis-tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .thesis-tech-tag {
    background: #e0e7ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.thesis-live-links-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

[data-theme="light"] .thesis-live-links-bar {
    background: #f8fafc;
}

.thesis-live-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.thesis-live-link-btn.btn-demo {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.thesis-live-link-btn.btn-demo:hover {
    background: #10b981;
    color: #ffffff;
    transform: translateY(-1px);
}

.thesis-live-link-btn.btn-repo {
    background: rgba(56, 189, 248, 0.15);
    color: #0284c7;
    border-color: rgba(56, 189, 248, 0.3);
}

.thesis-live-link-btn.btn-repo:hover {
    background: #0284c7;
    color: #ffffff;
    transform: translateY(-1px);
}

.thesis-live-link-btn.btn-apk {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.thesis-live-link-btn.btn-apk:hover {
    background: #f59e0b;
    color: #ffffff;
    transform: translateY(-1px);
}

.thesis-module-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.thesis-module-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .thesis-module-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.thesis-module-feedback-box {
    margin-top: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid #6366f1;
    font-size: 0.82rem;
    color: var(--text-main);
    line-height: 1.45;
}

[data-theme="light"] .thesis-module-feedback-box {
    background: #eef2ff;
}



