/* =====================================================
   SISTEM INFORMASI PEMBAYARAN SPP - SMK AL AMIN
   Modern CSS with Dark Theme
   ===================================================== */

:root {
    /* Premium Modern Colors */
    --primary: #4f46e5;      /* Indigo 600 */
    --primary-dark: #3730a3; /* Indigo 800 */
    --primary-light: #818cf8;/* Indigo 400 */
    --secondary: #0ea5e9;    /* Sky 500 */
    --success: #059669;      /* Emerald 600 */
    --warning: #d97706;      /* Amber 600 */
    --danger: #dc2626;       /* Red 600 */
    --info: #2563eb;         /* Blue 600 */
    
    /* Dark Theme Surface Colors */
    --bg-dark: #020617;      /* Slate 950 */
    --bg-card: #0f172a;      /* Slate 900 */
    --bg-hover: #1e293b;     /* Slate 800 */
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #cbd5e1;/* Slate 300 */
    --text-muted: #64748b;   /* Slate 500 */
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Rich Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-danger: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-info: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    
    /* Dimensions & Fluid Typography */
    --sidebar-width: 260px;
    --header-height: 70px;
    --font-base: clamp(14px, 2vw, 16px);
    --font-h1: clamp(24px, 4vw, 32px);
    --font-h2: clamp(20px, 3vw, 24px);
    
    /* Elegant Shadows & Radii */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Glassmorphism Defaults */
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(16px);
    
    /* Micro Animations */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =====================================================
   LIGHT MODE - Override CSS Variables
   ===================================================== */
body.light-mode {
    --bg-dark: #f8fafc;      /* Slate 50 */
    --bg-card: #ffffff;      /* White */
    --bg-hover: #f1f5f9;     /* Slate 100 */
    --text-primary: #0f172a; /* Slate 900 */
    --text-secondary: #334155;/* Slate 700 */
    --text-muted: #64748b;   /* Slate 500 */
    --border-color: rgba(0, 0, 0, 0.06);
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.06);
    --shadow-xl: 0 16px 40px rgba(0,0,0,0.08);
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
}

/* ── Base ── */
body.light-mode { background: #f0f4f8 !important; color: #1e293b; }
body.light-mode .content-wrapper { background: #f0f4f8; }

/* ── Light layout ── */
body.light-mode .sidebar { background: #ffffff; border-right-color: #e2e8f0; }
body.light-mode .top-header { background: #fff; border-bottom: 1px solid #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
body.light-mode .page-title { color: #1e293b; }
body.light-mode .user-name { color: #1e293b; }
body.light-mode .btn-logout { color: #64748b; }
body.light-mode .btn-logout:hover { color: #ef4444; }
body.light-mode .sidebar-footer { background: #f8fafc; color: #64748b; border-top-color: #e2e8f0; }
body.light-mode .sidebar-header .logo { color: #1e293b; }
body.light-mode .nav-link { color: #475569; }
body.light-mode .nav-link:hover { color: #3730a3; background: #eef2ff; }
body.light-mode .nav-link.active { color: #4338ca; background: #eef2ff; }

/* ── Cards ── */
body.light-mode .card { background: #fff; border-color: #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
body.light-mode .card-header { background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
body.light-mode .card-title { color: #1e293b; }
body.light-mode .glass { background: #fff; border-color: #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }

/* ── Forms ── */
body.light-mode .form-control,
body.light-mode .form-control-simple,
body.light-mode select.form-control,
body.light-mode textarea.form-control { background: #fff; border: 1.5px solid #d1d9e6; color: #1e293b; }
body.light-mode .form-control:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
body.light-mode label { color: #334155; }

/* ── Tables ── */
body.light-mode .table th { background: #f1f5f9; color: #334155; border-color: #e2e8f0; font-weight: 600; }
body.light-mode .table td { border-color: #e2e8f0; color: #1e293b; }
body.light-mode .table tr:hover td { background: #f8fafc; }
body.light-mode .table { color: #1e293b; }

/* ── Buttons ── */
body.light-mode .btn-secondary { background: #e8edf2; color: #334155; border-color: #d1d9e6; }
body.light-mode .btn-secondary:hover { background: #d1d9e6; }
body.light-mode .nav-section { color: #94a3b8; }

/* ── Alerts ── */
body.light-mode .alert { background: #fff; border-color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
body.light-mode .alert-success { border-left: 4px solid #10b981; }
body.light-mode .alert-danger { border-left: 4px solid #ef4444; }

/* ── Login ── */
body.light-mode .login-container { background: #f0f4f8; }
body.light-mode .login-box { background: #fff; border-color: #e2e8f0; box-shadow: 0 8px 32px rgba(0,0,0,0.08); }

/* ── Stats ── */
body.light-mode .stat-number { color: #1e293b; }
body.light-mode .stat-label { color: #64748b; }

/* ── Student Portal Header ── */
body.light-mode .siswa-portal-header { background: #fff !important; border-bottom: 1px solid #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
body.light-mode .brand-section h1 { color: #1e293b !important; }
body.light-mode .brand-section p { color: #64748b; }
body.light-mode .action-btn.pass { background: #f1f5f9; border-color: #d1d9e6; color: #475569; }
body.light-mode .action-btn.pass:hover { background: #e2e8f0; }

/* ══════════════════════════════════════════
   Student Portal Dashboard — Light Mode
   ══════════════════════════════════════════ */

/* Hero Card */
body.light-mode .hero-card {
    background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%) !important;
    border-color: rgba(99,102,241,0.2) !important;
    box-shadow: 0 4px 16px rgba(99,102,241,0.08);
}
body.light-mode .hero-info .name { color: #1e293b !important; }
body.light-mode .hero-info .greeting { color: #6366f1 !important; }
body.light-mode .hero-badge.nis { background: rgba(99,102,241,0.12); color: #4f46e5; border-color: rgba(99,102,241,0.25); }
body.light-mode .hero-badge.kelas { background: rgba(14,165,233,0.1); color: #0369a1; border-color: rgba(14,165,233,0.2); }

/* Announcement */
body.light-mode .ann-strip {
    background: #fffbeb !important; border-color: #fde68a !important;
    box-shadow: 0 1px 4px rgba(245,158,11,0.06);
}
body.light-mode .ann-strip-icon { background: rgba(245,158,11,0.12); }
body.light-mode .ann-item-title { color: #92400e !important; }
body.light-mode .ann-item-text { color: #78350f !important; }

/* SPP Card */
body.light-mode .spp-card {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff) !important;
    border-color: rgba(99,102,241,0.2) !important;
    box-shadow: 0 2px 8px rgba(99,102,241,0.06);
}
body.light-mode .spp-card:hover { box-shadow: 0 8px 24px rgba(99,102,241,0.12) !important; border-color: rgba(99,102,241,0.35) !important; }
body.light-mode .spp-card-info h3 { color: #1e293b !important; }
body.light-mode .spp-card-info p { color: #475569 !important; }
body.light-mode .spp-card-icon { background: rgba(99,102,241,0.1) !important; }
body.light-mode .spp-badge.ok { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
body.light-mode .spp-badge.warn { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* Category headers */
body.light-mode .cat-label { font-weight: 800; }
body.light-mode .cat-line { background: linear-gradient(90deg, #d1d9e6, transparent) !important; }

/* Payment Cards */
body.light-mode .pay-card {
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
body.light-mode .pay-card:hover {
    background: #fff !important;
    border-color: #c7d2fe !important;
    box-shadow: 0 8px 28px rgba(99,102,241,0.1) !important;
    transform: translateY(-4px);
}
body.light-mode .pay-card-name { color: #1e293b !important; font-weight: 700; }
body.light-mode .pay-card-arrow { color: #cbd5e1 !important; }
body.light-mode .pay-card:hover .pay-card-arrow { color: #6366f1 !important; }

/* Status pills in light mode */
body.light-mode .pill-lunas { background: #ecfdf5 !important; color: #065f46 !important; border-color: #a7f3d0 !important; }
body.light-mode .pill-pending { background: #fef2f2 !important; color: #991b1b !important; border-color: #fecaca !important; }
body.light-mode .pill-verif { background: #eff6ff !important; color: #1e40af !important; border-color: #bfdbfe !important; }
body.light-mode .pill-nyicil { background: #fffbeb !important; color: #92400e !important; border-color: #fde68a !important; }
body.light-mode .status-lunas { color: #059669 !important; }
body.light-mode .status-pending { color: #dc2626 !important; }
body.light-mode .status-verif { color: #2563eb !important; }
body.light-mode .status-warning { color: #d97706 !important; }

/* Rejection cards */
body.light-mode .reject-card { background: #fef2f2 !important; border-color: #fecaca !important; border-left: 4px solid #ef4444 !important; }
body.light-mode .reject-body h5 { color: #1e293b !important; }
body.light-mode .reject-body p { color: #475569 !important; }
body.light-mode .reject-note { background: #fff5f5 !important; border-color: #fecaca !important; }
body.light-mode .reject-note small { color: #dc2626 !important; }
body.light-mode .reject-note span { color: #991b1b !important; }

/* ══════════════════════════════════════════
   Admin Keuangan Premium Cards — Light Mode
   ══════════════════════════════════════════ */
body.light-mode .premium-card { background: #fff !important; border: 1.5px solid #e2e8f0 !important; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
body.light-mode .premium-card:hover { border-color: #c7d2fe !important; box-shadow: 0 8px 28px rgba(99,102,241,0.1) !important; }
body.light-mode .premium-card::before { background: linear-gradient(90deg, transparent, rgba(99,102,241,0.03), transparent) !important; }
body.light-mode .card-title-box h4 { color: #1e293b !important; }
body.light-mode .card-title-box .price { color: #475569 !important; }
body.light-mode .card-stats { background: #f8fafc !important; border: 1px solid #e2e8f0; }
body.light-mode .stat-val { color: #1e293b !important; }
body.light-mode .stat-label { color: #64748b !important; }

/* ── Modals ── */
body.light-mode .modal-rejection-content { background: #fff !important; border-color: #e2e8f0 !important; }
body.light-mode .modal-rejection-title { color: #1e293b !important; }
body.light-mode .modal-rejection-reason { color: #334155 !important; background: #fef2f2 !important; }

/* ── Smooth theme transition ── */
body { transition: background-color 0.35s ease, color 0.35s ease; }
.sidebar, .top-header, .card, .glass, .form-control, .table, .btn-secondary,
.siswa-portal-header, .content-wrapper, .hero-card, .pay-card, .spp-card, .premium-card {
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

/* Tooltip label */
.theme-switch-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 99999;
}
.theme-switch-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    user-select: none;
    transition: color 0.3s;
}
@media (max-width: 768px) {
    .theme-switch-label { display: none; }
}

/* ── Premium Theme Toggle Switch ── */
.theme-switch {
    position: relative;
    width: 64px; height: 32px;
    border-radius: 50px;
    cursor: pointer !important;
    pointer-events: auto !important;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 99999;
}
.theme-switch::before {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    box-shadow: 0 2px 8px rgba(99,102,241,0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    pointer-events: none;
}
/* Moon icon (dark mode) */
.theme-switch .ts-moon {
    position: absolute; right: 8px; top: 50%;
    transform: translateY(-50%);
    font-size: 13px; color: #fbbf24;
    z-index: 2;
    transition: all 0.3s ease;
    opacity: 1;
    pointer-events: none;
}
/* Sun icon (light mode) */
.theme-switch .ts-sun {
    position: absolute; left: 8px; top: 50%;
    transform: translateY(-50%);
    font-size: 14px; color: #f59e0b;
    z-index: 2;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}
/* Stars decoration (dark mode) */
.theme-switch .ts-stars {
    position: absolute; top: 6px; left: 10px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 8px 4px 0 0 rgba(255,255,255,0.6),
                14px -2px 0 -1px rgba(255,255,255,0.4),
                20px 6px 0 -1px rgba(255,255,255,0.3);
    transition: all 0.4s ease;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}    opacity: 1;
}
/* Sun icon (light mode) */
.theme-switch .ts-sun {
    position: absolute; left: 8px; top: 50%;
    transform: translateY(-50%);
    font-size: 14px; color: #f59e0b;
    z-index: 2;
    transition: all 0.3s ease;
    opacity: 0;
}
/* Stars decoration (dark mode) */
.theme-switch .ts-stars {
    position: absolute; top: 6px; left: 10px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 8px 4px 0 0 rgba(255,255,255,0.6),
                14px -2px 0 -1px rgba(255,255,255,0.4),
                20px 6px 0 -1px rgba(255,255,255,0.3);
    transition: all 0.4s ease;
    opacity: 1;
    z-index: 1;
}

/* ── Light Mode Active State ── */
body.light-mode .theme-switch {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
    border-color: rgba(59,130,246,0.3);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1), 0 1px 3px rgba(59,130,246,0.15);
}
body.light-mode .theme-switch::before {
    transform: translateX(32px);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 8px rgba(245,158,11,0.5);
}
body.light-mode .theme-switch .ts-moon { opacity: 0; transform: translateY(-50%) scale(0.5); }
body.light-mode .theme-switch .ts-sun  { opacity: 1; }
body.light-mode .theme-switch .ts-stars { opacity: 0; transform: translateX(-10px); }

/* Hover glow */
.theme-switch:hover {
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.4), 0 0 16px rgba(99,102,241,0.3);
    transform: scale(1.05);
}
body.light-mode .theme-switch:hover {
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1), 0 0 16px rgba(245,158,11,0.3);
}

/* Tooltip label */
.theme-switch-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}
.theme-switch-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    user-select: none;
    transition: color 0.3s;
}
@media (max-width: 768px) {
    .theme-switch-label { display: none; }
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    font-size: var(--font-base);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Native WebView performance mode: keep interactions instant on lower-end phones. */
html.native-app-mode {
    -webkit-tap-highlight-color: transparent;
}

html.native-app-mode *,
html.native-app-mode *::before,
html.native-app-mode *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

html.native-app-mode .bottom-nav,
html.native-app-mode .sidebar.active {
    box-shadow: none !important;
}

html.native-app-mode .card,
html.native-app-mode .glass,
html.native-app-mode [class*="shadow"],
html.native-app-mode .siswa-portal-header {
    box-shadow: none !important;
}

html.native-app-mode .login-container::before,
html.native-app-mode .login-container::after {
    display: none;
}

/* LOGIN */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--gradient-primary);
    border-radius: 50%;
    top: -300px;
    right: -200px;
    opacity: 0.1;
    filter: blur(100px);
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--secondary);
    border-radius: 50%;
    bottom: -200px;
    left: -100px;
    opacity: 0.1;
    filter: blur(80px);
}

.login-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: white;
    box-shadow: var(--shadow-lg);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.app-download {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.app-download .btn {
    min-height: 48px;
    background: #3ddc84;
    border: 1px solid #3ddc84;
    color: #123322;
    box-shadow: 0 4px 14px rgba(61, 220, 132, 0.22);
    font-size: 15px;
}

body.light-mode .app-download .btn {
    background: #3ddc84;
    border-color: #3ddc84;
    color: #123322;
}

.app-download .btn:hover {
    background: #57e596;
    border-color: #57e596;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(61, 220, 132, 0.32);
}

.app-download .btn i {
    font-size: 19px;
}

.app-download .btn:focus-visible {
    outline: 3px solid rgba(61, 220, 132, 0.5);
    outline-offset: 3px;
}

.app-download__hint {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 8px;
    margin: 14px 0 0;
    padding: 10px 12px;
    background: rgba(61, 220, 132, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.app-download__hint i {
    margin-top: 2px;
    color: #3ddc84;
}

/* FORM */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

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

.form-control-simple {
    padding: 12px 16px;
}

select.form-control {
    padding: 14px 16px;
    cursor: pointer;
}

textarea.form-control {
    padding: 14px 16px;
    min-height: 100px;
    resize: vertical;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* LAYOUT */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition-normal);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-header .logo i {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

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

.nav-menu {
    list-style: none;
}

.nav-section {
    padding: 16px 20px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 2px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-normal);
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

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

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 11px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-admin {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

.badge-bendahara {
    background: rgba(34, 211, 238, 0.2);
    color: var(--secondary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.btn-logout {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

.content-wrapper {
    flex: 1;
    padding: 24px;
}

/* ALERTS */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

/* CARDS */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-dark);
}

/* STAT CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    box-shadow: none;
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    box-shadow: none;
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    box-shadow: none;
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    box-shadow: none;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

/* TABLES */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table th {
    background: transparent;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table td {
    font-size: 14px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* TOOLBAR */
.toolbar {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-group select {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 150px;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* PAYMENT STATUS */
.payment-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.payment-status.lunas {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.payment-status.belum {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* PRINT */
.print-container {
    background: white;
    color: #1a1a1a;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.print-header {
    text-align: center;
    border-bottom: 3px double #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.print-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
}

.print-subtitle {
    font-size: 14px;
    color: #666;
}

@media print {
    body * {
        visibility: hidden;
    }

    .print-container,
    .print-container * {
        visibility: visible;
    }

    .print-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
    }

    .no-print {
        display: none !important;
    }
}

/* FORM LAYOUT */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

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

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 16px;
    }

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

    .toolbar {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

    .card-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    /* Mobile Table Improvements */
    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
        width: 100%;
        /* Full width buttons on mobile table */
        justify-content: center;
    }
}

/* UTILITIES */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade {
    animation: fadeIn 0.4s ease forwards;
}

.animate-slide-up {
    animation: slideInUp 0.5s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.5s ease forwards;
}

/* GLASSMORPHISM */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
}

/* STUDENT LIST ENHANCEMENTS */
.grade-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.status-badge {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.btn-action {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    transition: var(--transition-normal);
    color: white;
}

.btn-action:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    color: #10b981 !important;
    font-size: 13px;
    transition: var(--transition-normal);
}

.contact-link:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateX(5px);
}
