/* JFM Router Management — dense console · JFM brand theme */
:root {
  /* JFM brand palette */
  --jfm-orange: #f47b20;
  --jfm-orange-dark: #d9610d;
  --jfm-charcoal: #1f2429;
  --jfm-ink: #111827;
  --jfm-muted: #5b6472;
  --jfm-line: #e7eaee;
  --jfm-soft: #f7f8fa;
  --jfm-status: #3ee082;

  /* Dark console derived from charcoal */
  --bg: #1c2026;
  --bg-elev: #242830;
  --bg-panel: #2a2f38;
  --bg-row: #1d2127;
  --bg-row-alt: #21252c;
  --bg-row-hover: #2b3039;
  --bg-row-sel: #3e2a0e;
  --bg-row-sel-hover: #503516;
  --bg-thead: #272c34;
  --line: #353b44;
  --line-soft: #2a3038;
  --line-dark: #0f1115;
  --text: #cdd3da;
  --text-bright: #f0f2f4;
  --text-dim: #8b9199;
  --muted: #727980;
  --accent: var(--jfm-orange);
  --accent-2: #fba74a;
  --accent-soft: rgba(244, 123, 32, 0.16);
  --accent-light: #fff2e8;
  --ok: var(--jfm-status);
  --ok-dot: var(--jfm-status);
  --warn: #f4a020;
  --bad: #f14c4c;
  --bad-dot: #f14c4c;
  --pending: #8b9199;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SF Mono", ui-monospace, monospace;
  --top: 36px;
  --nav: 188px;
  --row-h: 22px;
  --toolbar-h: 32px;
  --status-h: 26px;
  --object-h: 34px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 11px/1.3 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono, pre.code { font-family: var(--mono); font-size: 11px; }
.muted { color: var(--muted); }
.dim { color: var(--text-dim); }
.tight { margin: 0 0 8px; }

/* ===== Auth ===== */
body.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: linear-gradient(180deg, #111418 0%, var(--bg) 55%, #161a20 100%);
}
.auth-wrap { width: min(360px, calc(100% - 20px)); }
.auth-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  padding: 18px 18px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  border-radius: 2px;
}
.auth-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.auth-brand p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.auth-brand strong { font-size: 13px; font-weight: 600; color: var(--text-bright); }
.mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 10px; letter-spacing: -.03em;
  border-radius: 4px;
  flex-shrink: 0;
}
.stack { display: grid; gap: 8px; }
.stack label, form label {
  display: grid; gap: 3px;
  font-size: 10px; font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
}
input, select, textarea {
  width: 100%;
  background: #191c21;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 5px 7px;
  color: var(--text-bright);
  outline: none;
  height: 26px;
}
textarea { height: auto; min-height: 52px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
select { cursor: pointer; }
.check {
  display: flex !important; flex-direction: row !important; align-items: center;
  gap: 6px; text-transform: none !important; letter-spacing: 0 !important;
  font-weight: 500 !important; color: var(--text) !important; font-size: 11px !important;
}
.check input { width: auto; height: auto; }

/* ===== Shell ===== */
body.app { overflow: hidden; }
.shell {
  display: grid;
  grid-template-rows: var(--top) 1fr;
  height: 100vh;
  min-height: 0;
}

/* Top bar — JFM charcoal */
.topnav {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: #161a20;
  border-bottom: 1px solid var(--line-dark);
  z-index: 30;
}
.topnav .brand {
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  color: #fff; text-decoration: none;
  border-right: 1px solid #22262c;
  min-width: var(--nav);
}
.topnav .brand:hover { text-decoration: none; background: #1c2027; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name {
  font-weight: 700; font-size: 12px; color: #fff; white-space: nowrap;
  letter-spacing: -.01em;
}
.brand-sub {
  font-size: 9px; color: var(--muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.top-tabs {
  display: flex; align-items: stretch;
  margin-left: 4px;
}
.top-tabs a {
  display: flex; align-items: center;
  padding: 0 14px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}
.top-tabs a:hover { color: #fff; text-decoration: none; background: rgba(244,123,32,.06); }
.top-tabs a.active {
  color: #fff;
  border-bottom-color: var(--accent);
  background: rgba(244,123,32,.08);
}

.topnav .spacer { flex: 1; }
.topnav .user {
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  color: var(--text-dim); font-size: 11px;
  border-left: 1px solid #22262c;
}
.user-mail { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topnav form { margin: 0; }

/* Workspace: navigator + content */
.workspace {
  display: grid;
  grid-template-columns: var(--nav) 1fr;
  min-height: 0;
  height: 100%;
}

.navigator {
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}
.nav-section { border-bottom: 1px solid var(--line-soft); }
.nav-title {
  padding: 8px 10px 4px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted);
}
.navigator nav { display: flex; flex-direction: column; padding: 2px 0 6px; }
.navigator nav a {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 8px;
  color: var(--text);
  text-decoration: none;
  border-left: 2px solid transparent;
  font-size: 12px;
  line-height: 1.2;
}
.navigator nav a:hover { background: rgba(244,123,32,.06); color: #fff; text-decoration: none; }
.navigator nav a.active {
  background: var(--accent-soft);
  color: #fff;
  border-left-color: var(--accent);
}
.nav-ico {
  width: 14px; text-align: center;
  color: var(--muted); font-size: 11px; flex-shrink: 0;
}
.navigator nav a.active .nav-ico { color: var(--accent-2); }
.nav-foot {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

/* Content column */
.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
  height: 100%;
}

/* Object title bar */
.object-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--object-h);
  height: var(--object-h);
  padding: 0 10px;
  background: linear-gradient(180deg, #2c323a 0%, var(--bg-elev) 100%);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.object-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.object-title h1 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.object-type {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.object-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-shrink: 0; }

.alerts { padding: 0 8px; flex-shrink: 0; }
.alert {
  margin: 6px 0 0;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.alert.success { background: rgba(62,224,130,.1); border-color: rgba(62,224,130,.3); color: var(--ok); }
.alert.error { background: rgba(241,76,76,.1); border-color: rgba(241,76,76,.3); color: var(--bad); }

.main-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.main-scroll.main-fill {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

/* ===== Inventory root (fills viewport) ===== */
.inv-root {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

/* Compact status chips */
.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 8px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
}
.chip b { color: var(--text-bright); font-weight: 600; font-variant-numeric: tabular-nums; }
.chip i {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pending);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.chip.ok i { background: var(--ok-dot); }
.chip.bad i { background: var(--bad-dot); }
.chip.warn i { background: var(--warn); }
.chip.muted-chip i { background: var(--pending); }

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--toolbar-h);
  height: var(--toolbar-h);
  padding: 0 8px;
  background: #272c33;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.toolbar .search-wrap {
  position: relative;
  flex: 1 1 auto;
  max-width: 480px;
  min-width: 160px;
}
.toolbar .search-wrap input {
  padding-left: 24px;
  height: 24px;
  background: #191c21;
  font-size: 11px;
}
.toolbar .search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 7px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}
.toolbar select {
  height: 24px;
  width: auto;
  min-width: 110px;
  padding: 0 6px;
  font-size: 11px;
}

/* Grid scroll region */
.grid-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--bg);
}

/* Data grid — ESXi density, JFM colours */
.datagrid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 11px;
}
.datagrid thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-thead);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 10px;
  text-align: left;
  padding: 0 6px;
  height: 24px;
  border-bottom: 2px solid var(--line);
  border-right: 1px solid var(--line-soft);
  white-space: nowrap;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.datagrid thead th:last-child { border-right: none; }
.datagrid tbody td {
  height: var(--row-h);
  padding: 0 6px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  background: var(--bg-row);
}
.datagrid tbody tr:nth-child(even) td { background: var(--bg-row-alt); }
.datagrid tbody tr.host-row { cursor: pointer; }
.datagrid tbody tr.host-row:hover td { background: var(--bg-row-hover); }
.datagrid tbody tr.host-row.selected td {
  background: var(--bg-row-sel) !important;
  color: #fff;
}
.datagrid tbody tr.host-row.selected:hover td {
  background: var(--bg-row-sel-hover) !important;
}
.datagrid tbody tr.host-row.selected a.row-link { color: var(--accent-2); }
.datagrid tbody tr.host-row:focus { outline: none; }
.datagrid tbody tr.host-row:focus-visible td {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.datagrid a.row-link {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 11px;
}
.datagrid a.row-link:hover { text-decoration: underline; color: var(--accent); }

.col-check, .c-check { width: 28px; text-align: center; }
.col-id, .c-id { width: 40px; }
.col-proto, .c-proto { width: 52px; }
.col-port, .c-port { width: 48px; }
.col-status, .c-state { width: 100px; }
.col-actions, .c-act { width: 84px; text-align: right; }
.datagrid .col-check input,
.datagrid #check-all {
  width: 13px; height: 13px; margin: 0; padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: capitalize;
}
.datagrid tr.selected .status-dot { color: #e0e0e0; }
.status-dot::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pending);
  box-shadow: 0 0 0 1px rgba(0,0,0,.45);
  flex-shrink: 0;
}
.status-dot.online::before { background: var(--ok-dot); }
.status-dot.unreachable::before,
.status-dot.failed::before { background: var(--bad-dot); }
.status-dot.degraded::before { background: var(--warn); }
.status-dot.pending::before { background: var(--pending); }

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--status-h);
  min-height: var(--status-h);
  padding: 0 8px;
  background: #1a1d23;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}
.status-bar b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.status-bar .sep { color: #444c55; }
.status-bar .spacer { flex: 1; }
#sel-count { color: var(--text-dim); min-width: 72px; }

.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  background: transparent;
}
.empty-actions { margin-top: 10px; display: flex; gap: 6px; justify-content: center; }
.empty-row td { height: auto !important; border: none !important; background: transparent !important; }
.empty-row:hover td { background: transparent !important; }

/* Panels / forms */
.panel {
  margin: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.panel.slide-in { margin: 0; border: none; border-top: 1px solid var(--line); }
.panel.narrow { max-width: 520px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 8px;
  min-height: 28px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-panel);
}
.panel-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-dim);
}
.panel-body { padding: 8px; }
.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 8px;
  padding: 8px;
  align-items: start;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px;
  align-items: baseline;
  padding: 3px 0;
  border-bottom: 1px solid var(--line-soft);
}
.kv dt {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 600;
}
.kv dd { margin: 0; color: var(--text-bright); word-break: break-all; font-size: 11px; }
pre.code {
  margin: 0;
  background: #14161a;
  border: 1px solid var(--line-soft);
  color: #d4d4d4;
  padding: 8px;
  overflow: auto;
  max-height: 320px;
  font-size: 11px;
  line-height: 1.4;
}
.callout {
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(244,123,32,.07);
  border: 1px solid rgba(244,123,32,.22);
  color: var(--text-dim);
  font-size: 11px;
}
.callout ol { margin: 4px 0 0 16px; padding: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 4px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
}

/* Buttons — JFM pill style */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 24px; padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 0;
  background: #3a4049;
  color: var(--text-bright);
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { filter: brightness(1.12); text-decoration: none; color: #fff; }
.btn:active { filter: brightness(.94); }
.btn-primary {
  background: var(--accent);
  border-color: var(--jfm-orange-dark);
  color: #fff;
}
.btn-primary:hover { background: #f58c3e; color: #fff; }
.btn-secondary { background: #3a4049; border-color: #505762; }
.btn-danger { background: #4a1519; border-color: #7a2227; color: #ffb4ba; }
.btn-ghost {
  background: transparent;
  border-color: #444c55;
  color: var(--text-dim);
  height: 22px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-small { height: 22px; padding: 0 8px; font-size: 11px; }
.btn-tiny { height: 18px; padding: 0 6px; font-size: 10px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.btn-row.tight { margin-top: 0; }
.badge {
  display: inline-flex; align-items: center;
  padding: 0 5px; height: 16px;
  background: #3a4049; color: var(--text-dim);
  font-size: 9px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* AI providers table inside panel */
.panel .datagrid thead th { position: static; }

/* ===== Router tabs ===== */
.router-tabs {
  display: flex; gap: 0;
  padding: 0 8px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  min-height: 30px;
}
.router-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 14px;
  height: 30px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}
.router-tab:hover { color: #fff; text-decoration: none; background: rgba(244,123,32,.05); }
.router-tab.active {
  color: #fff;
  border-bottom-color: var(--accent);
  background: rgba(244,123,32,.08);
}
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 14px; padding: 0 4px;
  background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: 7px;
}
.router-tab.active .tab-badge { background: var(--jfm-orange-dark); }

/* ===== Config layout ===== */
.config-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.config-sidebar {
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 0;
}
.config-sidebar .panel { margin: 0; border: none; border-bottom: 1px solid var(--line); }
.config-main {
  overflow-y: auto;
  padding: 0;
}
.config-section { margin: 0; border: none; border-bottom: 1px solid var(--line); }
.config-section .panel-body { padding: 0; }
.config-table thead th { position: static; }
.c-cfg-key { width: 120px; }
.c-cfg-val { width: 200px; }
.c-cfg-src { width: 80px; }
.c-cfg-act { width: 90px; text-align: right; }
.config-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Edit modal */
.modal-overlay {
  display: flex;
  align-items: center; justify-content: center;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 100;
}
.modal-card {
  width: min(440px, calc(100% - 20px));
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
}
.modal-card .panel-head { border-bottom-color: var(--line); }
.modal-card .panel-body { max-height: 70vh; overflow-y: auto; }

/* ===== Chat layout — dense professional ===== */
.chat-layout {
  display: grid;
  grid-template-columns: 1fr 170px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--bg);
}
.chat-empty {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 16px 12px;
}
.chat-empty-icon { font-size: 20px; margin-bottom: 2px; color: var(--accent); }
.chat-empty strong { font-size: 12px; color: var(--text-dim); font-weight: 700; }
.chat-empty p { margin: 2px 0 0; font-size: 11px; color: var(--muted); line-height: 1.35; }
.chat-quick-btns { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }

.chat-msg {
  padding: 4px 8px;
  max-width: 92%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  font-size: 11px;
  line-height: 1.35;
}
.chat-msg .chat-role {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 1px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.chat-msg .chat-meta {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 8px;
}
.chat-msg .chat-content { word-break: break-word; }

.chat-user {
  align-self: flex-end;
  background: rgba(244,123,32,.12);
  border: 1px solid rgba(244,123,32,.2);
  color: var(--text-bright);
}
.chat-user .chat-role { color: var(--accent-2); }
.chat-user .chat-meta { color: var(--muted); }

.chat-assistant {
  align-self: flex-start;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
}
.chat-assistant .chat-role { color: var(--muted); }

.chat-input-bar {
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 4px 6px;
  flex-shrink: 0;
}
.chat-form {
  display: flex; gap: 4px; align-items: center;
}
.chat-form input {
  flex: 1;
  height: 24px;
  font-size: 11px;
  padding: 0 7px;
  background: #191c21;
  border-color: var(--line);
  color: var(--text-bright);
}
.chat-form input:focus { border-color: var(--accent); }
.chat-send-btn { height: 24px; padding: 0 10px; font-size: 11px; flex-shrink: 0; }

/* Chat sidebar — compact info strip */
.chat-sidebar {
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 6px;
  display: flex; flex-direction: column; gap: 6px;
}
.chat-info {
  display: grid; gap: 0;
  border: 1px solid var(--line-soft);
}
.chat-info-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  padding: 2px 6px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 10px;
}
.chat-info-row:last-child { border-bottom: none; }
.chat-info-row > span:first-child {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 600;
  font-size: 9px;
  white-space: nowrap;
}
.chat-info-row > span:last-child {
  color: var(--text-bright);
  text-align: right;
  font-size: 10px;
  word-break: break-all;
}
.chat-info-row .status-dot { text-transform: capitalize; font-size: 10px; }
.chat-info-row .status-dot::before { width: 6px; height: 6px; }
.chat-actions {
  display: flex; flex-direction: column; gap: 3px;
}

@media (max-width: 960px) {
  .workspace { grid-template-columns: 1fr; }
  .navigator { display: none; }
  .topnav .brand { min-width: auto; }
  .brand-sub { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .kv > div { grid-template-columns: 1fr; }
  .user-mail { max-width: 100px; }
  .top-tabs a { padding: 0 10px; }
}

@media (max-width: 900px) {
  .config-layout { grid-template-columns: 1fr; }
  .config-sidebar { border-right: none; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { flex-direction: row; border-left: none; border-top: 1px solid var(--line); max-height: none; overflow-x: auto; padding: 4px; gap: 4px; }
  .chat-info { flex: 1; }
}
