:root {
  --bg: #0e100b;
  --panel: #15170f;
  --panel2: #1d2014;
  --border: #2a2d1f;
  --border-soft: #21241733;
  --text: #f2f1e8;
  --muted: #9b9d8c;
  --brand: #c8e85a;
  --brand-dim: rgba(200, 232, 90, 0.14);
  --gold: #c9a85c;
  --green: #c8e85a;
  --red: #e5736b;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h3, .serif { font-family: 'Fraunces', Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 11px;
  transition: all 0.18s ease;
}
button:hover { border-color: var(--brand); }
button.primary {
  background: var(--brand); border-color: var(--brand); color: #14160d; font-weight: 600;
}
button.primary:hover { box-shadow: 0 0 0 3px var(--brand-dim); filter: brightness(1.04); }
button.green { background: var(--brand); border-color: var(--brand); color: #14160d; }
button.red { background: transparent; border-color: var(--red); color: var(--red); }
button.ghost { background: transparent; }
button.red.ghost { background: transparent; color: var(--red); border-color: var(--red); }

input, select, textarea {
  font: inherit;
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-dim);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(1200px 600px at 50% -10%, rgba(200,232,90,0.06), transparent), var(--bg); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.login-card { width: 340px; text-align: center; }
.login-logo { width: 76px; height: 76px; display: block; margin: 0 auto 14px; filter: drop-shadow(0 6px 18px rgba(200,232,90,0.18)); }
.login-card h1 { margin: 0 0 20px; font-size: 24px; }
.login-card input { width: 100%; margin-bottom: 12px; }
.login-card button { width: 100%; }
.error { color: var(--red); font-size: 14px; min-height: 18px; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px 16px; font-size: 19px; }
.sidebar-brand img { width: 32px; height: 32px; }
.sidebar-nav { padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); padding: 14px 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 11px; padding: 11px 13px; color: var(--muted); font-size: 14px;
}
.nav-item:hover { background: var(--panel2); color: var(--text); border-color: transparent; }
.nav-item.active { background: var(--brand-dim); color: var(--brand); box-shadow: inset 2px 0 0 var(--brand); }
.nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; flex-shrink: 0; }
.soon { margin-left: auto; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(201,168,92,0.15); color: var(--gold); padding: 3px 8px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding: 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

header.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 26px; border-bottom: 1px solid var(--border); background: rgba(21,23,15,0.6); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
header.topbar h1 { font-size: 19px; margin: 0; margin-right: auto; }
header.topbar select { min-width: 190px; }
main { padding: 24px 26px; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tabs button { border: 0; background: transparent; color: var(--muted); border-radius: 0; padding: 11px 16px; border-bottom: 2px solid transparent; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel h3 { font-size: 16px; margin: 22px 0 12px; color: var(--text); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); font-size: 13px; }

#mStats #mFollowers, #mStats #mReach { font-family: 'Fraunces', Georgia, serif; color: var(--gold); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: top; font-size: 14px; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
td.actions { white-space: nowrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge.pending { color: var(--gold); background: rgba(201, 168, 92, 0.15); }
.badge.approved { color: var(--brand); background: var(--brand-dim); }
.badge.rejected { color: var(--red); background: rgba(229, 115, 107, 0.14); }

.list-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 8px; background: var(--panel2); }
.list-item .spacer { flex: 1; }

.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; }
.modal { width: 470px; max-width: 92vw; }
.modal textarea { width: 100%; min-height: 90px; margin: 10px 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hidden { display: none; }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--panel2); border: 1px solid var(--border); padding: 13px 17px; border-radius: 12px; box-shadow: var(--shadow); }

.chart-ph .ph-box {
  margin-top: 12px; height: 200px; border: 1px dashed var(--border); border-radius: 12px;
  display: grid; place-items: center; color: var(--muted); font-size: 13px;
}

.skeleton { background: linear-gradient(90deg, var(--panel2) 25%, #262a18 37%, var(--panel2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 6px; height: 12px; display: inline-block; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
