/* ITSpecta redesign mock-ups: shared tokens and components.
   Tokens follow HANDOVER-KITBAG-UI-STYLE-2026-10-08.md section 3. In the build,
   the :root block replaces the slate palette at the top of assets/style.css. */

@font-face { font-family: "Figtree"; src: url("fonts/Figtree.ttf") format("truetype"); font-weight: 300 900; }
@font-face { font-family: "EB Garamond"; src: url("fonts/EBGaramond-Italic.ttf") format("truetype"); font-style: italic; }
@font-face { font-family: "Google Sans Code"; src: url("fonts/GoogleSansCode.ttf") format("truetype"); font-weight: 300 800; }

:root {
  --bg: #191714;
  --bg-side: #14120f;
  --card: #221f1b;
  --raised: #2b2721;
  --sel: #2a2419;
  --well: #0f0d0b;          /* terminal and graph wells, darker than the ground */
  --ink: #e8e2d4;
  --heading: #f5eee0;
  --sub: #b3aa96;
  --muted: #a39a86;
  --border: #7a7262;
  --hair: rgba(232,226,212,.08);
  --track: #3a342b;
  --accent: #d99a55;
  --on-accent: #191714;
  --accent-text: #e6a866;
  --accent-tint: rgba(217,154,85,.14);
  --flare: #ff6c4c;
  --glow: #ffa946;
  /* Status stays separate from the accent. --warn is a light yellow so it sits
     well above the amber in lightness, for red-green colour-blind users. */
  --good: #7cc47a;
  --good-strong: #b9e3b7;
  --warn: #f2d65c;
  --bad: #e08a7a;
  --note: #c77dff;
  --hero: #221d18;
  --grad: linear-gradient(90deg, #e6a866, #ff8a5c 70%, #ff6c4c);
  --mono: "Google Sans Code", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

/* Light theme (optional): LexVoca's corrected cream-and-orange values. */
html[data-theme="light"] {
  --bg: #f5edda;
  --bg-side: #efe4c9;
  --card: #fdf8ec;
  --raised: #f3e9d2;
  --sel: #f6e3c4;
  --well: #2a251f;          /* terminals and graphs stay dark in both themes */
  --ink: #3d3427;
  --heading: #2e271d;
  --sub: #6b604f;
  --muted: #6e634f;
  --border: #938263;
  --hair: rgba(61,52,39,.12);
  --track: #e4d7bb;
  --accent: #ea7a2a;
  --on-accent: #2e271d;
  --accent-text: #b54d0a;
  --accent-tint: rgba(234,122,42,.14);
  --flare: #a8430a;         /* live-chip text; #e8781e only reached 2.8:1 on cream */
  --good: #3a7034;
  --good-strong: #3a7034;
  --warn: #7a5c00;
  --bad: #b3261e;
  --note: #7b3fc4;
  --hero: #fbf0dc;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.5 "Figtree", "Segoe UI", sans-serif;
}
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.mono, code, td.addr, .host { font-family: var(--mono); }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: 216px; flex: none; background: var(--bg-side);
  border-right: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 14px; padding: 18px 12px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 4px; }
.wordmark { font-weight: 800; font-size: 21px; letter-spacing: -.02em; color: var(--heading); line-height: 1; }
.wordmark .it { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { font-size: 12px; color: var(--muted); margin-top: 3px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px;
  color: var(--sub); font-weight: 500; font-size: 13.5px; text-decoration: none;
  border: 0; background: none; width: 100%; text-align: left; cursor: pointer;
}
.nav-item svg { width: 16px; height: 16px; flex: none; }
.nav-item:hover { background: var(--card); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--accent-tint); color: var(--heading); font-weight: 650; }
.nav-item[aria-current="page"] svg { stroke: var(--accent); }
.nav-item .count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); }
.nav-item .count.warn { color: var(--warn); }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 8px; }
.side-actions { display: flex; gap: 6px; }
.side-actions button { flex: 1; height: 30px; border-radius: 999px; border: 1px solid var(--hair); background: var(--card); font-size: 12.5px; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.side-actions svg { width: 14px; height: 14px; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); flex: none; }
.ver { font-size: 12px; color: var(--muted); }

main.page { flex: 1; min-width: 0; padding: 28px 40px 40px; display: flex; flex-direction: column; gap: 18px; max-width: 1240px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
h1 { margin: 0; font-weight: 900; font-size: 34px; line-height: 1.05; letter-spacing: -.02em; color: var(--heading); }
h1 .acc { color: var(--accent-text); }
.lede { margin: 6px 0 0; color: var(--sub); font-size: 14.5px; }
.label { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hint { font-size: 12.5px; color: var(--muted); }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 18px; padding: 16px 18px; }
.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 24px 28px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%), var(--hero);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.hero::after { /* soft glow, hero areas only */
  content: ""; position: absolute; width: 360px; height: 260px; right: -80px; top: -120px;
  background: radial-gradient(circle, var(--glow), transparent 70%); opacity: .18; filter: blur(60px); pointer-events: none;
}
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- controls ---------- */
.btn {
  height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border);
  background: none; color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; text-decoration: none;
}
.btn svg { width: 15px; height: 15px; }
.btn.primary {
  background: var(--accent); color: var(--on-accent); border-color: var(--accent);
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent);
  transition: transform .15s ease;
}
.btn.primary:hover { transform: translateY(-2px); }
.btn.small { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn.text { border-color: transparent; color: var(--accent-text); padding: 0 8px; }
.seg { display: inline-flex; background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid var(--hair); border-radius: 999px; padding: 3px; }
.seg button { border: 0; border-radius: 999px; background: none; color: var(--sub); font-size: 12.5px; font-weight: 600; padding: 6px 13px; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--sub); }
.field small { font-size: 12px; color: var(--muted); }
.input {
  height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--raised);
  padding: 0 12px; min-width: 0; width: 100%;
}
.input::placeholder { color: var(--muted); opacity: .8; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- small pieces ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--raised); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.chip svg { width: 14px; height: 14px; }
.chip.good { color: var(--good-strong); background: color-mix(in srgb, var(--good) 16%, transparent); }
.chip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.chip.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, transparent); }
.chip.note { color: var(--note); background: color-mix(in srgb, var(--note) 15%, transparent); }
.chip.live { color: var(--flare); background: color-mix(in srgb, var(--flare) 14%, transparent); }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--flare); animation: breathe 3.6s ease-in-out infinite; }
.tag { font-size: 10.5px; font-weight: 700; color: var(--sub); background: var(--raised); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.kind { width: 32px; height: 32px; border-radius: 9px; display: grid; place-content: center; flex: none; font: 900 11px "Figtree", sans-serif; color: #fff; letter-spacing: .02em; }
.kind.rdp { background: #c4500a; } .kind.ssh { background: #2f6e3b; } .kind.vnc { background: #7a52b3; }

/* stat tile */
.tile { background: var(--card); border: 1px solid var(--hair); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-align: left; color: inherit; cursor: pointer; text-decoration: none; font: inherit; }
.tile:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.tile-title { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.big { font-weight: 900; font-size: 30px; letter-spacing: -.02em; color: var(--heading); line-height: 1.15; }
.big small { font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.cap { font-size: 12px; color: var(--muted); }
.cap.good { color: var(--good); font-weight: 600; } .cap.warn { color: var(--warn); font-weight: 600; }
.ghost { border-style: dashed; border-color: color-mix(in srgb, var(--border) 60%, transparent); background: transparent; }
.ghost .big { color: var(--muted); font-size: 15px; font-weight: 700; letter-spacing: 0; padding: 8px 0 6px; }

/* attention row */
.attn { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--hair); }
.attn + .attn { margin-top: -10px; }
.attn-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-content: center; flex: none; }
.attn-ico svg { width: 16px; height: 16px; }
.attn-ico.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.attn-ico.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.attn-text { flex: 1; min-width: 0; }
.attn-text b { color: var(--heading); }
.attn-text span { color: var(--muted); }

/* table */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--hair); }
table.data td { padding: 7px 10px; border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; }
table.data td.num, table.data th.num { text-align: right; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.flag td { background: color-mix(in srgb, var(--warn) 6%, transparent); }
table.data tr.silent td { color: var(--muted); font-style: italic; }

/* motion: calm entrances, nothing loops in data */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.rise { animation: rise .5s ease both; }
.rise:nth-child(2) { animation-delay: .06s; } .rise:nth-child(3) { animation-delay: .12s; }
.rise:nth-child(4) { animation-delay: .18s; } .rise:nth-child(5) { animation-delay: .24s; }
.rise:nth-child(6) { animation-delay: .30s; } .rise:nth-child(7) { animation-delay: .36s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* first-run toggle for the mock-ups */
html:not(.firstrun) .when-empty, html.firstrun .when-data { display: none !important; }

/* mock-up control bar (not part of the design) */
.mock-bar {
  position: fixed; right: 14px; bottom: 14px; z-index: 50; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: #000c; color: #fff; padding: 8px 10px; border-radius: 14px; font: 12px "Figtree", sans-serif;
}
.mock-bar a { color: #ffcf9a; } .mock-bar button { font-size: 12px; padding: 4px 9px; border-radius: 8px; border: 1px solid #fff4; background: #fff1; color: #fff; cursor: pointer; }

@media (max-width: 760px) {
  .app { flex-direction: column; }
  .side { width: auto; height: auto; position: static; }
  main.page { padding: 20px 16px 80px; }
}
