:root {
            --bg: #f4f6f9;
            --surface: #ffffff;
            --surface-2: #f8f9fc;
            --border: #e8eaf0;
            --text-primary: #1a1d2e;
            --text-secondary: #6b7280;
            --text-muted: #9ca3af;
            --accent: #6366f1;
            --accent-light: #eef0fe;
            --accent-2: #8b5cf6;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
            --shadow-lg: 0 12px 32px rgba(0,0,0,0.09), 0 4px 12px rgba(0,0,0,0.05);
            --radius: 16px;
            --radius-md: 14px;
            --radius-sm: 10px;
            --radius-lg: 22px;
            --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'DM Sans', sans-serif;
            background: var(--bg);
            color: var(--text-primary);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 48px 20px 60px;
        }

        /* Subtle background texture */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background: 
                radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99,102,241,0.06) 0%, transparent 60%),
                radial-gradient(ellipse 60% 50% at 80% 90%, rgba(139,92,246,0.05) 0%, transparent 55%);
            pointer-events: none;
            z-index: 0;
        }

        .container {
            width: 100%;
            max-width: 900px;
            position: relative;
            z-index: 1;
        }

        /* HEADER */
        header {
            text-align: center;
            margin-bottom: 44px;
            animation: fadeUp 0.6s ease both;
        }

        .logo-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--accent-light);
            color: var(--accent);
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            padding: 5px 14px;
            border-radius: 100px;
            margin-bottom: 16px;
        }

        .logo-badge span { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

        h1 {
            font-family: 'Sora', sans-serif;
            font-size: 2.6rem;
            font-weight: 800;
            color: var(--text-primary);
            letter-spacing: -1.5px;
            line-height: 1.1;
            margin-bottom: 10px;
        }

        h1 .accent { 
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .subtitle {
            font-size: 0.95rem;
            color: var(--text-secondary);
            font-weight: 400;
        }

        /* DIVIDER */
        .divider {
            width: 40px;
            height: 3px;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            border-radius: 10px;
            margin: 20px auto 0;
        }

        /* GRID */
        .menu-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
            gap: 16px;
        }

        /* CARD */
        .menu-item {
            background: var(--surface);
            border-radius: var(--radius);
            padding: 28px 16px 24px;
            text-decoration: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 14px;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
            transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
            animation: fadeUp 0.5s ease both;
            position: relative;
            overflow: hidden;
        }

        .menu-item::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--radius);
            opacity: 0;
            background: linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.04));
            transition: opacity 0.28s ease;
        }

        .menu-item:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
            border-color: rgba(99,102,241,0.2);
        }

        .menu-item:hover::after { opacity: 1; }
        .menu-item:active { transform: scale(0.97); }

        /* Staggered animation */
        .menu-item:nth-child(1)  { animation-delay: 0.05s; }
        .menu-item:nth-child(2)  { animation-delay: 0.10s; }
        .menu-item:nth-child(3)  { animation-delay: 0.15s; }
        .menu-item:nth-child(4)  { animation-delay: 0.20s; }
        .menu-item:nth-child(5)  { animation-delay: 0.25s; }
        .menu-item:nth-child(6)  { animation-delay: 0.30s; }
        .menu-item:nth-child(7)  { animation-delay: 0.35s; }
        .menu-item:nth-child(8)  { animation-delay: 0.40s; }
        .menu-item:nth-child(9)  { animation-delay: 0.45s; }
        .menu-item:nth-child(10) { animation-delay: 0.50s; }
        .menu-item:nth-child(11) { animation-delay: 0.55s; }
        .menu-item:nth-child(12) { animation-delay: 0.60s; }

        /* ICON */
        .icon-wrapper {
            width: 54px;
            height: 54px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            transition: transform 0.28s ease;
            flex-shrink: 0;
        }

        .menu-item:hover .icon-wrapper { transform: scale(1.08); }

        .icon-wrapper.c1 { background: #eef0fe; color: #6366f1; }
        .icon-wrapper.c2 { background: #f0fdf4; color: #22c55e; }
        .icon-wrapper.c3 { background: #fefce8; color: #ca8a04; }
        .icon-wrapper.c4 { background: #f0f9ff; color: #0ea5e9; }
        .icon-wrapper.c5 { background: #fdf4ff; color: #a855f7; }
        .icon-wrapper.c6 { background: #fff1f2; color: #f43f5e; }

        /* LABEL */
        .menu-item .text-group {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
        }

        .menu-item .label {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-primary);
            text-align: center;
            line-height: 1.3;
            display: block;
        }

        .menu-item .label-sub {
            font-size: 0.72rem;
            color: var(--text-muted);
            font-weight: 400;
            text-align: center;
            display: block;
            line-height: 1.2;
        }

        /* DARK TOGGLE — Fixed position, top-right, consistent across all pages */
        .dark-toggle {
            position: fixed;
            top: 14px;
            right: 14px;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-primary);
            box-shadow: var(--shadow-md);
            cursor: pointer;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 999;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }
        .dark-toggle:hover {
            transform: scale(1.08) rotate(15deg);
            box-shadow: var(--shadow-lg);
            border-color: var(--accent);
            color: var(--accent);
        }
        .dark-toggle:active { transform: scale(0.95); }

        /* FOOTER */
        footer {
            margin-top: 52px;
            text-align: center;
            color: var(--text-muted);
            font-size: 0.8rem;
            font-weight: 400;
            animation: fadeUp 0.8s 0.7s ease both;
        }

        footer a { color: var(--accent); text-decoration: none; }

        /* DARK MODE */
        body.dark {
            --bg: #0d0f1a;
            --surface: #141625;
            --surface-2: #1a1d30;
            --border: #252840;
            --text-primary: #f1f3f9;
            --text-secondary: #8b93a8;
            --text-muted: #5a6272;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
            --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
            --accent-light: rgba(99,102,241,0.15);
        }

        /* SEARCH WRAPPER */
        .search-wrap {
            position: relative;
            margin-bottom: 16px;
            width: 100%;
        }
        .search-wrap input {
            width: 100%;
            padding: 12px 16px 12px 40px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-primary);
            font-size: 0.9rem;
            transition: var(--transition);
        }
        .search-wrap input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-light);
            outline: none;
        }
        .search-wrap i {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
        }

        /* BADGES */
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border-radius: 100px;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .badge-accent { background: var(--accent-light); color: var(--accent); }
        .badge-success { background: #ecfdf5; color: #10b981; }
        .badge-danger { background: #fef2f2; color: #ef4444; }

        /* ANIMATIONS */
        @keyframes pulse-soft {
            0% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(0.95); }
            100% { opacity: 1; transform: scale(1); }
        }
        .animate-pulse { animation: pulse-soft 2s infinite ease-in-out; }

        body.dark .icon-wrapper.c1 { background: rgba(99,102,241,0.15); }
        body.dark .icon-wrapper.c2 { background: rgba(34,197,94,0.12); }
        body.dark .icon-wrapper.c3 { background: rgba(202,138,4,0.12); }
        body.dark .icon-wrapper.c4 { background: rgba(14,165,233,0.12); }
        body.dark .icon-wrapper.c5 { background: rgba(168,85,247,0.12); }
        body.dark .icon-wrapper.c6 { background: rgba(244,63,94,0.12); }

        /* ANIMATION */
        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(18px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* UTILS */
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            width: 100%;
        }

        .card {
            background: var(--surface);
            border-radius: var(--radius);
            padding: 24px;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
            margin-bottom: 20px;
            animation: fadeUp 0.5s ease both;
        }

        .card-desc {
            color: var(--text-secondary);
            margin-bottom: 20px;
            line-height: 1.5;
        }

        .section-title {
            font-family: 'Sora', sans-serif;
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 20px;
            color: var(--text-primary);
        }

        /* FORMS */
        .form-group { margin-bottom: 20px; text-align: left; }
        label { 
            display: block; 
            font-size: 0.85rem; 
            font-weight: 600; 
            margin-bottom: 8px; 
            color: var(--text-secondary);
        }

        input[type="text"], 
        input[type="number"], 
        input[type="date"], 
        select, 
        textarea {
            width: 100%;
            padding: 12px 16px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border);
            background: var(--surface-2);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }

        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-light);
            background: var(--surface);
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px;
            border-radius: var(--radius-sm);
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            font-family: inherit;
            text-decoration: none;
        }

        .btn-primary { background: var(--accent); color: white; }
        .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); filter: brightness(1.1); }
        
        .btn-secondary { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border); }
        .btn-secondary:hover { background: var(--border); }

        .btn-danger { background: #ef4444; color: white; }
        .btn-danger:hover { background: #dc2626; }

        .btn-block { width: 100%; justify-content: center; }
        .btn-left { justify-content: flex-start; }

        .btn-group-col {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        /* TABLES */
        .table-container {
            width: 100%;
            overflow-x: auto;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border);
            background: var(--surface);
            margin-bottom: 20px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
        }

        th {
            background: var(--surface-2);
            padding: 14px 16px;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-weight: 700;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border);
        }

        td {
            padding: 14px 16px;
            font-size: 0.9rem;
            color: var(--text-primary);
            border-bottom: 1px solid var(--border);
        }

        tr:last-child td { border-bottom: none; }
        tr:hover td { background: var(--surface-2); }

        /* BACK BUTTON — Fixed position, top-left, consistent across all pages */
        .back-btn {
            position: fixed;
            top: 14px;
            left: 14px;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--surface);
            border: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-primary);
            text-decoration: none;
            transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-md);
            z-index: 999;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            font-size: 0.9rem;
        }
        .back-btn:hover {
            transform: translateX(-3px) scale(1.05);
            background: var(--accent-light);
            color: var(--accent);
            border-color: var(--accent);
            box-shadow: var(--shadow-lg);
        }
        .back-btn:active { transform: scale(0.95); }

        /* EXPORT BAR — used by roster */
        .export-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        .export-bar-left h2 {
            font-family: 'Sora', sans-serif;
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 2px;
        }
        .export-sub {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .export-bar-right {
            display: flex;
            gap: 8px;
        }
        .btn-export {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            border-radius: var(--radius-sm);
            font-weight: 600;
            font-size: 0.82rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid var(--border);
            font-family: inherit;
            color: var(--text-primary);
            background: var(--surface);
        }
        .btn-export:hover { background: var(--accent); color: white; border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
        .btn-export svg { width: 14px; height: 14px; }

        /* LOADING TEXT — used in pengeluaran overlay */
        .loading-text {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-top: 8px;
        }
        .overlay-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }

        /* RESPONSIVE */
        @media (max-width: 540px) {
            body { padding: 32px 16px 80px; }
            h1 { font-size: 2rem; letter-spacing: -1px; }
            .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
            .menu-item { padding: 22px 12px 20px; }
            /* back-btn & dark-toggle stay fixed — no override needed */
        }