/* ============================================================================
   ODIAN control panel (/panel) — page-specific styles.
   Tokens, base and shared chrome live in tokens.css, which this page links
   first. This file replaced a GitHub-dark palette (#0d1117 / #161b22 / #1f6feb)
   that was never an ODIAN colour — it was the default the page shipped with.

   Class names here are load-bearing: panel.html's JS builds its markup as
   template strings using .card / .chead / .dot / .pill / .desc / .grid / .row /
   .status / .seg / .save. Renaming any of them silently breaks the page.
   ========================================================================== */

.shell { max-width: 900px; margin: 0 auto; padding: 22px 20px 60px; }

.o-head { margin-bottom: 20px; }
.sub { color: var(--muted); margin: 10px 0 0; font-size: 13.5px; }

/* Section label — the theme's eyebrow voice (wide tracking, uppercase). */
.section {
  color: #a9bede; font: 600 10px var(--sans); letter-spacing: .30em;
  text-transform: uppercase; opacity: .85; margin: 24px 2px 9px;
}

/* ---- controls: pill-shaped, glass ---------------------------------------- */
input, select, textarea, button {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: 500 12.5px var(--sans);
  padding: 7px 13px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .18s ease;
}
textarea { border-radius: 16px; background: rgba(0, 0, 0, 0.22); line-height: 1.45; }
select option { background: #2a2a2a; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input[type="checkbox"] { width: 15px; height: 15px; padding: 0; accent-color: var(--steel); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(95, 131, 189, 0.60);
  box-shadow: 0 0 0 4px rgba(95, 131, 189, 0.14);
  background: rgba(255, 255, 255, 0.07);
}
button { cursor: pointer; }
button:hover {
  background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.30); transform: translateY(-1px);
}
button:active { transform: none; }

/* Primary action — the theme's gradient pill. */
button.save {
  background: linear-gradient(120deg, rgba(95, 131, 189, 0.85), rgba(76, 108, 160, 0.85));
  border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 6px 22px rgba(95, 131, 189, 0.30);
}
button.save:hover {
  background: linear-gradient(120deg, rgba(110, 148, 208, 0.95), rgba(96, 130, 184, 0.95));
  box-shadow: 0 8px 26px rgba(95, 131, 189, 0.38);
}

.tokenbar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.tokenbar label { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.tokenbar input { flex: 1; font-family: var(--mono); }

/* ---- cards: glass -------------------------------------------------------- */
.card {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 14px;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  padding: 15px 17px; margin-bottom: 12px;
}
.chead { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.chead h2 { font: 600 14px var(--sans); letter-spacing: .04em; margin: 0; }
.chead .pill {
  margin-left: auto; font: 500 10px var(--sans); letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 999px; padding: 3px 11px;
  background: rgba(255, 255, 255, 0.04);
}
.desc { color: var(--muted); margin: 0 0 12px; font-size: 12.5px; }

/* Status dot — semantic colour, separate from the steel accent. */
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); display: inline-block; flex: none; }
.dot.ok   { background: var(--green); box-shadow: 0 0 8px rgba(106, 160, 95, .5); }
.dot.bad  { background: var(--red);   box-shadow: 0 0 8px rgba(196, 107, 107, .5); }
.dot.warn { background: var(--amber); box-shadow: 0 0 8px rgba(195, 154, 69, .5); }

.grid { display: grid; grid-template-columns: 112px 1fr; gap: 9px 12px; align-items: center; }
.grid label { color: var(--muted); font-size: 12px; }

.managed-note, .none-note {
  color: var(--muted); font-size: 12.5px; line-height: 1.55;
  background: rgba(0, 0, 0, 0.22); border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px; padding: 9px 12px;
}
.row { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.status { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* Segmented Managed / Direct / None switch — one pill, three cells. */
.seg {
  display: inline-flex; border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px; overflow: hidden; background: rgba(0, 0, 0, 0.22);
}
.seg button {
  border: 0; border-radius: 0; padding: 5px 13px; background: transparent;
  box-shadow: none; font-size: 11.5px;
}
.seg button:hover { background: rgba(255, 255, 255, 0.07); transform: none; box-shadow: none; }
.seg button.on {
  background: linear-gradient(120deg, rgba(95, 131, 189, 0.85), rgba(76, 108, 160, 0.85));
  color: #fff; font-weight: 600;
}
/* .pill wraps .seg in the DB card header — strip its chrome so the seg reads as
   the control rather than a pill inside a pill. */
.chead .pill:has(.seg) { padding: 0; border: 0; background: none; }

.mono { font-family: var(--mono); word-break: break-all; }
