:root {
    --bg-deep: #05070a;
    --bg-card: rgba(13, 17, 23, 0.9);
    --accent: #926a14;
    --accent-glow: rgba(109, 82, 9, 0.4);
    --success: #00ffa3;
    --text-main: #ffffff;
    --text-dim: #718096;
    --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--bg-deep); color: var(--text-main); overflow-x: hidden; }
.hidden { display: none !important; }

/* --- SPLASH SCREEN --- */
#splash-screen {
    position: fixed; inset: 0; background: var(--bg-deep);
    display: flex; flex-direction: column; justify-content: center;
    align-items: center; z-index: 10000; transition: 0.8s;
}
.logo-glow { width: 100px; height: 100px; background: var(--accent); filter: blur(60px); position: absolute; opacity: 0.5; }
.glitch { font-size: 2.5rem; font-weight: 800; letter-spacing: 5px; text-shadow: 0 0 15px var(--accent); z-index: 1; }
.loader-bar { width: 150px; height: 2px; background: rgba(255,255,255,0.1); border-radius: 10px; margin-top: 20px; overflow: hidden; }
.loader-fill { width: 0%; height: 100%; background: var(--accent); animation: loading 2s ease-in-out forwards; }
@keyframes loading { to { width: 100%; } }

/* --- LOGIN PAGE --- */
#login-page { height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; }
.login-card {
    background: var(--bg-card); backdrop-filter: blur(20px); padding: 30px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05); width: 100%; max-width: 380px; text-align: center;
}
.input-group-auth { position: relative; margin-bottom: 15px; text-align: left; }
.input-group-auth i { position: absolute; left: 15px; top: 13px; color: var(--accent); }
.input-group-auth input {
    width: 100%; background: rgba(0,0,0,0.3); border: 1px solid #2d333f;
    padding: 12px 12px 12px 45px; border-radius: 10px; color: #fff; outline: none;
}
.btn-auth { width: 100%; padding: 12px; border-radius: 10px; border: none; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }

/* --- DASHBOARD LAYOUT --- */
#admin-panel { display: flex; min-height: 100vh; }

/* Sidebar Mobile Toggle Logic */
.sidebar {
    width: var(--sidebar-width); background: #0d1117; border-right: 1px solid #1a1f2b;
    display: flex; flex-direction: column; transition: 0.3s; z-index: 999;
}
.main-wrapper { flex-grow: 1; min-width: 0; background: var(--bg-deep); }
.top-bar {
    padding: 15px 25px; background: #0d1117; display: flex;
    justify-content: space-between; align-items: center; border-bottom: 1px solid #1a1f2b;
}
.menu-toggle { display: none; font-size: 1.5rem; color: #fff; cursor: pointer; }

/* Responsive Stats */
.content-body { padding: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: var(--bg-card); padding: 20px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.05); }
.stat-card h2 { font-size: 1.5rem; margin-top: 10px; }

/* Table Responsive */
.table-container { background: var(--bg-card); border-radius: 15px; padding: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { text-align: left; color: var(--text-dim); padding: 12px; font-size: 0.8rem; border-bottom: 1px solid #1a1f2b; }
td { padding: 12px; font-size: 0.85rem; border-bottom: 1px solid #1a1f2b; }
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; }

/* MOBILE OVERRIDES */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .sidebar {
        position: fixed; left: -100%; height: 100%;
    }
    .sidebar.active { left: 0; }
    .sidebar-overlay {
        display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 998;
    }
    .sidebar-overlay.active { display: block; }
    .stats-grid { grid-template-columns: 1fr; }
    .top-bar { 
        padding: 15px; 
        z-index: 1000; 
        position: fixed;
        top: 0; left: 0;
        width: 100%;
        margin-bottom: 100px;
    }
    .content-body { padding: 15px; margin-top: 30px;}
    .admin-user p { display: none; }
}

.nav-item { padding: 15px 25px; display: flex; align-items: center; gap: 12px; color: var(--text-dim); text-decoration: none; }
.nav-item.active { background: rgba(226, 168, 43, 0.1); color: #fff; border-left: 4px solid var(--accent); }
/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
}
.modal-content {
    background: #0f121d;
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 400px;
    padding: 30px;
    border-radius: 28px;
    position: relative;
    transform: scale(0.9);
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-overlay.active .modal-content { transform: scale(1); }
.input-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid transparent;
}
.input-group:focus-within { border-color: var(--accent); }
.input-group input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 100%;
    outline: none;
    font-family: inherit;
}
.loading-ring {
    display: none;
    width: 80px; height: 80px;
    margin: 20px auto;
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.success-msg {
    display: none;
    text-align: center;
    color: var(--accent);
    animation: bounceIn 0.5s ease;
}
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}