/* SwellWave Operations Dashboard. Built on the Cavenaugh Command Center design system
   (tokens, sidebar, top bar, cards, KPI tiles, data badges, split login), with SwellWave colors. */
:root {
  --navy: #1c3664; --navy-deep: #142a4f; --navy-ink: #0f1f3d; --aqua: #6fccdd;
  --background: #f5f7fa; --foreground: #0e1b2c; --card: #ffffff;
  --muted: #eef1f5; --muted-foreground: #5b6776; --subtle: #8a96a6;
  --border: rgba(14, 27, 44, 0.10); --border-strong: rgba(14, 27, 44, 0.16); --input: rgba(14, 27, 44, 0.14);
  --primary: #1c3664; --primary-foreground: #ffffff;
  --accent: #0e7c93; --accent-soft: rgba(111, 204, 221, 0.16); --ring: #6fccdd;
  --sidebar: #ffffff; --sidebar-foreground: #0e1b2c; --sidebar-muted: #5b6776;
  --sidebar-border: rgba(14, 27, 44, 0.08); --sidebar-active: rgba(111, 204, 221, 0.20);
  --success: #1f9d57; --warning: #c77a00; --danger: #d64545; --none: #9aa3b2;
  --radius: 0.75rem; --radius-md: 0.5rem;
  --shadow-card: 0 1px 2px rgba(14, 27, 44, 0.04), 0 10px 30px rgba(14, 27, 44, 0.06);
  --shadow-pop: 0 16px 48px rgba(14, 27, 44, 0.16);
  --font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
html.dark {
  --background: #0b1220; --foreground: #e8edf4; --card: #121c2e;
  --muted: #1a2740; --muted-foreground: #93a1b5; --subtle: #6c7c93;
  --border: rgba(255, 255, 255, 0.08); --border-strong: rgba(255, 255, 255, 0.14); --input: rgba(255, 255, 255, 0.14);
  --primary: #6fccdd; --primary-foreground: #0b1220;
  --accent: #6fccdd; --accent-soft: rgba(111, 204, 221, 0.14); --ring: #6fccdd;
  --sidebar: #0e1726; --sidebar-foreground: #e8edf4; --sidebar-muted: #93a1b5;
  --sidebar-border: rgba(255, 255, 255, 0.07); --sidebar-active: rgba(111, 204, 221, 0.16);
  --success: #34c77b; --warning: #e0a23a; --danger: #f06a6a; --none: #6c7c93;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 16px 48px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
svg.i { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted-foreground); }

/* motion (Command Center) */
@keyframes cc-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cc-fade-up { animation: cc-fade-up 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes cc-rotate { to { transform: rotate(360deg); } }
@keyframes cc-rotate-rev { to { transform: rotate(-360deg); } }
@keyframes cc-pulse { 0%, 100% { box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 0 0 rgba(111,204,221,.35); } 50% { box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 0 22px rgba(111,204,221,0); } }
@keyframes cc-spin { to { transform: rotate(360deg); } }
@keyframes cc-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.spin { animation: cc-spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .cc-fade-up, .orbit-spin, .orbit-counter, .hub, .spin, .fill { animation: none !important; } }

/* buttons (Command Center Button) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; height: 36px; padding: 0 16px; transition: opacity .15s, background .15s; outline: none; }
.btn:focus-visible { box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 1px 2px rgba(14,27,44,.08); }
.btn-primary:hover { opacity: .9; }
.btn-outline { border: 1px solid var(--border-strong); background: transparent; color: var(--foreground); }
.btn-outline:hover, .btn-ghost:hover { background: var(--muted); }
.btn-ghost { color: var(--foreground); }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 40px; padding: 0 20px; }
.btn-full { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-md); color: var(--muted-foreground); }
.icon-btn:hover { background: var(--muted); color: var(--foreground); }
.icon-btn svg.i { width: 18px; height: 18px; }
.link { color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link svg.i { width: 14px; height: 14px; }

/* data badge (Command Center DataBadge) + plain pills */
.badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; line-height: 1.35; white-space: nowrap; cursor: default; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live { color: var(--success); } .badge.live .dot { background: var(--success); }
.badge.off { color: var(--muted-foreground); } .badge.off .dot { background: var(--none); }
.badge.err { color: var(--danger); } .badge.err .dot { background: var(--danger); }
.badge.syncing { color: var(--accent); } .badge.syncing .dot { background: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; line-height: 1.35; background: var(--muted); color: var(--muted-foreground); white-space: nowrap; }
.pill.success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.pill.warning { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }
.pill.danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* ---------- login (Command Center split screen) ---------- */
.login { display: grid; min-height: 100vh; }
@media (min-width: 1024px) { .login { grid-template-columns: 1fr 1fr; } }
.login-brand { position: relative; display: none; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 48px; background: linear-gradient(140deg, #0a1626 0%, #1c3664 48%, #2a7f9a 100%); }
@media (min-width: 1024px) { .login-brand { display: flex; } }
.login-brand h1 { margin-top: 40px; font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: #fff; text-align: center; }
.login-brand .foot { position: absolute; bottom: 24px; font-size: 12px; color: rgba(255,255,255,.4); }
.orbit { position: relative; width: 440px; height: 440px; }
.orbit-ring { position: absolute; border-radius: 50%; border: 1px dashed rgba(255,255,255,.25); }
.hub { position: absolute; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #2a5590, #0f1f3d); animation: cc-pulse 4s ease-in-out infinite; }
.hub img { width: 58%; height: 58%; border-radius: 22%; }
.orbit-spin { position: absolute; inset: 0; transform-origin: center; animation: cc-rotate 48s linear infinite; will-change: transform; }
.orbit-node { position: absolute; transform: translate(-50%, -50%); }
.orbit-counter { transform-origin: center; animation: cc-rotate-rev 48s linear infinite; will-change: transform; }
.orbit-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 112px; height: 84px; border-radius: 16px; background: #fff; padding: 0 8px; box-shadow: 0 14px 34px rgba(8,20,40,.30); }
.orbit-card .ico { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 12px; background: rgba(111,204,221,.22); color: var(--navy); }
.orbit-card .ico svg.i { width: 18px; height: 18px; }
.orbit-card span { font-size: 12px; font-weight: 600; line-height: 1.15; color: var(--navy-ink); text-align: center; }
.login-side { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--background); padding: 24px 16px; }
.login-card { width: 100%; max-width: 448px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); padding: 32px 24px; box-shadow: var(--shadow-pop); }
@media (min-width: 640px) { .login-card { padding: 40px; } }
.login-card .logo { height: 80px; width: auto; margin-bottom: 24px; display: block; }
.login-card .logo.on-dark { display: none; }
html.dark .login-card .logo.on-light { display: none; }
html.dark .login-card .logo.on-dark { display: block; }
.login-card h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.login-card .sub { margin-top: 4px; font-size: 14px; color: var(--muted-foreground); }
.login-form { margin-top: 24px; display: grid; gap: 16px; }
.login-note { font-size: 12px; color: var(--muted-foreground); text-align: center; }
.login-copy { margin-top: 18px; text-align: center; font-size: 11px; color: var(--subtle); }
@media (min-width: 1024px) { .login-copy { display: none; } }

/* form fields */
label.lbl { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.lbl .opt { color: var(--muted-foreground); font-weight: 400; }
.in { height: 40px; width: 100%; border-radius: var(--radius-md); border: 1px solid var(--input); background: var(--card); padding: 0 12px; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.in::placeholder { color: var(--subtle); }
.in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 40%, transparent); }
.in[readonly] { background: var(--muted); color: var(--muted-foreground); }
.pw-wrap { position: relative; }
.pw-wrap .in { padding-right: 40px; }
.pw-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); display: flex; }
.pw-eye:hover { color: var(--foreground); }
.help { margin-top: 4px; font-size: 12px; color: var(--muted-foreground); }
.alert { border-radius: var(--radius-md); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); padding: 8px 12px; font-size: 14px; }
.alert:empty { display: none; }

/* ---------- app shell (Command Center sidebar + top bar) ---------- */
.layout { display: flex; min-height: 100vh; }
/* paint the sidebar column down the whole page, so long pages never show a gap under the sticky sidebar */
@media (min-width: 768px) { .layout { background-image: linear-gradient(to right, var(--sidebar) 255px, var(--sidebar-border) 255px, var(--sidebar-border) 256px, transparent 256px); } }
.sidebar { position: sticky; top: 0; height: 100vh; width: 256px; flex-shrink: 0; display: none; flex-direction: column; border-right: 1px solid var(--sidebar-border); background: var(--sidebar); color: var(--sidebar-foreground); }
@media (min-width: 768px) { .sidebar { display: flex; } }
.sb-brand { display: flex; height: 64px; align-items: center; gap: 10px; border-bottom: 1px solid var(--sidebar-border); padding: 0 20px; flex-shrink: 0; }
.sb-brand img { height: 36px; width: 36px; border-radius: 9px; }
.sb-brand .name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.sb-brand .tag { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.18em; color: var(--sidebar-muted); line-height: 1.4; }
.sb-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.sb-group { margin-bottom: 20px; }
.sb-label { margin-bottom: 6px; padding: 0 8px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--sidebar-muted); }
.sb-item { display: flex; align-items: center; gap: 10px; border-radius: var(--radius-md); padding: 8px; font-size: 14px; font-weight: 500; color: color-mix(in srgb, var(--sidebar-foreground) 80%, transparent); transition: background .15s, color .15s; margin-bottom: 2px; }
.sb-item svg.i { color: var(--sidebar-muted); }
.sb-item:hover { background: var(--muted); color: var(--foreground); }
.sb-item.on { background: var(--sidebar-active); color: var(--accent); }
.sb-item.on svg.i { color: var(--accent); }
.sb-foot { border-top: 1px solid var(--sidebar-border); padding: 12px; }
.sb-foot .sb-item { width: 100%; margin: 0; }
.col { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; height: 64px; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 80%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 0 16px; }
@media (min-width: 640px) { .topbar { padding: 0 20px; } }
.tb-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.tb-brand img { width: 30px; height: 30px; border-radius: 8px; }
@media (min-width: 768px) { .tb-brand { display: none; } }
.tb-date { display: none; font-size: 13px; color: var(--muted-foreground); }
@media (min-width: 768px) { .tb-date { display: block; } }
.tb-spacer { flex: 1; }
.tb-status { display: none; align-items: center; gap: 6px; height: 30px; border: 1px solid var(--border); border-radius: 999px; padding: 0 10px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.tb-status:hover { background: var(--muted); color: var(--foreground); }
.tb-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--none); }
.tb-status.ok .dot { background: var(--success); }
@media (min-width: 640px) { .tb-status { display: inline-flex; } }
.user { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; border-radius: var(--radius-md); padding: 4px 6px; }
.user-btn:hover { background: var(--muted); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
html.dark .avatar { background: #2a5590; }
.user-btn .nm { display: none; text-align: left; line-height: 1.2; }
.user-btn .nm b { display: block; font-size: 12px; font-weight: 600; }
.user-btn .nm small { font-size: 11px; color: var(--muted-foreground); text-transform: capitalize; }
@media (min-width: 1024px) { .user-btn .nm { display: block; } }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-pop); padding: 6px; }
.menu .who { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu .who b { display: block; font-size: 13px; }
.menu .who span { font-size: 12px; color: var(--muted-foreground); word-break: break-all; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 8px; border-radius: var(--radius-md); padding: 8px 10px; font-size: 13px; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--muted); }
main.main { flex: 1; min-width: 0; padding: 16px 16px 96px; }
@media (min-width: 640px) { main.main { padding: 24px 24px 96px; } }
@media (min-width: 768px) { main.main { padding-bottom: 24px; } }
@media (min-width: 1024px) { main.main { padding: 32px; } }
.page { max-width: 1400px; margin: 0 auto; }

/* mobile bottom bar + slide-up menu (Command Center MobileNav) */
.mnav { position: fixed; inset: auto 0 0 0; z-index: 40; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--background) 95%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); }
@media (min-width: 768px) { .mnav { display: none; } }
.mnav a, .mnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; font-size: 10px; font-weight: 500; color: var(--muted-foreground); }
.mnav .on { color: var(--accent); }
.mnav svg.i { width: 20px; height: 20px; }
.sheet { position: fixed; inset: 0; z-index: 50; }
@media (min-width: 768px) { .sheet { display: none !important; } }
.sheet .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet .panel { position: absolute; inset: auto 0 0 0; max-height: 82dvh; overflow-y: auto; border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; background: var(--background); padding-bottom: calc(env(safe-area-inset-bottom) + 84px); }
.sheet .head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: var(--background); padding: 12px 20px; }
.sheet .head .t { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.sheet .head img { width: 28px; height: 28px; border-radius: 7px; }
.sheet nav { padding: 12px; }
.sheet .sb-item { padding: 10px 8px; gap: 12px; }

/* ---------- page header, banners, cards ---------- */
.ph { margin-bottom: 24px; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; }
.ph h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.ph p { margin-top: 4px; font-size: 14px; color: var(--muted-foreground); }
.ph .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ph .updated { font-size: 12px; color: var(--muted-foreground); }
.banner { margin-bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; color: var(--muted-foreground); }
.banner > svg.i { color: var(--accent); width: 15px; height: 15px; }
.banner.bad { border-style: solid; border-color: color-mix(in srgb, var(--danger) 30%, transparent); background: color-mix(in srgb, var(--danger) 6%, transparent); color: var(--danger); }
.banner.bad > svg.i { color: var(--danger); }
.mb { margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-card); }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 16px; }
.card-t { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; min-width: 0; }
.card-t svg.i { color: var(--accent); }
.card-d { margin-top: 2px; font-size: 13px; color: var(--muted-foreground); }
.card-c { padding: 0 20px 20px; }
.card-pad { padding: 20px; }

/* KPI tile (Command Center KpiCard) */
.kpi { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 20px; box-shadow: var(--shadow-card); transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.kpi.flat { box-shadow: none; padding: 16px; }
.kpi.flat:hover { transform: none; box-shadow: none; }
.kpi-top { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { min-width: 0; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted-foreground); }
.kpi-value { margin-top: 12px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
@media (min-width: 640px) { .kpi-value { font-size: 30px; } .kpi.flat .kpi-value { font-size: 26px; } }
.kpi-value.dim { color: var(--subtle); }
.kpi-value.good { color: var(--success); }
.kpi-value.bad { color: var(--danger); }
.kpi-sub { margin-top: 8px; font-size: 12px; color: var(--muted-foreground); }
.kpi-sub .link { font-size: 12px; }

/* your day (Command Center MyDay) */
.day-name { font-size: 16px; font-weight: 600; }
.day-role { font-size: 12px; color: var(--muted-foreground); text-transform: capitalize; }
.day-items { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.day-item { display: flex; align-items: baseline; gap: 8px; font-size: 15px; color: var(--muted-foreground); }
.day-item b { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--accent); }
.day-item b.bad { color: var(--danger); }
.day-item b.ok { color: var(--success); }

/* bars, lists */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 1.1fr) 3fr auto; align-items: center; gap: 12px; font-size: 13px; }
.bar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--muted); }
.fill { display: block; height: 100%; border-radius: 999px; background: var(--primary); transform-origin: left; animation: cc-bar 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.bar-row .n { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.rows li:last-child { border-bottom: 0; }
.rows .sub { margin-top: 2px; font-size: 12px; color: var(--muted-foreground); }
.rows .r { flex-shrink: 0; text-align: right; color: var(--muted-foreground); font-size: 12px; }
.empty { font-size: 13px; color: var(--muted-foreground); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--card) 40%, transparent); padding: 48px 24px; text-align: center; }
.empty-state.sm { padding: 28px 20px; }
.empty-state .ico { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.empty-state .ico svg.i { width: 20px; height: 20px; }
.empty-state h3 { font-size: 15px; font-weight: 600; }
.empty-state p { margin-top: 4px; max-width: 440px; font-size: 13px; color: var(--muted-foreground); }
.empty-state .btn { margin-top: 16px; }
.ai-sum { white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; font-size: 12px; color: var(--muted-foreground); }

/* sub-tabs (Command Center SubTabs) */
.subtabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.subtabs button { margin-bottom: -1px; white-space: nowrap; border-bottom: 2px solid transparent; padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.subtabs button:hover { color: var(--foreground); }
.subtabs button.on { border-bottom-color: var(--accent); color: var(--foreground); }
.counts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

/* settings */
.conn-h { display: flex; align-items: center; gap: 12px; min-width: 0; }
.conn-ico { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.conn-fields { display: grid; gap: 14px; }
.conn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.saved { margin-top: 10px; font-size: 12px; color: var(--muted-foreground); }
.result { margin-top: 10px; font-size: 13px; }
.result:empty { display: none; }
.result.ok { color: var(--success); } .result.bad { color: var(--danger); }
.tbl-head, .tbl-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1fr) 170px; align-items: center; gap: 12px; padding: 12px 16px; }
.tbl-head { border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground); }
.tbl-row { border-bottom: 1px solid var(--border); font-size: 13px; }
.tbl-row:last-child { border-bottom: 0; }
.tbl-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tbl-user > div { min-width: 0; }
.tbl-user b { font-weight: 600; font-size: 14px; }
.tbl-user .em { font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-user .you { font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.tbl-row .cap { text-transform: capitalize; }
.tbl-head > :last-child, .tbl-row > .c-act { text-align: right; }
@media (max-width: 760px) {
  .tbl-head { display: none; }
  .tbl-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .tbl-row > .c-role, .tbl-row > .c-last { grid-column: 1; font-size: 12px; color: var(--muted-foreground); }
  .tbl-row > .c-status { grid-column: 2; grid-row: 1; }
  .tbl-row > .c-act { grid-column: 1 / -1; }
}

/* assistant */
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.quick button { border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 500; color: var(--foreground); transition: background .15s; text-align: left; }
.quick button:hover { background: var(--muted); }
.chat { display: grid; gap: 10px; }
.chat:empty { display: none; }
.msg { max-width: 860px; border-radius: var(--radius); padding: 10px 14px; font-size: 14px; white-space: pre-wrap; line-height: 1.55; }
.msg.me { justify-self: end; background: var(--primary); color: var(--primary-foreground); }
.msg.ai { justify-self: start; background: var(--muted); }
.msg.ai.bad { color: var(--danger); }
.ask { display: flex; gap: 8px; margin-top: 16px; }
.ask .in { flex: 1; min-width: 0; }

@media (max-width: 600px) {
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .bar-row .track { grid-column: 1 / -1; grid-row: 2; }
  .ph h1 { font-size: 22px; }
}
