:root {
  --ink: #08110d;
  --ink2: #0d1a14;
  --card: #122018;
  --card2: #173024;
  --line: #2a4638;
  --gold: #e8c36a;
  --gold2: #f4d78a;
  --em: #3dcf9a;
  --em2: #1fa97a;
  --text: #eef6f0;
  --muted: #93b0a1;
  --danger: #ff7a86;
  --warn: #f5b942;
  --info: #7ecbff;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --radius: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav: 68px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--text); font-family: Manrope, system-ui, sans-serif; min-height: 100%; }
body { padding-top: var(--safe-t); }
a { color: var(--gold); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.hidden, [hidden] { display: none !important; }

.auth-wrap {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.auth-hero {
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(61,207,154,.18), transparent 50%),
    radial-gradient(700px 400px at 90% 80%, rgba(232,195,106,.14), transparent 45%),
    linear-gradient(165deg, #08110d, #10261c 60%, #08110d);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .02em; }
.brand img { width: 46px; height: 46px; border-radius: 14px; }
.brand span { color: var(--gold); }
.auth-hero h1 { font-family: Fraunces, serif; font-size: clamp(2.1rem, 4vw, 3.6rem); line-height: 1.1; margin: 40px 0 16px; }
.auth-hero p { color: var(--muted); max-width: 460px; font-size: 1.05rem; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.pill { border: 1px solid var(--line); background: rgba(255,255,255,.03); padding: 8px 12px; border-radius: 999px; font-size: .82rem; color: var(--muted); }
.auth-card { padding: 36px 28px 48px; display: flex; align-items: center; justify-content: center; }
.auth-box { width: min(440px, 100%); }
.auth-box h2 { font-family: Fraunces, serif; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { flex: 1; border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 10px; color: var(--muted); cursor: pointer; }
.tab.on { background: var(--card2); color: var(--text); border-color: var(--gold); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--ink2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.field textarea { min-height: 110px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn {
  border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #1b1406; width: 100%; }
.btn-em { background: linear-gradient(135deg, var(--em2), var(--em)); color: #062016; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-danger { background: rgba(255,122,134,.14); color: var(--danger); border: 1px solid rgba(255,122,134,.3); }
.btn-sm { padding: 8px 12px; font-size: .85rem; width: auto; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 16px 0; }
.or:before, .or:after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-slot { min-height: 44px; display: flex; justify-content: center; }

.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100dvh; }
.side {
  background: linear-gradient(180deg, #0c1913, #08110d);
  border-right: 1px solid var(--line);
  padding: 18px 12px calc(18px + var(--safe-b));
  position: sticky; top: 0; height: 100dvh; overflow: auto;
  z-index: 6; pointer-events: auto;
}
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px;
  color: var(--muted); margin-bottom: 4px; cursor: pointer; pointer-events: auto;
}
.nav-link.on, .nav-link:hover { background: rgba(232,195,106,.1); color: var(--text); }
.nav-ico { width: 22px; text-align: center; }
.side-foot { margin-top: 18px; padding: 12px; border-top: 1px solid var(--line); }
.main { padding: 22px 22px calc(var(--nav) + 24px + var(--safe-b)); max-width: 1180px; }
.top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.top h1 { font-family: Fraunces, serif; margin: 0; font-size: 1.7rem; }
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--card), var(--ink2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.stat-v { font-size: 1.55rem; font-weight: 800; }
.stat-l { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.list { display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: rgba(255,255,255,.02);
}
.item img, .thumb {
  width: 72px; height: 72px; object-fit: cover; border-radius: 12px; background: #0a1611;
}
.badge { font-size: .72rem; border-radius: 999px; padding: 4px 8px; text-transform: capitalize; }
.b-approved, .b-active, .b-paid { background: rgba(61,207,154,.16); color: var(--em); }
.b-pending { background: rgba(245,185,66,.16); color: var(--warn); }
.b-rejected, .b-cancelled, .b-banned { background: rgba(255,122,134,.14); color: var(--danger); }
.b-draft { background: rgba(255,255,255,.06); color: var(--muted); }
.b-published, .b-live { background: rgba(61,207,154,.16); color: var(--em); }
.spot-hero {
  display: grid; grid-template-columns: minmax(160px, 280px) 1fr; gap: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  background: linear-gradient(180deg, var(--card), var(--ink2)); margin-bottom: 14px;
}
.spot-cover { width: 100%; height: 160px; object-fit: cover; border-radius: 14px; background: #0a1611; }
.join-card { margin-bottom: 14px; }
.chan-preview {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  margin: 12px 0; padding: 10px; border: 1px solid var(--line); border-radius: 14px;
}
.chan-preview img, .chan-preview .thumb { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-sec {
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 14px 12px 6px; opacity: .75;
}
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.check { display: grid; gap: 8px; }
.check a {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  color: var(--text); background: rgba(255,255,255,.02);
  cursor: pointer; pointer-events: auto; text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.check a:hover { background: rgba(232,195,106,.08); border-color: rgba(232,195,106,.4); }
.check a.on { border-color: rgba(61,207,154,.35); }
.check i {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: .7rem; color: var(--muted); font-style: normal;
  pointer-events: none;
}
.check a.on i { background: var(--em); border-color: var(--em); color: #062016; }
.check a > div, .check a > span { pointer-events: none; }
.loading-card { color: var(--muted); text-align: center; padding: 28px 12px; }
.media-preview {
  border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px;
  background: rgba(255,255,255,.03); position: relative;
}
.media-preview-img img {
  width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; background: #0a1611;
}
.media-preview-doc {
  display: grid; gap: 6px;
}
.media-preview-doc a { font-weight: 700; }
.media-badge {
  position: absolute; top: 16px; left: 16px; z-index: 1;
  background: rgba(61,207,154,.92); color: #062016; font-size: .68rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
}
.media-preview-doc .media-badge { position: static; justify-self: start; }
.media-empty {
  border: 1px dashed var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px;
  color: var(--muted); font-size: .85rem;
}
.meta { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.sec-h h3 { margin: 0; }
.bar-mini { height: 6px; background: #1a2c23; border-radius: 99px; overflow: hidden; margin: 8px 0 0; }
.bar-mini > i { display: block; height: 100%; background: linear-gradient(90deg, var(--em2), var(--gold)); }
.comment { grid-template-columns: 40px 1fr auto; }
.comment img { width: 40px; height: 40px; border-radius: 50%; }
.tiny { font-size: .78rem; color: var(--muted); }
.progress { height: 8px; background: #1a2c23; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--em2), var(--gold)); }
.bottom {
  display: none; position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(8,17,13,.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(8px + var(--safe-b));
  grid-template-columns: repeat(5, 1fr);
  z-index: 20;
}
.bottom a { text-align: center; color: var(--muted); font-size: .68rem; padding: 6px 2px; cursor: pointer; }
.bottom a.on { color: var(--gold); }
.bottom b { display: block; font-size: 1.1rem; }
.toast {
  position: fixed; left: 50%; bottom: calc(18px + var(--nav) + var(--safe-b)); transform: translateX(-50%);
  background: #163226; border: 1px solid var(--gold); color: var(--text);
  padding: 10px 16px; border-radius: 12px; z-index: 50; max-width: 90vw;
}
.a2hs {
  position: sticky; top: 0; z-index: 30;
  display: flex; gap: 10px; align-items: center;
  background: #173024; border-bottom: 1px solid var(--line); padding: 10px 12px;
}
.a2hs img { width: 40px; height: 40px; border-radius: 10px; }
.a2hs p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; }
.a2hs .btn { width: auto; }
.icon-btn { background: transparent; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40;
  display: grid; place-items: end center; padding: 12px;
}
.sheet {
  width: min(720px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 20px 20px 12px 12px; padding: 18px; max-height: 88dvh; overflow: auto;
}
.empty { color: var(--muted); padding: 28px 8px; text-align: center; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.person { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.person img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ios-help { font-size: .85rem; color: var(--muted); line-height: 1.5; }

@media (max-width: 960px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { min-height: 280px; padding: 28px 20px 20px; }
  .app-shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .bottom { display: grid; }
  .main { padding: 16px 14px calc(var(--nav) + 18px + var(--safe-b)); }
  .item { grid-template-columns: 64px 1fr; }
  .item .actions { grid-column: 1 / -1; }
  .row2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .spot-hero { grid-template-columns: 1fr; }
}
