/* Polliwog Admin — merged stylesheet (admin panel + legacy ops dashboard)
   Brand: gopolliwog.com tokens — carbon/bone/cobalt/mint (locked 2026-08-14) */

:root {
  color-scheme: light;
  --carbon: #101114;
  --carbon-2: #1a1b20;
  --bone: #F5F4EF;
  --bone-2: #ECEBE4;
  --white: #FFFFFF;
  --cobalt: #3155FF;
  --cobalt-hover: #2543d6;
  --cobalt-light: #8fa3ff;
  --cobalt-dim: rgba(49,85,255,0.10);
  --mint: #5DE2C2;
  --mint-dim: rgba(93,226,194,0.12);
  --ink: #16171b;
  --muted: #6b6e76;
  --line: rgba(16,17,20,0.10);
  --success: #0E5C54;
  --danger: #B3261E;
  --warn: #B98900;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--cobalt); color: #fff; }

code, .font-mono, pre, .mono {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(16,17,20,0.18); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16,17,20,0.32); }

/* Card hover glow (subtle cobalt, brand-tuned) */
.card { position: relative; }
.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 200ms ease;
  background: linear-gradient(135deg, rgba(49,85,255,0.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

/* ── Auth pages ── */
.auth-card {
  max-width: 380px;
  margin: 4rem auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(16,17,20,0.04);
}
.auth-card h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
  color: var(--ink);
}
.auth-card .eyebrow-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

form label { display: block; margin-bottom: 1rem; font-size: 0.9rem; color: var(--muted); }

input, select, button { font: inherit; color: var(--ink); }

input, select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
input:focus, select:focus {
  outline: none;
  border-color: rgba(49,85,255,0.5);
  box-shadow: 0 0 0 2px rgba(49,85,255,0.25);
}

button {
  cursor: pointer;
  background: var(--cobalt);
  border: none;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  color: white;
  font-weight: 600;
}
/* Only bare <button>s (no .btn class) get a hover tint here. Classed .btn
   variants define their own hover (base.html), and the generic tint is a
   subtle grey — never cobalt under dark text (Dustin 2026-09-04, hover
   readability task). Cobalt hovers survive only where text is white:
   .btn-primary:hover (base.html) + explicit hover:bg-cobalt-hover utilities. */
button:hover { background: rgba(16,17,20,0.08); }
button.danger { background: var(--danger); }
button.danger:hover { filter: brightness(1.05); }

.inline-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
}
.inline-form input, .inline-form select { width: auto; margin-top: 0; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: var(--white); }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--bone-2); }
td { font-size: 0.875rem; }
td.num, td:last-child.mono-num { font-variant-numeric: tabular-nums; }

a { color: var(--cobalt); }
a:hover { color: var(--cobalt-hover); }

.meta { color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }
.error { color: var(--danger); }

/* Field help — what goes in a field and why (agent wizard) */
.field-help {
  font-size: 11px;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* ── Stats ── */
.stat-row { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-width: 140px;
}
.stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.15rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bone-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge-active, .badge-success { color: var(--success); border-color: rgba(14,92,84,0.35); background: rgba(14,92,84,0.06); }
.badge-pending, .badge-provisioning { color: var(--cobalt); border-color: rgba(49,85,255,0.35); background: var(--cobalt-dim); }
.badge-failed { color: var(--danger); border-color: rgba(179,38,30,0.35); background: rgba(179,38,30,0.06); }
.badge-suspended { color: #8a6d00; border-color: rgba(202,158,0,0.45); background: rgba(234,179,8,0.12); }
.badge-under_construction { color: #9a5b00; border-color: rgba(217,119,6,0.45); background: rgba(245,158,11,0.12); }
.badge-down { color: var(--danger); border-color: rgba(179,38,30,0.35); background: rgba(179,38,30,0.06); }

code { background: var(--cobalt-dim); color: var(--cobalt); padding: 0.1rem 0.4rem; border-radius: 4px; }

.qr-wrap {
  background: #fff;
  display: inline-block;
  padding: 1rem;
  border-radius: 8px;
  margin: 0.75rem 0;
}
.qr-wrap svg { width: 200px; height: 200px; display: block; }

/* Status dots (brand semantic) */
.dot-live { background: var(--mint); box-shadow: 0 0 0 3px var(--mint-dim); }
.dot-live.pulse { animation: pulse 2s ease-in-out infinite; }
.dot-sync { background: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-dim); }
.dot-idle { background: rgba(16,17,20,0.25); }
.dot-down { background: var(--danger); box-shadow: 0 0 0 3px rgba(179,38,30,0.12); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--mint-dim); }
  50% { box-shadow: 0 0 0 6px rgba(93,226,194,0.05); }
}
