/* ============================================================
   DevServiceSite — shared theme
   Terminal/console-inspired dark theme. Used by index, admin
   and the access-gate page so all three feel like one product.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #121417;
  --panel: #1a1e23;
  --panel-raised: #20252b;
  --border: #2a3038;
  --border-soft: #22262c;

  --accent: #d7f567;
  --accent-ink: #19230a;
  --accent-dim: #a8c377;
  --accent-soft: rgba(215, 245, 103, 0.12);

  --text: #e8ebee;
  --text-dim: #8d949c;
  --text-faint: #5b6168;

  --danger: #e2685f;
  --danger-soft: rgba(226, 104, 95, 0.14);
  --success: #7bd88f;
  --success-soft: rgba(123, 216, 143, 0.14);

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 18px 44px rgba(0, 0, 0, .45);

  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --font-sans: 'Inter', 'Segoe UI', sans-serif;
}

html {
  color-scheme: dark;
}

body {
  background-color: var(--bg) !important;
  background-image:
    radial-gradient(circle at 12% -10%, rgba(215, 245, 103, .06) 0%, transparent 42%),
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  color: var(--text);
  font-family: var(--font-sans);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 50;
  background: linear-gradient(90deg, transparent, var(--accent) 35%, var(--accent) 65%, transparent);
  opacity: .55;
}

h1, h2, h3, h4, .mono {
  font-family: var(--font-mono);
}

a {
  color: var(--accent-dim);
}

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

/* ---- kicker / eyebrow label ---- */
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ---- panel / card primitive ---- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ---- status pill ---- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pill.on {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(123, 216, 143, .3);
}

.status-pill.on::before {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.status-pill.off {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(226, 104, 95, .3);
}

.status-pill.off::before {
  background: var(--danger);
  box-shadow: 0 0 6px var(--danger);
}

/* ---- buttons ---- */
.btn-accent {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-accent:hover {
  background: #e3ff85;
  border-color: #e3ff85;
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.btn-ghost:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.btn-danger-ghost {
  background: transparent;
  border: 1px solid rgba(226, 104, 95, .35);
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: #ffd4d0;
}

/* ---- form controls ---- */
.field {
  background: #15181c;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
}

.field:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field.mono {
  font-family: var(--font-mono);
  font-size: 13.5px;
}

/* ---- toggle switch ---- */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex: none;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.switch .track {
  position: absolute;
  inset: 0;
  background: #3a2426;
  border: 1px solid var(--danger);
  border-radius: 999px;
  transition: background .15s ease, border-color .15s ease;
}

.switch .thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #cfcfcf;
  transition: transform .15s ease, background .15s ease;
}

.switch input:checked ~ .track {
  background: #1e3324;
  border-color: var(--success);
}

.switch input:checked ~ .thumb {
  transform: translateX(18px);
  background: var(--success);
}

.switch input:focus-visible ~ .track {
  box-shadow: 0 0 0 3px var(--accent-soft);
  border-color: var(--accent-dim);
}

.switch input:disabled {
  cursor: default;
}

.switch input:disabled ~ .track {
  opacity: .5;
}
