/* ================= Admin panel ================= */
:root {
  --bg: #0d0d11; --panel: #16161c; --panel-2: #1d1d24; --line: #2a2a33;
  --text: #ececed; --muted: #8f8f9c; --gold: #c9a24b; --gold-soft:#e4c983;
  --green:#4caf50; --red:#f44336; --amber:#e0a63b; --blue:#4a90d9;
  --radius: 12px; --font: 'Inter', system-ui, sans-serif;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height:1.55; }
a { color: var(--gold); text-decoration:none; }
input, select, textarea, button { font-family: inherit; }

/* Login */
.login-wrap { min-height:100vh; display:grid; place-items:center; padding:24px;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(201,162,75,.10), transparent), var(--bg); }
.login-card { background: var(--panel); border:1px solid var(--line); border-radius:16px; padding:40px; width:100%; max-width:400px; box-shadow:0 30px 80px rgba(0,0,0,.5); }
.login-card h1 { font-size:1.5rem; margin-bottom:6px; }
.login-card .sub { color:var(--muted); font-size:.9rem; margin-bottom:26px; }
.login-hint { margin-top:18px; font-size:.8rem; color:var(--muted); text-align:center; background:var(--panel-2); padding:10px; border-radius:8px; }

/* Layout */
.layout { display:grid; grid-template-columns:250px 1fr; min-height:100vh; }
.sidebar { background: var(--panel); border-right:1px solid var(--line); padding:24px 16px; position:sticky; top:0; height:100vh; overflow-y:auto; }
.side-brand { font-size:1.2rem; font-weight:700; padding:0 12px 20px; letter-spacing:.03em; }
.side-brand span { color:var(--gold); }
.side-nav { display:flex; flex-direction:column; gap:4px; }
.side-nav button { display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:none; border:none; color:var(--muted);
  padding:11px 14px; border-radius:9px; cursor:pointer; font-size:.92rem; transition:.15s; }
.side-nav button:hover { background:var(--panel-2); color:var(--text); }
.side-nav button.active { background:rgba(201,162,75,.14); color:var(--gold); font-weight:600; }
.side-nav .badge { margin-left:auto; background:var(--red); color:#fff; font-size:.68rem; padding:1px 7px; border-radius:100px; }
.side-foot { margin-top:auto; padding:16px 12px 0; }

.main { padding:32px 40px; overflow-y:auto; }
.topbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:28px; flex-wrap:wrap; gap:12px; }
.topbar h2 { font-size:1.5rem; }
.topbar .who { color:var(--muted); font-size:.85rem; }

/* Cards / grid */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(180px,1fr)); gap:16px; margin-bottom:28px; }
.stat-box { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:20px; }
.stat-box .big { font-size:2rem; font-weight:700; color:var(--gold); }
.stat-box .lbl { color:var(--muted); font-size:.82rem; }

.panel { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:24px; margin-bottom:22px; }
.panel h3 { font-size:1.1rem; margin-bottom:16px; display:flex; align-items:center; gap:8px; }

/* Forms */
.field { margin-bottom:14px; }
.field label { display:block; font-size:.8rem; color:var(--muted); margin-bottom:6px; }
.field input, .field select, .field textarea { width:100%; padding:10px 12px; background:var(--panel-2); border:1px solid var(--line);
  border-radius:9px; color:var(--text); font-size:.9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline:none; border-color:var(--gold); }
.field textarea { resize:vertical; min-height:80px; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; }

/* Buttons */
.btn { display:inline-flex; align-items:center; gap:7px; padding:10px 18px; border-radius:9px; border:1px solid transparent;
  font-weight:600; font-size:.86rem; cursor:pointer; transition:.18s; }
.btn:hover { transform:translateY(-1px); }
.btn-gold { background:linear-gradient(135deg,var(--gold),var(--gold-soft)); color:#14110a; }
.btn-outline { background:transparent; border-color:var(--line); color:var(--text); }
.btn-outline:hover { border-color:var(--gold); color:var(--gold); }
.btn-sm { padding:6px 12px; font-size:.78rem; }
.btn-danger { background:rgba(244,67,54,.14); color:#f2a099; border-color:rgba(244,67,54,.35); }
.btn-green { background:rgba(76,175,80,.16); color:#9fe0a2; border-color:rgba(76,175,80,.4); }

/* Tables / lists */
.table { width:100%; border-collapse:collapse; font-size:.88rem; }
.table th { text-align:left; color:var(--muted); font-weight:600; font-size:.75rem; text-transform:uppercase; letter-spacing:.05em; padding:10px 12px; border-bottom:1px solid var(--line); }
.table td { padding:12px; border-bottom:1px solid var(--line); vertical-align:top; }
.table tr:hover td { background:var(--panel-2); }
.table-wrap { overflow-x:auto; }

.chip { display:inline-block; padding:3px 10px; border-radius:100px; font-size:.72rem; font-weight:600; }
.chip.pending { background:rgba(224,166,59,.16); color:var(--amber); }
.chip.confirmed { background:rgba(76,175,80,.16); color:#7ed083; }
.chip.declined { background:rgba(244,67,54,.16); color:#f2a099; }

.item-row { display:flex; gap:14px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:10px; margin-bottom:10px; background:var(--panel-2); }
.item-row img { width:60px; height:60px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.item-row .meta { flex:1; min-width:0; }
.item-row .meta .t { font-weight:600; }
.item-row .meta .s { color:var(--muted); font-size:.8rem; }
.item-actions { display:flex; gap:6px; flex-shrink:0; }

.hidden { display:none !important; }
.muted { color:var(--muted); }
.toast { position:fixed; bottom:24px; right:24px; background:var(--panel); border:1px solid var(--line); border-left:4px solid var(--green);
  padding:14px 20px; border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,.5); z-index:500; max-width:340px; font-size:.9rem; transform:translateX(400px); transition:.3s; }
.toast.show { transform:translateX(0); }
.toast.err { border-left-color:var(--red); }

/* Modal */
.modal-bg { position:fixed; inset:0; background:rgba(0,0,0,.7); display:none; align-items:center; justify-content:center; z-index:400; padding:20px; }
.modal-bg.open { display:flex; }
.modal { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:28px; width:100%; max-width:560px; max-height:90vh; overflow-y:auto; }
.modal h3 { margin-bottom:18px; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; }

@media (max-width:820px) {
  .layout { grid-template-columns:1fr; }
  .sidebar { position:static; height:auto; display:flex; flex-direction:column; }
  .side-nav { flex-direction:row; flex-wrap:wrap; }
  .side-nav button { width:auto; }
  .main { padding:24px 18px; }
  .grid-2, .grid-3 { grid-template-columns:1fr; }
}
