/* ============================================================
   Server manager - design tokens, reset & base typography
   "Ember on slate": warm forge accents over deep cool slate.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #0c0f14;
  --bg-1: #11151c;
  --bg-2: #161c25;
  --bg-3: #1d2530;
  --panel: #141a22;
  --panel-hover: #19212b;
  --border: #232d3a;
  --border-strong: #324053;

  /* text */
  --text: #e8eef5;
  --text-dim: #9fb0c0;
  --text-faint: #6a7889;

  /* brand / accent â€” forged ember */
  --accent: #29aae1;
  --accent-hover: #55c2f0;
  --accent-press: #1d90c4;
  --accent-soft: rgba(41, 170, 225, 0.14);
  --accent-line: rgba(41, 170, 225, 0.4);
  --on-accent: #06202e; /* text on an accent-filled button */

  /* status */
  --green: #43c463;
  --green-soft: rgba(67, 196, 99, 0.14);
  --red: #f0625a;
  --red-soft: rgba(240, 98, 90, 0.14);
  --yellow: #e0b13c;
  --yellow-soft: rgba(224, 177, 60, 0.14);
  --blue: #51a8ff;
  --blue-soft: rgba(81, 168, 255, 0.14);
  --purple: #b07cff;

  /* geometry */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --gap: 18px;

  /* effects */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 3px var(--accent-soft);

  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;

  --sidebar-w: 248px;
  --topbar-h: 62px;

  /* translucent glass behind the top bar */
  --topbar-bg: rgba(12, 15, 20, 0.82);

  /* ambient backdrop glows (themed per palette) */
  --ambient-1: rgba(41, 170, 225, 0.08);
  --ambient-2: rgba(81, 168, 255, 0.05);
}

/* ---------- Light theme (toggled via data-theme on <html>) ---------- */
:root[data-theme="light"] {
  --bg: #eef1f5;
  --bg-1: #e7ebf0;
  --bg-2: #dfe5ec;
  --bg-3: #d3dbe4;
  --panel: #ffffff;
  --panel-hover: #f4f7fa;
  --border: #d6dde5;
  --border-strong: #b7c3cf;

  --text: #1a2430;
  --text-dim: #46586a;
  --text-faint: #7d8fa1;

  --accent: #1793cb;
  --accent-hover: #29aae1;
  --accent-press: #127aab;
  --accent-soft: rgba(23, 147, 203, 0.12);
  --accent-line: rgba(23, 147, 203, 0.38);

  --green: #1f9e44;
  --green-soft: rgba(31, 158, 68, 0.13);
  --red: #d64540;
  --red-soft: rgba(214, 69, 64, 0.12);
  --yellow: #b8860b;
  --yellow-soft: rgba(184, 134, 11, 0.13);
  --blue: #2273cc;
  --blue-soft: rgba(34, 115, 204, 0.12);
  --purple: #7c4fd0;

  --shadow-1: 0 1px 2px rgba(20, 30, 42, 0.1);
  --shadow-2: 0 6px 24px rgba(20, 30, 42, 0.12);
  --shadow-pop: 0 12px 40px rgba(20, 30, 42, 0.18);

  --topbar-bg: rgba(255, 255, 255, 0.82);
  --ambient-1: rgba(23, 147, 203, 0.07);
  --ambient-2: rgba(34, 115, 204, 0.05);

  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle textured backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 600px at 78% -10%, var(--ambient-1), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, var(--ambient-2), transparent 55%);
  pointer-events: none;
}

h1, h2, h3, h4 { margin: 0 0 0.4em; font-weight: 650; line-height: 1.25; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.18rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

code, pre, kbd { font-family: var(--mono); }

::selection { background: var(--accent-soft); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: padding-box; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-xs); }

/* utility */
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
/* Phone safety net: toolbars wrap instead of overflowing the view. Rows that
   must stay single-line add .nowrap. */
@media (max-width: 680px) { .row { flex-wrap: wrap; } .row.nowrap { flex-wrap: nowrap; } }
.col { display: flex; flex-direction: column; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.gap-s { gap: 6px; }
.gap-l { gap: 18px; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-accent { color: var(--accent); }
