/* ==========================================================================
   Conversion Club — admin panel (admin.css)
   Same family as the club site: Poppins, the cyan→green mark, coral CTAs.
   One deliberate difference: this is a working surface, so it is denser and
   quieter than the marketing pages.
   ========================================================================== */
:root {
  --font: "Poppins", system-ui, -apple-system, sans-serif;
  --cyan: #09c5ed;
  --cyan-text: #06809c;
  --green-deep: #1db369;
  --coral: #f37768;
  --coral-deep: #e15f4f;
  --ink: #12212b;
  --muted: #5b6c76;
  --line: #dfe8ec;
  --bg: #f5f9fa;
  --card: #ffffff;
  --ok: #1db369;
  --warn: #b7791f;
  --bad: #c53030;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }

.ad-top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--line);
}
.ad-top__brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.ad-top__brand b { font-weight: 600; color: var(--cyan-text); }
.ad-top__who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }

.ad-main { max-width: 1080px; margin: 0 auto; padding: 28px 22px 64px; }

.ad-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 26px 28px; max-width: 560px; margin: 40px auto; }
.ad-card h1 { margin: 0 0 8px; font-size: 22px; }

.ad-muted { color: var(--muted); }
.ad-label { display: block; font-size: 13px; font-weight: 500; margin: 14px 0 6px; }
.ad-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-input {
  flex: 1 1 220px; font: inherit; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; min-width: 0;
}
.ad-input--code { flex: 0 1 160px; letter-spacing: 0.35em; text-align: center; font-weight: 600; }
.ad-input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }

.ad-btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 8px; cursor: pointer;
  padding: 10px 18px; background: var(--coral); color: #fff;
}
.ad-btn:hover { background: var(--coral-deep); }
.ad-btn:disabled { opacity: 0.55; cursor: default; }
.ad-btn--ghost { background: transparent; color: var(--cyan-text); border: 1px solid var(--line); font-weight: 500; padding: 7px 14px; }
.ad-btn--ghost:hover { background: #f0f7f9; }
.ad-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.ad-turnstile { margin-top: 12px; min-height: 0; }
.ad-feedback { min-height: 1.4em; font-size: 13.5px; color: var(--muted); margin: 12px 0 0; }
.ad-feedback.is-bad { color: var(--bad); }

/* ---------------- tabs ---------------- */
.ad-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ad-tabs button {
  font: inherit; font-weight: 500; font-size: 14px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 7px 16px;
}
.ad-tabs button.is-on { background: var(--cyan-text); border-color: var(--cyan-text); color: #fff; }
.ad-tabs button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.ad-tabmeta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 10px; font-size: 13px; }

.ad-tabbody { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }

.ad-foot { font-size: 12.5px; margin-top: 14px; }

/* ---------------- stat tiles ---------------- */
.ad-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ad-stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.ad-stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.ad-stat span { font-size: 12.5px; color: var(--muted); }
.ad-stat.is-warn b { color: var(--warn); }
.ad-stat.is-bad b { color: var(--bad); }

.ad-h2 { font-size: 15px; font-weight: 600; margin: 22px 0 8px; }
.ad-h2:first-child { margin-top: 0; }

/* ---------------- tables ---------------- */
.ad-tablewrap { overflow-x: auto; }
.ad-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.ad-table th {
  text-align: left; font-weight: 600; font-size: 12px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); padding: 6px 10px 6px 0;
}
.ad-table td { border-bottom: 1px solid var(--line); padding: 7px 10px 7px 0; vertical-align: top; }
.ad-table tr:last-child td { border-bottom: 0; }
.ad-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- status pills ---------------- */
.ad-pill {
  display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px;
  padding: 2px 10px; white-space: nowrap;
}
.ad-pill--ok { background: #e5f7ee; color: var(--ok); }
.ad-pill--warn { background: #fbf1df; color: var(--warn); }
.ad-pill--bad { background: #fdeaea; color: var(--bad); }
.ad-pill--dim { background: #eef2f4; color: var(--muted); }

.ad-match { display: flex; align-items: center; gap: 8px; }

.ad-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* ---------------- actions ----------------
   Nothing fires on one click: the button becomes its own confirmation in
   place, so a costly action always takes a deliberate second press. */
.ad-btn--sm {
  font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 7px;
  background: transparent; color: var(--cyan-text); border: 1px solid var(--line);
  white-space: nowrap;
}
.ad-btn--sm:hover { background: #f0f7f9; border-color: var(--cyan); }
.ad-btn--sm[data-armed="1"] {
  background: var(--coral); border-color: var(--coral); color: #fff;
}
.ad-btn--sm[data-armed="1"]:hover { background: var(--coral-deep); }
.ad-btn--sm:disabled { opacity: 0.5; cursor: default; }

.ad-actionmsg {
  margin: 12px 0 0; padding: 10px 14px; border-radius: 8px;
  font-size: 13.5px; border: 1px solid var(--line); background: var(--grey-bg);
}
.ad-actionmsg.is-ok  { background: #e5f7ee; border-color: #bfe8d4; color: #10613f; }
.ad-actionmsg.is-bad { background: #fdeaea; border-color: #f5c9c9; color: #8c2020; }

.ad-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }

@media (max-width: 620px) {
  .ad-card { padding: 20px; margin: 20px auto; }
  .ad-main { padding: 18px 14px 48px; }
}
