/* ============================================================
   On Point CMS - admin panel styles
   ============================================================ */
:root {
  --ink: #0A0A0A; --ink-2: #141414; --ink-3: #1C1C1C; --ink-4: #262626;
  --line: rgba(255,255,255,0.1); --line-2: rgba(255,255,255,0.16);
  --gold: #F4C518; --gold-bright: #FFD43B;
  --bone: #F5F0E8; --dim: #9A9A9A; --muted: #6E6E6E;
  --red: #E5564B; --green: #4CAF6E;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans); background: var(--ink); color: var(--bone);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
button { font-family: var(--sans); cursor: pointer; }
input, textarea, select { font-family: var(--sans); }
::selection { background: var(--gold); color: var(--ink); }
.hidden { display: none !important; }

/* ---- layout ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--ink-2); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.topbar-brand img { width: 32px; height: 32px; }
.topbar-brand small { color: var(--gold); font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.2em; text-transform: uppercase; display: block; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-user { color: var(--dim); font-size: 0.85rem; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 24px 80px; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 28px; flex-wrap: wrap; }
.tab {
  background: none; border: none; color: var(--dim); padding: 12px 18px;
  font-size: 0.9rem; font-weight: 600; border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--bone); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2);
  background: var(--ink-3); color: var(--bone); padding: 9px 16px; border-radius: 6px;
  font-size: 0.85rem; font-weight: 600; transition: all .15s;
}
.btn:hover { border-color: var(--gold); }
.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-bright); }
.btn-sm { padding: 6px 11px; font-size: 0.78rem; }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); background: rgba(229,86,75,0.1); }
.btn-icon {
  width: 30px; height: 30px; padding: 0; justify-content: center;
  border-radius: 6px; font-size: 1rem;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- cards / list ---- */
.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 20px; margin-bottom: 14px;
}
.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 18px; margin-bottom: 8px;
}
.list-row:hover { border-color: var(--line-2); }
.list-row h3 { font-size: 0.98rem; font-weight: 600; }
.list-row .meta { color: var(--muted); font-size: 0.78rem; font-family: var(--mono); margin-top: 2px; }
.row-main { min-width: 0; }
.row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.pill {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--dim);
}
.pill.on { color: var(--green); border-color: rgba(76,175,110,0.4); }
.pill.off { color: var(--muted); }

/* ---- headings ---- */
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.page-sub { color: var(--dim); margin-bottom: 24px; font-size: 0.9rem; }
.section-label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); margin: 28px 0 12px;
}
.head-flex { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---- forms ---- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 0.78rem; font-weight: 600; color: var(--dim);
  margin-bottom: 5px;
}
.field .help { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=number], .field input[type=url], .field textarea, .field select {
  width: 100%; background: var(--ink); border: 1px solid var(--line-2);
  color: var(--bone); padding: 9px 11px; border-radius: 6px; font-size: 0.88rem;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold);
}
.field-check { display: flex; align-items: center; gap: 8px; }
.field-check input { width: 16px; height: 16px; accent-color: var(--gold); }
.field-check label { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- repeater ---- */
.repeater { border: 1px dashed var(--line-2); border-radius: 8px; padding: 12px; }
.rep-item {
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 6px;
  padding: 14px; margin-bottom: 10px; position: relative;
}
.rep-item-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.rep-item-head span { font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.rep-controls { display: flex; gap: 4px; }

/* ---- section editor ---- */
.section-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 12px; overflow: hidden;
}
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--ink-3); cursor: pointer;
}
.section-head:hover { background: #222; }
.section-head .stype {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold);
}
.section-head .stitle { font-weight: 600; font-size: 0.92rem; }
.section-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-body { padding: 18px 16px; border-top: 1px solid var(--line); }
.section-body.collapsed { display: none; }
.chevron { color: var(--muted); transition: transform .15s; font-size: 0.8rem; }
.section-card.open .chevron { transform: rotate(90deg); }

/* ---- login ---- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-box {
  width: 100%; max-width: 380px; background: var(--ink-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 36px 32px;
}
.login-box img { width: 56px; height: 56px; margin-bottom: 18px; }
.login-box h1 { font-size: 1.3rem; margin-bottom: 4px; }
.login-box p { color: var(--dim); font-size: 0.85rem; margin-bottom: 24px; }

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink-3); border: 1px solid var(--gold); color: var(--bone);
  padding: 12px 22px; border-radius: 8px; font-size: 0.88rem; z-index: 200;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.toast.err { border-color: var(--red); }

/* ---- misc ---- */
.empty { color: var(--muted); padding: 40px; text-align: center; font-size: 0.9rem; }
.spinner { color: var(--dim); padding: 40px; text-align: center; }
.sticky-save {
  position: sticky; bottom: 0; background: var(--ink-2); border-top: 1px solid var(--line);
  padding: 14px 24px; margin: 24px -24px -80px; display: flex; gap: 10px;
  align-items: center; justify-content: flex-end; z-index: 40;
}
.add-section-bar { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.inline-note { font-size: 0.8rem; color: var(--muted); }
