/* --- RESET & VARIABLES (DARK GLASS THEME) --- */
:root {
    /* Base Colors */
    --bg-body: #050505;       /* Hitam Pekat */
    --text-main: #e2e8f0;     /* Putih Tulang */
    --text-muted: #94a3b8;    /* Abu-abu Terang */
    
    /* Branding */
    --accent: #6366f1;        /* Indigo Neon (Lebih terang dari sebelumnya biar kontras) */
    --accent-hover: #4f46e5;
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 12px;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
    
    /* Functional Colors */
    --success: #10b981;
    --danger: #ef4444;
    --border: var(--glass-border); /* Override border standar */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    outline: none; /* Hapus outline default browser */
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    /* Opsional: Tambah background image noise/gradient biar glass-nya makin kerasa */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08), transparent 25%), 
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.05), transparent 25%);
    background-attachment: fixed;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

/* --- UTILITIES --- */
.hidden { display: none !important; }

.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Button Global Base */
button { cursor: pointer; font-family: inherit; transition: 0.2s; }

/* Scrollbar Keren (Chrome/Safari) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* --- TOAST NOTIFICATION --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: slideIn 0.3s ease-out forwards;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Warna Status Toast (Tetap solid biar kebaca jelas) */
.toast.success { background: rgba(16, 185, 129, 0.9); color: white; }
.toast.error { background: rgba(239, 68, 68, 0.9); color: white; }

.toast .close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-left: 15px;
    opacity: 0.8;
}
.toast .close-btn:hover { opacity: 1; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- FIX: MENCEGAH INPUT JADI PUTIH SAAT DIKETIK/AUTOFILL --- */

/* 1. Paksa text jadi putih & background transparan/gelap saat autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    /* Hack: Timpa background putih bawaan browser dengan shadow kedalam warna gelap */
    -webkit-box-shadow: 0 0 0 30px #050505 inset !important;
    
    /* Paksa teks tetap putih */
    -webkit-text-fill-color: #e2e8f0 !important;
    
    /* Transisi biar gak kaget warnanya */
    transition: background-color 5000s ease-in-out 0s;
}

/* 2. Pastikan saat fokus manual juga tetap gelap */
input:focus, select:focus, textarea:focus {
    background-color: rgba(0, 0, 0, 0.4) !important;
    color: white !important;
    box-shadow: none !important; /* Reset shadow default browser */
    border-color: var(--accent) !important;
}

/* 3. Memberitahu browser bahwa web ini support dark mode (biar scrollbar & elemen native lain menyesuaikan) */
:root {
    color-scheme: dark;
}