:root {
  /* Paleta ziemna (spójna z aplikacją mobilną: ciepły piasek, leśna zieleń, terakota). */
  --bg: #f5f1e7;
  --bg-pattern:
    radial-gradient(circle at 8% 0%, rgba(94, 144, 112, 0.12), transparent 22rem),
    radial-gradient(circle at 92% 12%, rgba(184, 121, 91, 0.10), transparent 26rem),
    linear-gradient(135deg, rgba(226, 217, 200, 0.55) 0 1px, transparent 1px),
    #f5f1e7;
  --surface: #fffdf8;
  --surface-subtle: #efe8d9;
  --sidebar: #211c16;
  --sidebar-soft: #2b251d;
  --text: #2c2a25;
  --text-main: #2c2a25;
  --muted: #837c70;
  --primary: #5c7257;
  --accent: #b8795b;
  --success: #4d7c59;
  --warning: #b07f34;
  --danger: #a85d52;
  --border: #e4dac6;
  --shadow: 0 22px 60px rgba(70, 56, 32, 0.10);
  --shadow-soft: 0 12px 34px rgba(70, 56, 32, 0.08);
  --radius: 18px;
  --radius-lg: 26px;
  --mono: "Cascadia Code", "SFMono-Regular", "Fira Code", monospace;
  --font: "Atkinson Hyperlegible", "Aptos", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg-pattern);
  background-size: auto, auto, 34px 34px, auto;
  color: var(--text);
}
a { color: var(--primary); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .55rem; font-size: clamp(2rem, 4vw, 3.15rem); line-height: .96; letter-spacing: -.055em; }
h2 { margin-bottom: .2rem; font-size: 1.1rem; letter-spacing: -.018em; }
h3 { margin-bottom: .45rem; }
button, .button {
  border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-weight: 800;
  padding: .72rem 1rem;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(79, 93, 117, .18);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(79, 93, 117, .24); }
.danger-outline { background: transparent; color: #f7f4ec; border-color: rgba(255,255,255,.22); box-shadow: none; }
.ghost-button { background: #fff; color: var(--primary); border-color: var(--border); box-shadow: none; padding: .56rem .82rem; }
.container { width: min(1180px, 92vw); margin: 0 auto; }
.page { padding: 1.6rem 0 2.5rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mono-wrap { font-family: var(--mono); overflow-wrap: anywhere; }

.app-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; align-self: start; min-height: 100vh; padding: 1.15rem; background: linear-gradient(180deg, #211c16, #15110b); color: #f7f4ec; box-shadow: 18px 0 50px rgba(40,32,20,.18); }
.sidebar-stack { display: grid; gap: 1rem; min-height: calc(100vh - 2.3rem); }
.brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .78rem; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, var(--accent), #e0b18f); color: #141923; font-weight: 900; box-shadow: 0 16px 34px rgba(184,121,91,.25); }
.brand-title, .brand-subtitle { display: block; line-height: 1.04; }
.brand-title { font-weight: 900; letter-spacing: -.02em; }
.brand-subtitle { color: #b8bfcc; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: .4rem; }
.nav-pill { color: #b8bfcc; text-decoration: none; border: 1px solid transparent; border-radius: 16px; padding: .72rem .78rem; font-weight: 800; transition: 160ms ease; }
.nav-pill:hover, .nav-pill.active { color: #fff; background: #3a3025; border-color: rgba(255,255,255,.08); }
.sidebar-card { display: grid; gap: .55rem; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; background: rgba(255,255,255,.055); padding: .95rem; }
.privacy-card { background: linear-gradient(160deg, rgba(184,121,91,.16), rgba(255,255,255,.045)); }
.sidebar-logout { margin-top: auto; }
.shell-body { min-width: 0; padding: 1.1rem 1.35rem 2rem; }
.shell-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: .9rem 1rem; background: rgba(255,255,255,.72); border: 1px solid rgba(221,214,200,.75); border-radius: 22px; backdrop-filter: blur(18px); box-shadow: var(--shadow-soft); }
.topbar-status, .session-chip-list, .hero-badges { display: flex; gap: .48rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.shell-page { min-width: 0; }
.public-topbar { background: rgba(255,255,255,.8); border-bottom: 1px solid var(--border); backdrop-filter: blur(18px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }
.nav { display: flex; align-items: center; gap: .7rem; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 800; }
.nav a.active, .nav a:hover { color: var(--text); }

.summary-label { color: var(--muted); font-size: .76rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.summary-value { color: inherit; font-size: 1.02rem; font-weight: 900; }
.page-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.2rem; margin-bottom: 1rem; padding: 1.3rem 1.35rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(239,234,224,.8)); box-shadow: var(--shadow); }
.page-hero p { max-width: 760px; line-height: 1.55; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid rgba(109,114,128,.18); background: #f6f2e9; color: var(--primary); font-size: .76rem; font-weight: 900; padding: .25rem .68rem; white-space: nowrap; }
.badge.success { color: var(--success); background: rgba(77,124,89,.11); border-color: rgba(77,124,89,.18); }
.badge.warn { color: var(--warning); background: rgba(194,138,46,.13); border-color: rgba(194,138,46,.2); }
.badge.error { color: var(--danger); background: rgba(185,74,72,.12); border-color: rgba(185,74,72,.2); }
.status-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; background: var(--muted); box-shadow: 0 0 0 5px rgba(109,114,128,.12); }
.status-dot.success { background: var(--success); box-shadow: 0 0 0 5px rgba(77,124,89,.14); }
.status-dot.warn { background: var(--warning); box-shadow: 0 0 0 5px rgba(194,138,46,.15); }
.status-dot.error { background: var(--danger); box-shadow: 0 0 0 5px rgba(185,74,72,.14); }

.system-pulse-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.pulse-card, .section-card, .card, .tree-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); }
.pulse-card { position: relative; min-height: 150px; padding: 1rem; overflow: hidden; }
.pulse-card::after { content: ""; position: absolute; inset: auto -20% -48% 40%; height: 120px; background: radial-gradient(circle, rgba(184,121,91,.13), transparent 65%); }
.pulse-card strong { display: block; margin: .58rem 0 .35rem; font-size: 1.45rem; letter-spacing: -.035em; }
.pulse-card p { color: var(--muted); line-height: 1.45; margin-bottom: 0; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(340px, .82fr); gap: 1rem; align-items: start; }
.workspace-grid-config { grid-template-columns: minmax(310px, .78fr) minmax(0, 1.22fr); }
.workspace-main, .workspace-side { display: grid; gap: 1rem; min-width: 0; }
.section-card { padding: 1rem; }
.section-heading, .terminal-toolbar, .note-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .85rem; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .75rem; }
.metric-tile, .kv-item, .summary-card { border: 1px solid var(--border); border-radius: 18px; background: var(--surface-subtle); padding: .9rem; }
.metric-tile span { display: block; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.metric-tile strong { display: block; margin-top: .35rem; font-size: 1.6rem; letter-spacing: -.04em; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .75rem; }
.kv-grid.single { grid-template-columns: 1fr; }
.kv-item { overflow: hidden; }
.check-list, .list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: .7rem; }
.check-row { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .72rem; align-items: flex-start; padding: .82rem; border: 1px solid var(--border); border-radius: 18px; background: #fbfaf7; }
.note-list { display: grid; gap: .75rem; }
.note-item { border: 1px solid var(--border); border-radius: 18px; background: #fbfaf7; padding: .85rem; }
.note-item p { color: var(--muted); line-height: 1.5; margin-bottom: 0; }
.note-item.warn { border-color: rgba(194,138,46,.3); background: #fff7e8; }
.note-item.error { border-color: rgba(185,74,72,.3); background: #fff0ef; }
.note-item.success { border-color: rgba(77,124,89,.24); background: #f0f7ef; }

.flow-timeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .72rem; }
.flow-timeline.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flow-step { border: 1px solid var(--border); border-radius: 18px; background: var(--surface-subtle); padding: .9rem; min-height: 92px; }
.flow-step span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 900; margin-bottom: .55rem; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; }
.model-card { border: 1px solid var(--border); border-radius: 20px; background: #fbfaf7; padding: 1rem; }
.model-card.active { border-color: rgba(77,124,89,.34); box-shadow: inset 0 0 0 1px rgba(77,124,89,.1); }
.model-card p { color: var(--muted); line-height: 1.45; }
.json-panel pre, pre { margin: 0; padding: 1rem; overflow: auto; background: #141923; color: #eef2f6; border-radius: 18px; border: 1px solid rgba(255,255,255,.08); font-family: var(--mono); font-size: .84rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .72rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }

.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .78rem; }
.grid-form.compact { grid-template-columns: 1fr; max-width: 680px; }
label { display: flex; flex-direction: column; gap: .35rem; color: var(--text); font-weight: 800; }
.toggle-field { flex-direction: row; align-items: center; padding-top: 1.15rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="file"], select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--text); padding: .7rem .78rem; outline: none; transition: border-color 150ms ease, box-shadow 150ms ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,93,117,.12); }
input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--primary); }
.field-hint, .form-note { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.full-span { grid-column: 1 / -1; }
.form-section .grid-form { padding-top: .15rem; }
.sticky-actions { position: sticky; bottom: 1rem; z-index: 10; display: flex; justify-content: flex-end; padding: .35rem; border-radius: 999px; background: rgba(247,244,236,.78); backdrop-filter: blur(12px); }
.flag-list { display: grid; gap: .66rem; }
.flag-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem; border: 1px solid var(--border); border-radius: 16px; background: #fbfaf7; }
.flag-row small { display: block; color: var(--muted); margin-top: .18rem; }

.flash-group { display: grid; gap: .6rem; margin-bottom: 1rem; }
.flash { border: 1px solid var(--border); border-radius: 18px; padding: .72rem .9rem; background: #fff; box-shadow: var(--shadow-soft); }
.flash.success { border-color: rgba(77,124,89,.24); background: #f0f7ef; color: var(--success); }
.flash.error { border-color: rgba(185,74,72,.26); background: #fff0ef; color: var(--danger); }
.flash.warn, .flash.warning { border-color: rgba(194,138,46,.28); background: #fff7e8; color: var(--warning); }
.success-text { color: var(--success); }
.warn-text { color: var(--warning); }
.inline-warning {
  border: 1px solid rgba(194,138,46,.28);
  border-radius: 14px;
  background: #fff7e8;
  color: #6f4b17;
  padding: .7rem .85rem;
}
.empty-state { border: 1px dashed var(--border); border-radius: 18px; padding: 1rem; color: var(--muted); background: #fbfaf7; }
.inline-result { margin-top: .8rem; padding: .85rem; border-radius: 18px; border: 1px solid var(--border); background: #fbfaf7; }
.inline-result.success { border-color: rgba(77,124,89,.26); background: #f0f7ef; }
.inline-result.warn { border-color: rgba(194,138,46,.28); background: #fff7e8; }

.users-toolbar, .users-filter-bar, .stats-chip-row, .session-item-top, .user-title-row, .user-card-meta { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.users-filter-bar { margin: .85rem 0; }
.filter-field { min-width: min(420px, 100%); flex: 1; }
.toggle-chip { flex-direction: row; align-items: center; border: 1px solid var(--border); border-radius: 999px; background: #fbfaf7; padding: .55rem .75rem; }
.users-shell { display: block; overflow-x: auto; }
.user-card, .session-tree { border: 1px solid var(--border); border-radius: 20px; background: #fbfaf7; overflow: hidden; }
.user-card > summary, .session-summary, .tree-summary { cursor: pointer; list-style: none; }
.user-card-summary { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; }
.user-card-body { border-top: 1px solid var(--border); padding: 1rem; display: grid; gap: .85rem; }
.user-grid, .session-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem; }
.hash-block { border: 1px solid var(--border); border-radius: 16px; background: #fff; padding: .75rem; }
.masked-secret { color: var(--muted); font-family: var(--mono); }
.stats-chip { display: grid; gap: .15rem; min-width: 92px; padding: .65rem; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.session-list { display: grid; gap: .65rem; padding: .8rem; }
.session-item { border: 1px solid var(--border); border-radius: 16px; background: #fff; padding: .75rem; }

.terminal-card { background: #151a24; color: #f7f4ec; }
.terminal-card .summary-label, .terminal-card .muted { color: #b8bfcc; }
.live-terminal { min-height: 380px; max-height: 520px; overflow: auto; white-space: pre-wrap; background: #0d1119; color: #e7ecf2; }
.terminal-line { display: block; margin: 0 0 .25rem; }
.terminal-line.warn { color: #f4c56a; }
.terminal-line.error { color: #ff9b99; }
.terminal-line.success { color: #9fcda7; }
.terminal-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.copy-line { display: flex; gap: .5rem; align-items: center; justify-content: space-between; }
.copy-value { overflow-wrap: anywhere; }

.tree-controls { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.tree-card { overflow: hidden; }
.tree-card-body { padding: 1rem; border-top: 1px solid var(--border); }
.tree-stack { display: grid; gap: .8rem; }

@media (max-width: 1180px) {
  .system-pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-grid, .workspace-grid-config { grid-template-columns: 1fr; }
  .flow-timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; min-height: auto; }
  .sidebar-stack { min-height: auto; }
  .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell-body { padding: .85rem; }
  .shell-topbar, .page-hero, .user-card-summary, .section-heading { flex-direction: column; align-items: stretch; }
  .system-pulse-grid, .flow-timeline, .flow-timeline.compact { grid-template-columns: 1fr; }
  .hero-badges, .topbar-status { justify-content: flex-start; }
}

/* Visual polish pass: calm technical cockpit, no logic changes. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 38%),
    radial-gradient(circle at 78% 82%, rgba(184, 121, 91, 0.08), transparent 22rem);
  mix-blend-mode: multiply;
  opacity: 0.72;
  z-index: -1;
}

.app-shell {
  isolation: isolate;
}

.sidebar {
  background:
    radial-gradient(circle at 18% 2%, rgba(184, 121, 91, 0.25), transparent 12rem),
    linear-gradient(180deg, #171d29 0%, #111722 58%, #0f131c 100%);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
}

.sidebar-stack {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  padding: 0.25rem 0.15rem 0.55rem;
}

.brand-mark {
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(20, 25, 35, 0.22);
  border-radius: 11px;
}

.nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
}

.nav-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 0.62rem;
  background: rgba(184, 191, 204, 0.38);
  box-shadow: 0 0 0 4px rgba(184, 191, 204, 0.04);
}

.nav-pill.active::before,
.nav-pill:hover::before {
  background: #e0b18f;
  box-shadow: 0 0 0 4px rgba(224, 177, 143, 0.12);
}

.nav-pill.active {
  box-shadow: inset 3px 0 0 #b8795b, 0 14px 30px rgba(0, 0, 0, 0.14);
}

.shell-body {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 20rem);
}

.shell-topbar {
  position: sticky;
  top: 1rem;
  z-index: 10;
}

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -42px;
  right: -72px;
  width: 280px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(184, 121, 91, 0.16), transparent 68%);
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.pulse-card,
.section-card,
.model-card,
.kv-item,
.metric-tile,
.note-item,
.user-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.pulse-card:hover,
.section-card:hover,
.model-card:hover,
.user-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(30, 36, 48, 0.13);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
}

.pulse-card::before,
.section-card::before {
  content: "";
  display: block;
  height: 3px;
  margin: -1rem -1rem 0.9rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--primary), var(--accent), transparent 72%);
  opacity: 0.34;
}

.section-card.terminal-card::before,
.json-panel.section-card::before {
  background: linear-gradient(90deg, #e0b18f, #8490a6, transparent 74%);
  opacity: 0.42;
}

.metric-tile strong,
.pulse-card strong {
  font-variant-numeric: tabular-nums;
}

.badge {
  letter-spacing: 0.015em;
}

.badge.success,
.badge.warn,
.badge.error {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.flow-step {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(239, 234, 224, 0.92)),
    var(--surface-subtle);
}

.flow-step strong {
  line-height: 1.25;
}

.model-card {
  min-height: 168px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(239, 234, 224, 0.64)),
    #fbfaf7;
}

.model-card.active {
  background:
    radial-gradient(circle at 85% 0%, rgba(77, 124, 89, 0.12), transparent 9rem),
    linear-gradient(160deg, #ffffff, #f4efe5);
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}

table tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(239, 234, 224, 0.54);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.sticky-actions {
  box-shadow: 0 14px 38px rgba(30, 36, 48, 0.11);
}

.live-terminal {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #0d1119;
  background-size: 100% 28px;
}

@media (prefers-reduced-motion: no-preference) {
  .page-hero,
  .pulse-card,
  .workspace-main > .section-card,
  .workspace-side > .section-card {
    animation: adminPanelReveal 420ms ease both;
  }

  .pulse-card:nth-child(2) { animation-delay: 45ms; }
  .pulse-card:nth-child(3) { animation-delay: 90ms; }
  .pulse-card:nth-child(4) { animation-delay: 135ms; }

  @keyframes adminPanelReveal {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Parser Studio automation and full users visibility */
.parser-studio-shell {
  align-items: start;
}

.parser-command-center {
  background:
    radial-gradient(circle at 12% 0%, rgba(184, 121, 91, 0.14), transparent 18rem),
    linear-gradient(145deg, #ffffff, #f5efe3);
}

.parser-runtime-grid,
.parser-automation-grid,
.source-excerpt-grid {
  display: grid;
  gap: 1rem;
}

.parser-runtime-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 1rem;
}

.parser-automation-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.parser-action-card textarea {
  min-height: 150px;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.inline-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.parser-output-log,
.source-excerpt-card pre,
.raw-user-json pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.parser-output-log {
  border: 1px solid rgba(20, 25, 35, 0.18);
  border-radius: 16px;
  background: #111722;
  color: #e8edf5;
  padding: 1rem;
}

.source-excerpt-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.source-excerpt-card {
  min-width: 0;
}

.source-excerpt-card pre {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    #141923;
  color: #f3efe6;
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.visible-secret {
  display: block;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: #5c2f21;
  background: rgba(184, 121, 91, 0.12);
  border: 1px solid rgba(184, 121, 91, 0.28);
  border-radius: 12px;
  padding: 0.75rem;
}

.raw-user-json {
  margin-top: 1rem;
  border: 1px solid rgba(79, 93, 117, 0.18);
  border-radius: 16px;
  background: rgba(239, 234, 224, 0.48);
  padding: 0.75rem 1rem;
}

.raw-user-json summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-main);
}

.raw-user-json pre {
  margin-top: 0.75rem;
  background: #fffaf0;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  color: var(--text-main);
}

@media (max-width: 720px) {
  .parser-automation-grid,
  .source-excerpt-grid {
    grid-template-columns: 1fr;
  }
}

/* Capture Flow Inspector expansion */
.capture-inspector-shell {
  align-items: start;
}

.capture-command-center {
  background:
    radial-gradient(circle at 18% 0%, rgba(79, 93, 117, 0.16), transparent 18rem),
    radial-gradient(circle at 88% 12%, rgba(77, 124, 89, 0.1), transparent 16rem),
    linear-gradient(145deg, #ffffff, #f3eee4);
}

.capture-stats-grid,
.endpoint-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.capture-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.capture-stats-grid .metric-tile small {
  display: block;
  color: var(--muted);
  margin-top: 0.25rem;
}

.capture-flow-timeline .flow-step {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(239, 234, 224, 0.9)),
    var(--surface-subtle);
}

.capture-test-card textarea {
  min-height: 132px;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.endpoint-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.endpoint-card,
.policy-card,
.capture-record-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(30, 36, 48, 0.06);
}

.endpoint-card strong,
.policy-card strong {
  display: block;
  margin: 0.7rem 0 0.35rem;
  color: var(--text-main);
}

.endpoint-card code {
  display: block;
  color: #4f5d75;
  overflow-wrap: anywhere;
}

.policy-list,
.capture-record-list {
  display: grid;
  gap: 0.85rem;
}

.capture-record-card summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}

.capture-record-body {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.capture-record-body pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #141923;
  color: #f4efe6;
  border-radius: 14px;
  padding: 1rem;
}

@media (max-width: 720px) {
  .capture-stats-grid,
  .endpoint-grid {
    grid-template-columns: 1fr;
  }

  .capture-record-card summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Full admin UX pass: readability, scan speed, and mobile ergonomics. */
.shell-topbar,
.page-hero,
.section-card,
.pulse-card,
.model-card,
.user-card,
.session-tree,
.capture-record-card,
.endpoint-card,
.policy-card {
  backdrop-filter: blur(14px);
}

.section-card,
.pulse-card,
.card,
.tree-card {
  outline: 1px solid rgba(255, 255, 255, 0.62);
}

.section-heading h2,
.page-hero h1,
.terminal-toolbar h2 {
  max-width: 900px;
}

.section-heading p,
.page-hero p,
.metric-tile p,
.kv-item p {
  line-height: 1.55;
}

.table-wrap {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8faf8;
}

td {
  line-height: 1.45;
}

td .badge,
td code,
.kv-item code,
.metric-tile code {
  vertical-align: middle;
}

code,
.mono-wrap,
.copy-value {
  overflow-wrap: anywhere;
}

form .section-card,
.form-section {
  min-width: 0;
}

button.danger,
.button.danger,
button[formaction*="delete"],
button[formaction*="remove"] {
  background: var(--danger);
  border-color: rgba(185, 74, 72, 0.48);
  box-shadow: 0 12px 26px rgba(185, 74, 72, 0.18);
}

.ghost-button:hover {
  background: #f8faf8;
}

.empty-state {
  display: grid;
  gap: 0.35rem;
  min-height: 74px;
  place-content: center start;
}

.model-card strong,
.endpoint-card strong,
.policy-card strong,
.capture-record-card strong {
  letter-spacing: -0.01em;
}

.sidebar-card p,
.privacy-card p {
  color: #d8dee8;
  line-height: 1.5;
}

.quick-actions,
.terminal-actions,
.permission-action-row {
  align-items: center;
}

@media (max-width: 980px) {
  h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
    line-height: 1.05;
  }

  .shell-topbar {
    position: static;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1rem, 1180px);
  }

  .sidebar {
    padding: 0.85rem;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .nav-pill {
    min-height: 44px;
  }

  .shell-body {
    padding: 0.65rem;
  }

  .page-hero,
  .section-card,
  .pulse-card {
    border-radius: 20px;
    padding: 0.9rem;
  }

  .grid-form,
  .grid-form.compact,
  .kv-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  button,
  .button,
  .ghost-button {
    width: 100%;
    min-height: 44px;
  }

  .sticky-actions {
    position: static;
    border-radius: 18px;
  }
}

/* Users table — compact column view */
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  table-layout: auto;
}
.users-table thead th {
  text-align: left;
  padding: .52rem .72rem;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: var(--surface-subtle);
}
.users-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.users-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.users-table tbody .users-table-row { cursor: pointer; border-bottom: 1px solid var(--border); transition: background 100ms; }
.users-table tbody .users-table-row:hover { background: var(--surface-subtle); }
.users-table tbody .users-table-row--active { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.users-table td { padding: .6rem .72rem; vertical-align: middle; }
.user-email-cell strong { display: block; line-height: 1.3; }
.num-cell { text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.sessions-cell { white-space: nowrap; }
.last-login-cell { white-space: nowrap; }

.users-expand-row { display: none; }
.users-expand-row.open { display: table-row; }
.users-expand-row > td { padding: 0; }
.user-expand-body {
  padding: 1rem 1rem 1rem 1.2rem;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
  border-bottom: 2px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  display: grid;
  gap: .9rem;
}
.user-expand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .55rem;
}

/* Sessions list inside expanded row */
.session-compact-list { display: grid; gap: .32rem; }
.session-compact-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .38rem .65rem;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: .84rem;
  flex-wrap: wrap;
}
.session-compact-device { font-weight: 700; min-width: 110px; }
.session-compact-jti { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raw-user-json summary { cursor: pointer; user-select: none; }
.raw-user-json pre { margin-top: .55rem; font-size: .78rem; max-height: 280px; overflow-y: auto; }

/* ===== Ewaluacje Capture Flow ===== */
.eval-run-picker { display: grid; gap: .3rem; align-content: start; }
.eval-run-picker select { font: inherit; padding: .5rem .7rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); min-width: 16rem; }
.eval-shell { max-width: 1180px; margin: 0 auto; }
.eval-empty { padding: 1.4rem; }
.eval-code, pre.eval-code { background: var(--sidebar); color: #f3ead9; padding: .9rem 1rem; border-radius: 14px; overflow: auto; font-family: var(--mono); font-size: .82rem; line-height: 1.5; }
.eval-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.eval-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .8rem .9rem; box-shadow: var(--shadow-soft); min-width: 0; }
.eval-kpi-value { font-size: 1.9rem; font-weight: 900; color: var(--text); line-height: 1.1; margin-top: .25rem; }
.eval-kpi-value.eval-kpi-small { font-size: 1.15rem; }
.eval-kpi-unit { font-size: .8rem; font-weight: 700; color: var(--muted); }
.eval-kpi-value.is-good { color: var(--success); }
.eval-kpi-value.is-mid { color: var(--accent); }
.eval-kpi-value.is-weak { color: var(--danger); }
.delta-up { color: var(--success); font-weight: 800; }
.delta-down { color: var(--danger); font-weight: 800; }
.eval-trend-split { display: flex; align-items: baseline; gap: .65rem; font-size: 1.35rem; font-weight: 900; margin-top: .35rem; }
.eval-judgement-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr); gap: 1rem; margin-bottom: 1rem; }
.eval-judgement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.eval-judgement-grid > div { border: 1px solid var(--border); background: var(--surface-subtle); border-radius: 10px; padding: .65rem .75rem; }
.eval-verdict { display: block; margin-top: .2rem; }
.eval-verdict.improvement { color: var(--success); }
.eval-verdict.regression { color: var(--danger); }
.eval-verdict.mixed { color: var(--accent); }
.eval-verdict.baseline { color: var(--muted); }
.eval-risk-strip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .45rem; }
.eval-risk-strip span { border: 1px solid rgba(168,93,82,.24); background: rgba(168,93,82,.08); color: var(--text); border-radius: 999px; padding: .28rem .55rem; font-size: .8rem; }
.eval-audio-card { margin-bottom: 1rem; }
.eval-audio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .75rem; }
.eval-audio-item { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-subtle); padding: .85rem; min-width: 0; }
.eval-audio-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.eval-audio-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; margin: .6rem 0; }
.eval-audio-metrics span { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: .3rem .4rem; font-size: .75rem; font-weight: 800; text-align: center; white-space: nowrap; }
.eval-transcript { margin: .45rem 0; color: var(--text); font-size: .86rem; line-height: 1.45; max-height: 7.5rem; overflow: auto; }
.eval-source-card { display: grid; gap: .85rem; margin-bottom: 1rem; }
.eval-source-grid,
.eval-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: .75rem;
}
.eval-source-grid > div,
.eval-trend-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-subtle);
  padding: .75rem .85rem;
  min-width: 0;
}
.eval-source-grid strong,
.eval-source-grid code,
.eval-trend-card strong {
  display: block;
  margin-top: .25rem;
  overflow-wrap: anywhere;
}
.eval-trend-card strong { font-size: 1.35rem; }
.eval-copy-card { display: grid; gap: .7rem; }
.eval-copy-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.eval-copy-text { width: 100%; font-family: var(--mono); font-size: .78rem; line-height: 1.5; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-subtle); color: var(--text); padding: .8rem; resize: vertical; }
.card-title { display: flex; align-items: center; gap: .55rem; margin: 0 0 .85rem; font-size: 1.05rem; }
.eval-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .8rem; }
.eval-figure { margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-soft); }
.eval-figure img { display: block; width: 100%; height: auto; }
.eval-main-table-card { overflow: hidden; }
.eval-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.eval-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.eval-table th, .eval-table td { text-align: left; padding: .48rem .5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.eval-table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.eval-table tbody tr:hover { background: var(--surface-subtle); }
.eval-row-active { background: color-mix(in srgb, var(--success) 9%, transparent); }
/* Redesign #2 — czytelność zakładki ewaluacji (scoped, bez wpływu na inne ekrany):
   ciemniejszy muted = kontrast AA; większy drobny tekst; długie kolumny tabeli scenariuszy
   zawijają zamiast rozpychać tabelę (mniej scrolla poziomego, treść nie ucieka w bok). */
.eval-shell .muted, .eval-shell .small.muted { color: #645d51; }
.eval-table { font-size: .84rem; }
.eval-table th { color: #645d51; font-size: .76rem; }
.eval-table-clickable td:nth-child(3),
.eval-table-clickable td:last-child { white-space: normal; max-width: 16rem; overflow-wrap: anywhere; }
.eval-score { font-weight: 900; padding: .15rem .5rem; border-radius: 999px; }
.eval-score.is-good { color: var(--success); background: rgba(77,124,89,.12); }
.eval-score.is-mid { color: var(--accent); background: rgba(184,121,91,.14); }
.eval-score.is-weak { color: var(--danger); background: rgba(168,93,82,.14); }
.eval-weak { border: 1px solid var(--border); border-radius: 14px; padding: .6rem .85rem; margin-bottom: .6rem; background: var(--surface); }
.eval-weak summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.eval-weak-score { font-weight: 900; padding: .1rem .5rem; border-radius: 999px; }
.eval-weak-text { margin: .5rem 0 .3rem; font-style: italic; }
.eval-reasons { margin: .35rem 0 0; padding-left: 1.1rem; color: var(--text); }
.eval-reasons li { margin: .15rem 0; }
.hero-title { margin: .2rem 0 .35rem; font-size: 1.5rem; }
.hero-desc { margin: 0; color: var(--muted); max-width: 46rem; }

/* ===== Ewaluacje: klikalne wykresy + drill-down ===== */
.eval-table-clickable .eval-row-toggle { cursor: pointer; }
.eval-table-clickable .eval-row-toggle:hover { background: var(--surface-subtle); }
.eval-table-clickable .eval-row-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.eval-caret { color: var(--muted); transition: transform 140ms ease; width: 1.2rem; }
.eval-row-toggle.is-open .eval-caret { transform: rotate(90deg); color: var(--primary); }
.eval-detail-row > td { background: var(--surface-subtle); padding: 0; }
.eval-detail { padding: .85rem 1rem; }
.eval-detail-title { font-weight: 900; margin-bottom: .25rem; }
.eval-detail-text { font-style: italic; color: var(--text); margin: .2rem 0 .55rem; white-space: normal; max-width: 70rem; }
.eval-detail-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.eval-figure img { cursor: zoom-in; }
.eval-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; gap: .8rem; padding: 2rem; background: rgba(33, 28, 22, .82); backdrop-filter: blur(6px); }
.eval-lightbox[hidden] { display: none; }
.eval-lightbox img { max-width: min(94vw, 1100px); max-height: 82vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); background: var(--surface); }
.eval-lightbox-cap { color: #f3ead9; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.eval-lightbox-close { position: absolute; top: 1.1rem; right: 1.2rem; width: 42px; height: 42px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25); font-size: 1.1rem; cursor: pointer; }

@media (max-width: 820px) {
  .eval-shell { max-width: none; }
  .eval-judgement-card { grid-template-columns: 1fr; }
  .eval-judgement-grid { grid-template-columns: 1fr; }
  .eval-audio-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Łagodna strona błędu (panel sam daje radę przy przeciążeniu backendu) */
.error-card { max-width: 560px; margin: 9vh auto; text-align: center; }
.error-title { margin: .4rem 0 .6rem; font-size: 1.5rem; }
.error-message { color: var(--muted, #6c6359); line-height: 1.5; margin-bottom: 1.2rem; }
.error-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* Parser Studio — czytelne podsumowanie wyniku parsowania (dostrajanie) */
.parser-summary { margin: .6rem 0; display: grid; gap: .55rem; }
.parser-summary-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.parser-items-table { width: 100%; font-size: .86rem; border-collapse: collapse; }
.parser-items-table th { text-align: left; font-weight: 700; letter-spacing: .03em; color: var(--muted, #6c6359); }
.parser-items-table td, .parser-items-table th { padding: .35rem .5rem; border-bottom: 1px solid var(--border, rgba(120,110,95,.18)); vertical-align: top; }

/* === Ewaluacje 2026-06-13: release gates, kanały audio, rozkład score === */
.eval-gates-card { border-left: 3px solid var(--primary); }
.eval-gates-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: .9rem; }
.eval-gate-headline { display: flex; flex-direction: column; gap: .25rem; align-items: flex-end; text-align: right; padding: .55rem .8rem; border-radius: 14px; border: 1px solid var(--border); background: #fbfaf7; }
.eval-gate-headline.is-pass { border-color: rgba(77,124,89,.4); background: rgba(77,124,89,.08); }
.eval-gate-headline.is-fail { border-color: rgba(168,93,82,.4); background: rgba(168,93,82,.08); }
.eval-gate-headline.is-warn { border-color: rgba(194,138,46,.4); background: rgba(194,138,46,.08); }
.eval-gate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .7rem; }
.eval-gate-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: .75rem .85rem; min-width: 0; }
.eval-gate-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .35rem; }
.eval-gate-state { font-size: .82rem; font-weight: 700; white-space: nowrap; padding: .12rem .5rem; border-radius: 999px; border: 1px solid transparent; }
.eval-gate-state.is-pass { color: var(--success); background: rgba(77,124,89,.11); border-color: rgba(77,124,89,.2); }
.eval-gate-state.is-fail { color: var(--danger); background: rgba(168,93,82,.12); border-color: rgba(168,93,82,.22); }
.eval-gate-state.is-warn { color: var(--warning); background: rgba(194,138,46,.13); border-color: rgba(194,138,46,.22); }
.eval-gate-state.is-na { color: var(--muted); background: rgba(131,124,112,.1); border-color: rgba(131,124,112,.2); }
.eval-gate-watch { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.eval-watch-pill { font-size: .76rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; border: 1px solid var(--border); }
.eval-watch-pill.is-good { color: var(--success); background: rgba(77,124,89,.1); }
.eval-watch-pill.is-mid { color: var(--accent); background: rgba(184,121,91,.12); }
.eval-watch-pill.is-weak { color: var(--danger); background: rgba(168,93,82,.12); }
.eval-smoke-strip { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .85rem; padding-top: .75rem; border-top: 1px dashed var(--border); }

.eval-channels-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .7rem; }
.eval-channel { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: .75rem .85rem; min-width: 0; }
.eval-channel-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; margin-top: .2rem; }
.eval-channel-value.is-good { color: var(--success); }
.eval-channel-value.is-mid { color: var(--accent); }
.eval-channel-value.is-weak { color: var(--danger); }
.eval-channel-value .eval-kpi-unit { font-size: .8rem; font-weight: 600; color: var(--muted); }

.eval-breakdown-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.4rem; }
.eval-breakdown-col { min-width: 0; }
.eval-bar-row { display: grid; grid-template-columns: 8rem 1fr auto; gap: .6rem; align-items: center; margin-top: .45rem; }
.eval-bar-label { font-size: .82rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eval-bar-track { height: 8px; border-radius: 999px; background: rgba(131,124,112,.15); overflow: hidden; }
.eval-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--muted); }
.eval-bar-fill.is-good { background: var(--success); }
.eval-bar-fill.is-mid { background: var(--accent); }
.eval-bar-fill.is-weak { background: var(--danger); }
.eval-bar-num { font-size: .82rem; font-weight: 700; white-space: nowrap; }
