:root {
    --black: #030305;
    --black-light: #0a0a0e;
    --gold: #2563eb;
    --gold-dark: #1d4ed8;
    --white: #f8fafc;
    --success: #2ecc71;
    --danger: #e74c3c;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.05);
}

body { font-family: 'Inter', sans-serif; background: var(--black); color: var(--white); margin: 0; display: flex; height: 100vh; overflow: hidden; }

/* LAYOUT */
.sidebar { width: 260px; background: var(--black-light); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 30px 0; flex-shrink: 0; }
.logo-area { padding: 0 30px 20px; font-family: 'Cinzel', serif; font-size: 1.4rem; color: var(--gold); border-bottom: 1px solid var(--border); letter-spacing: 1px; font-weight: 800; }
.nav-list { list-style: none; padding: 20px; margin: 0; flex: 1; overflow-y: auto; }
.nav-item { padding: 13px 20px; margin-bottom: 8px; border-radius: 8px; cursor: pointer; transition: 0.3s; color: var(--text-muted); font-weight: 500; font-size: 0.95rem; border: 1px solid transparent; }
.nav-item:hover, .nav-item.active { background: rgba(37, 99, 235, 0.1); color: var(--gold); border-color: rgba(37, 99, 235, 0.2); box-shadow: 0 0 15px rgba(37, 99, 235, 0.1); }
.logout-btn { margin: 20px; padding: 12px; background: rgba(231, 76, 60, 0.1); color: var(--danger); border: 1px solid rgba(231, 76, 60, 0.2); border-radius: 8px; cursor: pointer; text-align: center; transition: 0.3s; font-weight: 600;}
.logout-btn:hover { background: rgba(231, 76, 60, 0.2); }

.viewport { flex: 1; padding: 40px; overflow-y: auto; background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 60%); }
.header { margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center;}
.header h1 { font-family: 'Cinzel', serif; font-size: 2rem; margin: 0 0 5px 0; color: #fff;}
.subtitle { color: var(--text-muted); font-size: 0.9rem; letter-spacing: 1px; }

/* MODULES */
.view-section { display: none; animation: fadeIn 0.4s ease-out forwards; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* STATS & CHARTS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: var(--black-light); padding: 25px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 4px 6px rgba(0,0,0,0.3);}
.stat-val { font-size: 2rem; font-weight: 700; color: white; margin: 10px 0; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.chart-container { background: var(--black-light); padding: 25px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 30px; height: 350px;}

/* DATATABLES */
.data-table-wrapper { background: var(--black-light); border-radius: 12px; border: 1px solid var(--border); overflow-y: auto; margin-bottom: 30px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 15px 20px; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); background: rgba(0, 0, 0, 0.2); }
td { padding: 15px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.02); font-size: 0.9rem; vertical-align: middle; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* BADGES & BUTTONS */
.badge { padding: 5px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; display: inline-block; }
.badge-placed { background: rgba(255, 255, 255, 0.1); color: white; }
.badge-processing { background: rgba(243, 156, 18, 0.15); color: #f39c12; }
.badge-shipped { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.badge-delivered { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.badge-cancelled { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.badge-admin { background: rgba(37,99,235,0.2); color: var(--gold); }
.badge-user { background: rgba(255,255,255,0.1); color: var(--text-muted); }

.btn-action { background: transparent; border: 1px solid var(--gold); color: var(--gold); padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.75rem; font-weight: 600; transition: 0.3s; margin-right:5px;}
.btn-action:hover { background: var(--gold); color: black; box-shadow: 0 0 10px var(--gold); }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.75rem; font-weight: 600; transition: 0.3s; }
.btn-danger:hover { background: var(--danger); color: white; box-shadow: 0 0 10px rgba(231,76,60,0.5); }
.btn-primary, .btn-save { padding: 12px 24px; background: var(--gold); color: var(--black); border: none; border-radius: 6px; font-weight: 700; cursor: pointer; transition: 0.3s; font-family: inherit;}
.btn-primary:hover, .btn-save:hover { box-shadow: 0 0 20px rgba(37, 99, 235, 0.5); transform: translateY(-2px); }

/* FORMS & MODALS */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
.settings-card { background: var(--black-light); padding: 25px; border-radius: 12px; border: 1px solid var(--border); }
.settings-card h3 { margin-top: 0; color: var(--gold); font-family: 'Cinzel'; border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 20px;}

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600;}
.form-control { width: 100%; padding: 10px 15px; background: #050505; border: 1px solid var(--border); color: white; border-radius: 6px; font-family: inherit; font-size: 0.9rem; box-sizing: border-box; }
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 10px rgba(37,99,235,0.2);}

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); z-index: 1000; align-items: center; justify-content: center; }
.modal-content { background: var(--black-light); padding: 30px; border-radius: 12px; width: 500px; max-width: 90%; border: 1px solid var(--gold); box-shadow: 0 0 50px rgba(0, 0, 0, 0.8); max-height: 90vh; overflow-y: auto;}

/* SECURE LOGIN GATE */
#adminLoginGate { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--black); z-index: 9999; display: flex; justify-content: center; align-items: center; flex-direction: column; }
.auth-box { background: var(--black-light); padding: 50px; border-radius: 16px; border: 1px solid rgba(37,99,235,0.2); width: 400px; box-shadow: 0 0 50px rgba(0,0,0,0.8); text-align: center; }

/* Image Preview */
.img-preview { width: 60px; height: 60px; object-fit: contain; background: #111; border-radius: 8px; border: 1px solid var(--border); }
