/* ============================================================
   ZanGo Admin — self-contained theme
   Standalone admin frontend. No dependency on the public site.
   ============================================================ */

:root {
  --bg: #fff1df;
  --surface: #fff7ef;
  --surface-strong: #ffffff;
  --surface-dark: #a5431a;
  --ink: #351b12;
  --muted: #765142;
  --accent: #ff9f1c;
  --accent-deep: #e85d04;
  --line: rgba(53, 27, 18, 0.13);
  --shadow: 0 24px 70px rgba(120, 52, 16, 0.14);
}

[data-theme="dark"] {
  --bg: #110906;
  --surface: #1a100c;
  --surface-strong: #20130e;
  --surface-dark: #130c09;
  --ink: #fff7f0;
  --muted: #e3c8b9;
  --accent: #ffb15c;
  --accent-deep: #ff7a1a;
  --line: rgba(89, 55, 38, 0.78);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(255, 177, 92, 0.28), transparent 28rem),
    radial-gradient(circle at left top, rgba(232, 93, 4, 0.18), transparent 24rem),
    radial-gradient(circle at 20% 95%, rgba(0, 185, 212, 0.12), transparent 22rem),
    var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

button, input, select, textarea { font: inherit; }

button, a, input, select, textarea {
  -webkit-tap-highlight-color: rgba(232, 93, 4, 0.18);
}

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Admin layout ---------- */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  background: var(--surface-strong);
  border-right: 1px solid var(--line);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar h3 { margin: 0 0 0.5rem; }

.sidebar a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar a:hover, .sidebar a.active { background: var(--accent); color: var(--ink); }

.sidebar .role-badge {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.8;
  text-transform: capitalize;
}

.main-content { flex: 1; padding: 2rem; }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }

.stat-card {
  background: var(--surface-strong);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  text-align: center;
}

.stat-card h2 { margin: 0 0 0.3rem; color: var(--accent); font-size: 0.9rem; }
.stat-card p { font-size: 1.6rem; font-weight: 700; color: var(--ink); margin: 0; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { padding: 0.6rem; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.9rem; }

/* ---------- Buttons ---------- */
.action-btn {
  background: var(--accent);
  border: none;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  margin: 0.1rem;
  color: var(--ink);
}

.danger-btn { background: #e74c3c; color: white; }
.success-btn { background: #2ecc71; color: white; }

/* ---------- Forms ---------- */
input[type="text"], input[type="number"], input[type="date"], select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  color: var(--ink);
  margin: 0.2rem;
}

/* ---------- Misc ---------- */
.hidden { display: none; }
.log-entry { padding: 0.3rem 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }

#access-denied { text-align: center; margin-top: 5rem; display: none; }

.badge { padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; }
.badge.verified { background: #2ecc71; color: #fff; }
.badge.pending { background: #f1c40f; color: #000; }
.badge.rejected { background: #e74c3c; color: #fff; }
.badge.suspended { background: #e67e22; color: #fff; }

.filter-bar { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0.5rem 0; }

.guide-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--surface-strong);
}

.guide-card h3 { margin: 0 0 0.3rem; }
.guide-card p { margin: 0.2rem 0; font-size: 0.9rem; opacity: 0.9; }

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: var(--accent);
  color: var(--ink);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  display: none;
  z-index: 1000;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 1rem;
  }
  .sidebar h3, .sidebar .role-badge { width: 100%; }
  .main-content { padding: 1rem; }
}
