/* ════════════════════════════════════════════════════════════════════
   Live demo — a scaled-down replica of the HostFlow dashboard.
   Tokens mirror frontend/src/design.css so the demo and the product
   read as one design, in both the dark and the light theme.
   ════════════════════════════════════════════════════════════════════ */

.demo {
  --a-bg: #141b28; --a-surface: #1c2535; --a-alt: #172031; --a-hover: #283449;
  --a-border: #35435a; --a-border-sub: #2c374b;
  --a-text: #eef2fa; --a-text-2: #b5c1d6; --a-muted: #97a7c1;
  --a-primary: #f18b58; --a-primary-hover: #f6a67e; --a-primary-sub: #3b2d24;
  --a-btn: #d45c30; --a-btn-hover: #bb4921;
  --a-danger: #f27070; --a-danger-sub: rgba(242,112,112,.13);
  --a-success: #3ecf8e; --a-success-sub: rgba(62,207,142,.13);
  --a-warning: #f5b83d; --a-warning-sub: rgba(245,184,61,.13);
  --a-info: #58a6f0; --a-info-sub: rgba(88,166,240,.13);
  --a-row-alt: #202c40; --a-row-hover: #29384e;
  --s-bg: #172031; --s-hover: #232f43; --s-active: #2b384f; --s-active-text: #f4f6fb;
  --s-text: #eef2fa; --s-text-2: #b5c1d6; --s-muted: #97a7c1; --s-border: #2c374b;
  --s-mark-bg: #2b384f; --s-mark: #f1a27c; --s-primary: #f18b58; --s-primary-sub: #354052;
  --a-font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --a-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  position: relative;
  display: flex; flex-direction: column;
  height: 720px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--a-bg);
  color: var(--a-text);
  font-family: var(--a-font);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 60px 140px -60px rgba(255,120,71,.28), 0 40px 100px -40px rgba(0,0,0,.95);
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
.demo[data-theme="light"] {
  --a-bg: #f4f6fa; --a-surface: #ffffff; --a-alt: #f5f7fb; --a-hover: #eaf0f7;
  --a-border: #dde3ed; --a-border-sub: #eaf0f6;
  --a-text: #26334a; --a-text-2: #5e6c82; --a-muted: #748198;
  --a-primary: #c75025; --a-primary-hover: #ab3d16; --a-primary-sub: #fff0e8;
  --a-danger: #dc4444; --a-danger-sub: rgba(220,68,68,.09);
  --a-success: #14915f; --a-success-sub: rgba(20,145,95,.09);
  --a-warning: #b57811; --a-warning-sub: rgba(181,120,17,.1);
  --a-info: #2570c7; --a-info-sub: rgba(37,112,199,.09);
  --a-row-alt: #f4f7fb; --a-row-hover: #edf3fa;
  --s-bg: #eaf0f9; --s-hover: #e0e9f7; --s-active: #ffffff; --s-active-text: #304b76;
  --s-text: #293b56; --s-text-2: #5e718f; --s-muted: #7185a1; --s-border: #d6e0ef;
  --s-mark-bg: #ffffff; --s-mark: #5578b6; --s-primary: #476aab; --s-primary-sub: #dce7f8;
  color-scheme: light;
  box-shadow: 0 60px 140px -60px rgba(255,120,71,.28), 0 40px 100px -40px rgba(0,0,0,.95);
}
.demo *, .demo *::before, .demo *::after { box-sizing: border-box; }
.demo button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.demo :focus-visible { outline: 2px solid var(--a-primary); outline-offset: 2px; border-radius: 6px; }
.demo .mono { font-family: var(--a-mono); }
.demo .ic { width: 16px; height: 16px; flex-shrink: 0; }
.demo-noscript { padding: 40px; }

/* browser chrome */
.a-chrome {
  display: flex; align-items: center; gap: 14px;
  height: 40px; padding: 0 14px; flex-shrink: 0;
  background: #0c1017; border-bottom: 1px solid rgba(255,255,255,.07);
}
.a-dots { display: flex; gap: 7px; }
.a-dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a303a; }
.a-url {
  flex: 1; max-width: 460px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 26px; padding: 0 12px; border-radius: 7px;
  background: #161b24; color: #8b95a7; font-family: var(--f-mono, var(--a-mono)); font-size: 11.5px;
  white-space: nowrap; overflow: hidden;
}
.a-url .ic { width: 12px; height: 12px; color: #6fcf97; }
.a-url b { color: #d9dee8; font-weight: 400; }
.a-chrome-r { width: 50px; }

.a-app { flex: 1; min-height: 0; display: flex; }

/* sidebar */
.a-side {
  width: 232px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--s-bg);
  border-right: 1px solid var(--a-border);
  color: var(--s-text);
  transition: width .25s ease;
  overflow: hidden;
}
.a-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; min-height: 70px; white-space: nowrap; }
.a-mark { width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--s-mark-bg); color: var(--s-mark); box-shadow: 0 2px 5px rgba(82,107,149,.13); flex-shrink: 0; }
.a-mark svg { width: 23px; height: 23px; }
.a-wm { font-size: 22px; font-weight: 650; letter-spacing: -1px; color: var(--s-text); }
.a-wm span { font-weight: 400; }
.a-wm i { font-style: normal; color: #ed8c5d; }
.a-sep { height: 1px; background: var(--s-border); margin: 0 14px 6px; }
.a-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 9px; scrollbar-width: none; }
.a-nav::-webkit-scrollbar { display: none; }
.a-group { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--s-muted); padding: 13px 10px 5px; font-weight: 600; opacity: .8; white-space: nowrap; }
.a-link {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 7px 10px; margin-bottom: 2px;
  border-radius: 7px; border-left: 2px solid transparent;
  color: var(--s-text-2); font-size: 12.5px; text-align: left; white-space: nowrap;
  transition: background .15s, color .15s;
}
.a-link .ic { width: 17px; height: 17px; stroke-width: 1.6; }
.a-link:hover { background: var(--s-hover); color: var(--s-text); }
.a-link[aria-current="page"] { background: var(--s-active); border-left-color: #da744c; color: var(--s-active-text); font-weight: 600; box-shadow: 0 2px 5px rgba(83,108,148,.07); }
.a-link[aria-current="page"] .ic { color: #ce693f; }
.a-link-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.a-count { font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: 10px; background: var(--a-danger); color: #fff; min-width: 18px; text-align: center; }
.a-collapse { display: flex; justify-content: flex-end; padding: 6px 10px; }
.a-collapse button { padding: 6px; border-radius: 4px; color: var(--s-muted); display: flex; }
.a-collapse button:hover { color: var(--s-text); }
.a-user { margin: 0 6px; padding: 10px 4px 12px; border-top: 1px solid var(--s-border); }
.a-user-in { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--s-hover); }
.a-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--a-btn); color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; flex-shrink: 0; }
.a-user-t { flex: 1; min-width: 0; }
.a-user-t div { font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-role { display: inline-block; margin-top: 3px; font-size: 8.5px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--s-primary-sub); color: var(--s-text-2); }
.a-user-in > button { padding: 4px; color: var(--s-muted); display: flex; }
.demo.is-collapsed .a-side { width: 60px; }
.demo.is-collapsed .a-wm, .demo.is-collapsed .a-group, .demo.is-collapsed .a-link-label, .demo.is-collapsed .a-count, .demo.is-collapsed .a-user-t, .demo.is-collapsed .a-user-in > button { display: none; }
.demo.is-collapsed .a-brand { justify-content: center; padding: 18px 0 14px; }
.demo.is-collapsed .a-link { justify-content: center; padding: 8px 0; }
.demo.is-collapsed .a-group-gap { display: block; height: 8px; }
.a-group-gap { display: none; }
.demo.is-collapsed .a-collapse { justify-content: center; }
.demo.is-collapsed .a-user-in { justify-content: center; padding: 8px 0; }

/* main */
.a-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a-top {
  height: 56px; flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  background: var(--a-bg);
  border-bottom: 1px solid var(--a-border);
}
.a-crumb { margin-right: auto; display: flex; align-items: center; gap: 14px; font-size: 11.5px; color: var(--a-text-2); white-space: nowrap; min-width: 0; }
.a-crumb b { font-weight: 600; color: var(--a-text); }
.a-crumb i { font-style: normal; color: var(--a-muted); opacity: .55; }
.a-ws { position: relative; }
.a-ws-btn { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 5px 10px; border: 1px solid var(--a-border) !important; border-radius: 6px; font-size: 12px; font-weight: 500; }
.a-ws-btn .ic { width: 13px; height: 13px; color: var(--a-muted); }
.a-ws-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 230px;
  list-style: none; margin: 0; padding: 5px;
  background: var(--a-surface); border: 1px solid var(--a-border); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.a-ws-menu button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 6px; text-align: left; font-size: 12.5px; }
.a-ws-menu button:hover, .a-ws-menu button:focus-visible { background: var(--a-hover); }
.a-ws-menu button span:last-child { font-size: 11px; color: var(--a-muted); }
.a-ws-menu button[aria-selected="true"] { color: var(--a-primary); font-weight: 600; }
.a-icon-btn { display: flex; align-items: center; padding: 6px 7px !important; border: 1px solid var(--a-border) !important; border-radius: 6px; color: var(--a-muted) !important; }
.a-icon-btn:hover { color: var(--a-text) !important; }
.a-content { flex: 1; min-height: 0; overflow: auto; padding: 26px 28px 36px; scrollbar-width: thin; scrollbar-color: var(--a-border) transparent; }
.a-content.is-flush { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.a-page { animation: aIn .25s ease both; }
@keyframes aIn { from { opacity: 0; transform: translateY(6px); } }

/* primitives */
.a-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--a-border); }
.a-title { font-size: 24px; font-weight: 600; letter-spacing: -.04em; line-height: 1.2; margin: 0; }
.a-sub { margin: 5px 0 0; color: var(--a-muted); font-size: 13px; }
.a-head-r { display: flex; align-items: center; gap: 10px; }
.a-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px !important; border-radius: 6px; font-size: 12.5px; font-weight: 550; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.a-btn .ic { width: 14px; height: 14px; }
.a-btn-primary { background: var(--a-btn) !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 3px rgba(113,48,22,.07); }
.a-btn-primary:hover { background: var(--a-btn-hover) !important; }
.a-btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.a-btn-ghost { color: var(--a-text-2) !important; border: 1px solid var(--a-border) !important; }
.a-btn-ghost:hover { background: var(--a-hover) !important; color: var(--a-text) !important; }
.a-btn-ghost:disabled { opacity: .45; cursor: not-allowed; }
.a-btn-sm { padding: 4px 10px !important; font-size: 11.5px; }
.a-card { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: 14px; box-shadow: 0 2px 3px rgba(36,53,46,.02); }
.a-muted { color: var(--a-muted); }
.a-label { font-size: 10.5px; color: var(--a-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.a-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px !important; border-radius: 16px;
  border: 1px solid var(--a-border) !important; color: var(--a-muted) !important;
  font-size: 11.5px; transition: all .15s;
}
.a-chip[aria-pressed="true"] { border-color: var(--a-primary) !important; background: var(--a-primary-sub) !important; color: var(--a-primary) !important; font-weight: 600; }
.a-chip em { font-style: normal; font-size: 9.5px; font-weight: 600; background: var(--a-hover); border-radius: 8px; padding: 1px 5px; }
.a-chip[aria-pressed="true"] em { background: var(--a-primary-sub); }
.a-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 12px; font-size: 10.5px; font-weight: 500; background: var(--a-primary-sub); color: var(--a-primary); white-space: nowrap; }
.a-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; padding: 2px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; background: var(--a-hover); color: var(--a-muted); }
.a-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.a-badge.b-danger { background: var(--a-danger-sub); color: var(--a-danger); }
.a-badge.b-warning { background: var(--a-warning-sub); color: var(--a-warning); }
.a-badge.b-success { background: var(--a-success-sub); color: var(--a-success); }
.a-badge.b-info { background: var(--a-info-sub); color: var(--a-info); }
.a-badge.b-primary { background: var(--a-primary-sub); color: var(--a-primary); }
.a-pill { font-size: 11.5px; padding: 4px 13px; border-radius: 12px; font-weight: 500; background: var(--a-hover); color: var(--a-muted); white-space: nowrap; }
.a-pill.ok { background: var(--a-success-sub); color: var(--a-success); }
.a-input { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 11px; border: 1px solid var(--a-border); border-radius: 6px; background: var(--a-alt); color: var(--a-muted); }
.a-input:focus-within { border-color: var(--a-primary); background: var(--a-surface); box-shadow: 0 0 0 3px var(--a-primary-sub); }
.a-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--a-text); font: inherit; font-size: 12.5px; }
.a-input input::placeholder { color: var(--a-muted); opacity: .8; }
.a-toggle { position: relative; width: 36px; height: 20px; border-radius: 20px; background: var(--a-border) !important; transition: background .2s; flex-shrink: 0; padding: 0 !important; }
.a-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.a-toggle[aria-checked="true"] { background: var(--a-success) !important; }
.a-toggle[aria-checked="true"]::after { transform: translateX(16px); }
.a-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; min-width: 50px; }
.demo[data-theme="light"] .a-bar { background: rgba(16,24,40,.08); }
.a-bar i { display: block; height: 100%; border-radius: 3px; transition: width .4s ease; }
.a-usage { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.a-usage span { font-size: 11px; color: var(--a-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.a-empty { padding: 36px; text-align: center; color: var(--a-muted); }
.a-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--a-border); margin: 18px 0 18px; overflow-x: auto; scrollbar-width: none; }
.a-tabs button { padding: 9px 14px !important; font-size: 12.5px; color: var(--a-text-2) !important; border-bottom: 2px solid transparent !important; margin-bottom: -1px; border-radius: 0; white-space: nowrap; }
.a-tabs button:hover { color: var(--a-text) !important; }
.a-tabs button[aria-selected="true"] { color: var(--a-primary) !important; border-bottom-color: var(--a-primary) !important; font-weight: 600; }

/* tables */
.a-table-wrap { overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.a-table th { padding: 10px 16px; font-size: 9.5px; font-weight: 600; color: var(--a-muted); text-transform: uppercase; letter-spacing: .09em; white-space: nowrap; background: var(--a-row-alt); border-bottom: 1px solid var(--a-border-sub); }
.a-table td { padding: 11px 16px; border-bottom: 1px solid var(--a-border-sub); color: var(--a-text); font-size: 12.5px; vertical-align: middle; }
.a-table tbody tr:last-child td { border-bottom: 0; }
.a-table tbody tr { transition: background .15s; }
.a-table tbody tr:hover { background: var(--a-row-hover); }
.a-table tr[data-row] { cursor: pointer; }
.a-host { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.a-host .mono { font-size: 11.5px; }
.a-os { width: 14px; height: 14px; color: var(--a-muted); flex-shrink: 0; }
.a-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.a-state { display: flex; align-items: flex-start; gap: 8px; white-space: nowrap; }
.a-state > i { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.a-state b { font-weight: 500; font-size: 12.5px; }
.a-state small { display: block; font-size: 10.5px; color: var(--a-muted); }

/* filters */
.a-toolbar { padding: 14px 16px; margin-bottom: 22px; display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.a-toolbar .a-input { width: 230px; }
.a-filters { flex: 1; display: grid; gap: 8px; min-width: 260px; }
.a-frow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.a-frow > .a-label { width: 56px; }
.a-group-h { width: 100%; display: flex; align-items: center; gap: 9px; padding: 5px 0 !important; margin-bottom: 9px; color: var(--a-text) !important; text-align: left; }
.a-group-h .ic { width: 15px; height: 15px; transition: transform .15s; }
.a-group-h[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.a-group-h b { font-size: 13.5px; font-weight: 600; }
.a-group-h span { font-size: 11.5px; color: var(--a-muted); }
.a-osgroup { margin-bottom: 22px; }
.a-osgroup > .a-card { overflow: hidden; }

/* overview — mirrors .ov-command in the product */
.ov-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
.ov-eyebrow, .ov-idx { font-size: 9.5px; letter-spacing: .15em; font-weight: 650; color: var(--a-muted); text-transform: uppercase; }
.ov-top p.ov-welcome { margin: 5px 0 0; font-size: 13px; color: var(--a-muted); }
.ov-command {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr 1fr;
  border-radius: 20px; background: #101e2d; color: #e7f3f6; border: 1px solid #263c4a;
  box-shadow: 0 18px 45px rgba(7,23,35,.1);
}
.ov-command::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 77% 44%, rgba(44,169,159,.15), transparent 53%), linear-gradient(115deg, transparent 50%, rgba(146,212,224,.02) 50%); }
.ov-command::after { content: ""; position: absolute; z-index: -1; right: 0; width: 58%; top: 0; bottom: 0; background-image: radial-gradient(rgba(115,187,197,.17) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to right, transparent, #000); -webkit-mask-image: linear-gradient(to right, transparent, #000); }
.ov-copy { padding: 30px 32px 24px; }
.ov-kicker { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 9.5px; color: #7dd8cc; letter-spacing: .16em; text-transform: uppercase; }
.ov-kicker .ic { width: 13px; height: 13px; }
.ov-command h1 { font-size: clamp(24px, 2.6vw, 36px); font-weight: 500; line-height: 1.15; letter-spacing: -.045em; margin: 16px 0 10px; color: #e7f3f6; }
.ov-command h1 span { color: #77d8c9; }
.ov-intro { max-width: 340px; font-size: 12px; color: #a2b8c7; line-height: 1.7; margin: 0; }
.ov-num { display: flex; align-items: center; gap: 15px; margin: 20px 0 16px; }
.ov-num strong { font-size: 44px; font-weight: 450; letter-spacing: -.045em; line-height: 1; }
.ov-num span { font-size: 13px; }
.ov-num small { display: block; color: #93abbc; font-size: 10.5px; margin-top: 4px; }
.ov-link { display: inline-flex !important; align-items: center; gap: 20px; color: #bcf4e9 !important; font-size: 11.5px; border-bottom: 1px solid #508a85 !important; padding: 0 0 5px !important; border-radius: 0; }
.ov-link .ic { width: 13px; height: 13px; }
.ov-orbit-area { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px; }
.ov-orbit { width: 190px; aspect-ratio: 1; border-radius: 50%; position: relative; display: grid; place-items: center; background: conic-gradient(from 220deg, #77d8c9 var(--orbit), #2b4251 0); padding: 6px; box-shadow: 0 0 50px rgba(97,214,197,.1); transition: --orbit .6s; }
.ov-orbit::before { content: ""; position: absolute; inset: -16px; border-radius: 50%; border: 1px dashed rgba(132,207,203,.21); }
.ov-orbit::after { content: ""; position: absolute; inset: 15px; border: 1px solid rgba(160,242,214,.11); border-radius: 50%; }
.ov-core { border-radius: 50%; background: #122737; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; padding: 0 16px; }
.ov-core .ic { color: #77d8c9; width: 18px; height: 18px; }
.ov-core strong { font-size: 32px; font-weight: 450; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.ov-core span { font-size: 10px; color: #a2b8c7; line-height: 1.3; }
.ov-legend { display: flex; gap: 20px; margin-top: 28px; font-size: 10.5px; color: #b4cad5; }
.ov-legend span { display: flex; gap: 6px; align-items: center; }
.ov-legend i { width: 5px; height: 5px; border-radius: 50%; background: #77d8c9; }
.ov-legend span + span i { background: #8197a7; }
.ov-legend b { color: #fff; }
.ov-strip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 13px 32px; border-top: 1px solid rgba(121,153,165,.15); background: rgba(9,23,38,.27); font-size: 10.5px; color: #a2b8c7; }
.ov-strip .ic { width: 14px; height: 14px; }
.ov-strip b { color: #e3eff3; font-weight: 500; }
.ov-strip .ov-ts { margin-left: auto; }
.ov-tel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 26px 0 28px; }
.ov-tel-label { grid-column: 1 / -1; padding: 6px 0 12px; }
.ov-tel h2 { font-size: 17px; font-weight: 550; margin: 10px 0 5px; letter-spacing: -.02em; }
.ov-tel-label p { font-size: 10.5px; color: var(--a-muted); margin: 0; }
.ov-ranks { display: contents; }
.ov-rank { border-left: 1px solid var(--a-border); padding: 8px 18px; min-width: 0; }
.ov-rank:first-child { border-left: 0; padding-left: 0; }
.ov-rank-t { margin: 0 0 10px; font-weight: 550; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--a-muted); }
.ov-rank-t .ic { width: 14px; height: 14px; color: var(--g); }
.ov-rank ol { list-style: none; margin: 0; padding: 0; }
.ov-rank li { display: grid; grid-template-columns: minmax(0, 1fr) 70px 38px; align-items: center; gap: 10px; padding: 6px 0; font-size: 11.5px; }
.ov-rank li + li { border-top: 1px solid var(--a-border-sub); }
.ov-rank li span:first-child { font-family: var(--a-mono); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-rank li b { text-align: right; font-weight: 550; }
.ov-rank .a-bar i { background: var(--g); }
.ov-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.ov-panel { min-width: 0; padding-right: 22px; }
.ov-panel + .ov-panel { padding: 0 0 0 22px; border-left: 1px solid var(--a-border); }
.ov-panel-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ov-panel-h p { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; }
.ov-panel-h p .ic { width: 15px; height: 15px; color: var(--a-muted); }
.ov-panel-h button { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--a-text-2); }
.ov-panel-h button .ic { width: 12px; height: 12px; }
.ov-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--a-border); border-radius: 12px; overflow: hidden; background: var(--a-surface); }
.ov-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 12px; }
.ov-list li + li { border-top: 1px solid var(--a-border-sub); }
.ov-list .mono { font-size: 11px; }
.ov-list small { color: var(--a-muted); font-size: 10.5px; }
.ov-att { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border: 1px solid rgba(242,112,112,.3); border-radius: 12px; background: var(--a-danger-sub); margin-bottom: 10px; }
.ov-att strong { font-size: 26px; font-weight: 500; letter-spacing: -.03em; color: var(--a-danger); }
.ov-att span { font-size: 12px; color: var(--a-text-2); }

/* agent detail */
.a-back { font-size: 12.5px; color: var(--a-text-2) !important; margin-bottom: 14px; padding: 0 !important; }
.a-back:hover { color: var(--a-text) !important; }
.ad-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 20px 22px; }
.ad-head h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.ad-head p { margin: 4px 0 0; font-size: 11px; color: var(--a-text-2); }
.ad-actions { display: flex; align-items: center; gap: 8px; }
.a-range { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.a-range button { padding: 4px 11px !important; border: 1px solid var(--a-border) !important; border-radius: 6px; font-size: 11.5px; font-weight: 550; color: var(--a-text-2) !important; }
.a-range button[aria-pressed="true"] { background: var(--a-btn) !important; border-color: var(--a-btn) !important; color: #fff !important; }
.a-range hr { width: 1px; height: 22px; border: 0; background: var(--a-border); margin: 0 4px; }
.a-chart { margin-bottom: 14px; overflow: hidden; }
.a-chart-h { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--a-border); }
.a-chart-h b { font-size: 11.5px; font-weight: 600; color: var(--a-text-2); text-transform: uppercase; letter-spacing: .06em; }
.a-chart-h strong { font-size: 17px; font-weight: 600; }
.a-chart-body { display: grid; grid-template-columns: 38px 1fr; gap: 0 8px; padding: 14px 18px 8px; }
.a-yax { display: flex; flex-direction: column; justify-content: space-between; font-size: 9.5px; color: var(--a-muted); height: 130px; text-align: right; }
.a-plot { position: relative; height: 130px; background-image: linear-gradient(var(--a-border-sub) 1px, transparent 1px); background-size: 100% 25%; background-position: 0 -1px; border-bottom: 1px solid var(--a-border-sub); }
.a-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.a-plot .ln { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.a-xax { grid-column: 2; display: flex; justify-content: space-between; font-size: 9.5px; color: var(--a-muted); padding-top: 5px; }
.a-chart-note { padding: 0 18px 12px; margin: 0; font-size: 11.5px; color: var(--a-text-2); }
.ad-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ad-kv div { padding: 14px 16px; }
.ad-kv span { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--a-muted); font-weight: 600; }
.ad-kv b { display: block; margin-top: 5px; font-weight: 550; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* terminal page — mirrors TerminalPage */
.tp { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #0f131a; color: #e6e9ef; font-family: var(--a-font); }
.tp-tabs { display: flex; align-items: stretch; height: 38px; background: #12161e; border-bottom: 1px solid rgba(255,255,255,.07); overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.tp-back { padding: 0 16px !important; font-size: 12.5px; color: #949dae !important; border-right: 1px solid rgba(255,255,255,.07) !important; white-space: nowrap; }
.tp-back:hover { color: #fff !important; }
.tp-tab { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px; font-size: 12.5px; color: #949dae; border-right: 1px solid rgba(255,255,255,.07); white-space: nowrap; }
.tp-tab.is-on { color: #fff; background: #0f131a; box-shadow: inset 0 -2px 0 #58a6f0; }
.tp-tab > button:first-child { display: flex; align-items: center; gap: 8px; height: 100%; }
.tp-tab i { width: 6px; height: 6px; border-radius: 50%; background: #3ecf8e; }
.tp-x { padding: 3px !important; border-radius: 4px; color: #636d7f !important; display: flex; }
.tp-x:hover { color: #fff !important; background: rgba(255,255,255,.08) !important; }
.tp-x .ic { width: 12px; height: 12px; }
.tp-add { padding: 0 14px !important; color: #949dae !important; font-size: 16px; }
.tp-add:hover { color: #fff !important; }
.tp-bar { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-bottom: 1px solid rgba(255,255,255,.07); background: #12161e; flex-shrink: 0; }
.tp-bar b { font-family: var(--a-mono); font-size: 11.5px; font-weight: 700; }
.tp-conn { font-size: 10.5px; padding: 2px 8px; border-radius: 4px; background: rgba(62,207,142,.12); color: #3ecf8e; font-weight: 500; }
.tp-bar .grow { flex: 1; }
.tp-bar .a-btn-ghost, .tp-bar .a-icon-btn { color: #949dae !important; border-color: rgba(255,255,255,.12) !important; }
.tp-screen { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 10px; font-family: var(--a-mono); font-size: 12.5px; line-height: 1.6; color: #e6e9ef; cursor: text; scrollbar-width: thin; scrollbar-color: #2a303a transparent; }
.tp-out div { white-space: pre-wrap; word-break: break-word; min-height: 1.6em; }
.tp-out div:has(> .t-ascii) { line-height: 1.12; min-height: 1.12em; }
.tp-in { display: flex; gap: 8px; align-items: baseline; }
.tp-in span { white-space: nowrap; }
.tp-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; caret-color: #fff; padding: 0; }
.t-dim { color: #636d7f; }
.t-ok { color: #3ecf8e; }
.t-err { color: #f27070; }
.t-warn { color: #f5b83d; }
.t-coral { color: #f18b58; }
.t-info { color: #58a6f0; }
.t-b { color: #fff; font-weight: 700; }
.t-hint { color: #636d7f; }
.t-hint b { color: #f1a27c; font-weight: 500; }
.tp-pick { flex: 1; display: grid; place-content: center; gap: 8px; padding: 24px; text-align: center; }
.tp-pick h3 { margin: 0; font-size: 15px; font-weight: 600; color: #fff; }
.tp-pick p { margin: 0; font-size: 12px; color: #949dae; }
.tp-pick-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; max-width: 520px; }
.tp-pick-list button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px !important; border: 1px solid rgba(255,255,255,.12) !important; border-radius: 6px; font-family: var(--a-mono); font-size: 11.5px; color: #cdd3de !important; }
.tp-pick-list button:hover { border-color: #58a6f0 !important; color: #fff !important; }
.tp-pick-list .ic { width: 12px; height: 12px; color: #949dae; }

/* scripts */
.sc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.sc-list { padding: 6px; }
.sc-item { width: 100%; display: grid; gap: 3px; padding: 10px 12px !important; border-radius: 8px; text-align: left; border: 1px solid transparent !important; }
.sc-item:hover { background: var(--a-hover) !important; }
.sc-item[aria-pressed="true"] { background: var(--a-primary-sub) !important; border-color: rgba(241,139,88,.35) !important; }
.sc-item b { font-family: var(--a-mono); font-size: 11.5px; font-weight: 600; }
.sc-item span { font-size: 10.5px; color: var(--a-muted); }
.sc-folder { padding: 8px 12px 4px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--a-muted); font-weight: 600; }
.sc-detail { padding: 18px 20px; display: grid; gap: 14px; }
.sc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sc-top h2 { margin: 0; font-family: var(--a-mono); font-size: 15px; font-weight: 600; }
.sc-top p { margin: 4px 0 0; color: var(--a-muted); font-size: 12px; }
.sc-code { margin: 0; padding: 12px 14px; border-radius: 10px; background: #0f131a; color: #d7dbe3; font-family: var(--a-mono); font-size: 11.5px; line-height: 1.7; overflow-x: auto; white-space: pre; }
.sc-code .c { color: #636d7f; }
.sc-code .k { color: #f1a27c; }
.sc-run { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--a-border-sub); }
.sc-go { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-hint { font-size: 11.5px; color: var(--a-muted); margin: 0; }
.sc-hint b { color: var(--a-text); }
.a-seg { display: inline-flex; padding: 2px; border: 1px solid var(--a-border); border-radius: 7px; }
.a-seg button { padding: 4px 11px !important; border-radius: 5px; font-size: 11.5px; color: var(--a-text-2) !important; }
.a-seg button[aria-pressed="true"] { background: var(--a-hover) !important; color: var(--a-text) !important; font-weight: 600; }
.sc-cron { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-cron .a-input { width: 140px; min-height: 32px; }
.sc-cron .a-input input { font-family: var(--a-mono); }
.sc-human { font-size: 11.5px; }
.sc-prog { height: 4px; border-radius: 4px; background: var(--a-primary-sub); overflow: hidden; }
.sc-prog i { display: block; height: 100%; background: var(--a-primary); transition: width .3s; }
.sc-res-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sc-res-h b { font-size: 13px; font-weight: 600; }
.sc-res-h span { font-size: 11.5px; color: var(--a-muted); }
.a-table tr.sc-out td { background: #0f131a; color: #b8bfcc; font-family: var(--a-mono); font-size: 11px; white-space: pre-wrap; line-height: 1.6; }
.a-spin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; border-top-color: transparent; animation: aSpin .8s linear infinite; }
@keyframes aSpin { to { transform: rotate(360deg); } }

/* incidents */
.in-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.in-sum div { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--a-border); background: var(--a-surface); }
.in-sum span { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--c); }
.in-sum span i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.in-sum b { display: block; margin-top: 6px; font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.in-acts { display: flex; gap: 6px; justify-content: flex-end; }
.a-table tr.is-leaving { opacity: 0; transition: opacity .3s; }

/* misc tables */
.a-role-b { display: inline-block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.r-admin { background: var(--a-info-sub); color: var(--a-info); }
.r-operator { background: var(--a-warning-sub); color: var(--a-warning); }
.r-monitor { background: var(--a-success-sub); color: var(--a-success); }
.r-viewer { background: var(--a-hover); color: var(--a-muted); }
.au-flag td { background: var(--a-danger-sub); }
.a-new td { animation: rowIn 1.6s ease; }
@keyframes rowIn { from { background: var(--a-primary-sub); } }

/* responsive */
@media (max-width: 1100px) {
  .ov-command { grid-template-columns: 1fr; }
  .ov-orbit-area { padding-top: 0; }
  .ov-tel { grid-template-columns: 1fr; }
  .ov-rank { border-left: 0; padding: 12px 0; border-top: 1px solid var(--a-border); }
  .ov-two { grid-template-columns: 1fr; gap: 20px; }
  .ov-panel, .ov-panel + .ov-panel { padding: 0; border: 0; }
  .sc-layout { grid-template-columns: 1fr; }
  .ad-kv { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .demo { height: 700px; }
  .a-side { width: 60px; }
  .a-wm, .a-group, .a-link-label, .a-count, .a-user-t, .a-user-in > button, .a-collapse { display: none; }
  .a-group-gap { display: block; height: 8px; }
  .a-brand { justify-content: center; padding: 16px 0 12px; min-height: 60px; }
  .a-link { justify-content: center; padding: 8px 0; }
  .a-user-in { justify-content: center; padding: 8px 0; }
  .a-top { padding: 0 14px; gap: 8px; }
  .a-crumb b, .a-crumb i { display: none; }
  .a-content { padding: 18px 16px 28px; }
  .in-sum { grid-template-columns: 1fr 1fr; }
  .a-toolbar .a-input { width: 100%; }
  .a-url { max-width: none; }
  .a-chrome-r { display: none; }
}
@media (max-width: 640px) {
  .demo { height: 660px; border-radius: 14px; margin-inline: calc(-1 * var(--gut) + 8px); }
  .a-dots { display: none; }
  .a-ws-btn span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
  .a-title { font-size: 20px; }
  .ov-copy { padding: 22px; }
  .ov-strip { padding: 12px 22px; gap: 14px; }
  .ov-strip .ov-ts { margin-left: 0; }
  .ad-kv { grid-template-columns: 1fr; }
}

.demo-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; font-size: 12px; color: var(--fg-4); }
.a-table .a-tags { flex-wrap: nowrap; }

/* the terminal prompt is the focus indicator — no ring, like a real xterm */
.demo .tp-input, .demo .tp-input:focus, .demo .tp-input:focus-visible { outline: none; box-shadow: none; border: 0; border-radius: 0; }
.a-crumb span { overflow: hidden; text-overflow: ellipsis; }
.tp-bar b { white-space: nowrap; }
.tp-screen { overflow-x: auto; }
.tp-out div { white-space: pre; }
.tp-out div:has(> .t-hint) { white-space: normal; }
@media (max-width: 640px) {
  .a-crumb { display: none; }
  .a-ws { margin-left: auto; }
  .tp-screen { font-size: 11.5px; }
}
.tp-out a.t-link { color: #58a6f0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(88,166,240,.45); }
.tp-out a.t-link:hover { color: #8cc4ff; text-decoration-color: currentColor; }
