/* Farm Control application UI — Phase 1 light SaaS shell.
 * Existing page selectors remain available so page modules and API behavior are unchanged. */
:root {
  --canvas: #f6f8fb;
  --surface: #ffffff;
  --surface-subtle: #f1f4f8;
  --surface-elevated: #ffffff;
  --border: #e3e8ef;
  --border-strong: #cfd8e5;
  --text: #172033;
  --text-secondary: #526078;
  --muted: #738097;
  --accent: #2463eb;
  --accent-strong: #174cc5;
  --accent-soft: #eaf1ff;
  --ok: #18875b;
  --warn: #a96508;
  --err: #c73d4d;
  --info: #2573b8;
  --chip: #eef2f7;
  --focus-ring: 0 0 0 3px rgba(36,99,235,.20);
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-panel: 16px;
  --shadow-subtle: 0 1px 2px rgba(16,29,52,.04);
  --shadow-card: 0 1px 3px rgba(16,29,52,.06), 0 8px 24px rgba(16,29,52,.04);
  --shadow-floating: 0 14px 36px rgba(16,29,52,.12);
  --transition: 160ms ease;
  --sidebar-w: 240px;
  --sidebar-collapsed-w: 72px;
  --topbar-h: 68px;
  --content-w: 1440px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;
  /* Compatibility aliases used by existing page modules. */
  --bg: var(--canvas);
  --bg-2: var(--surface);
  --card: var(--surface);
  --card-2: var(--surface-subtle);
  --text: #172033;
  --shadow: var(--shadow-card);
  --shadow-hover: var(--shadow-floating);
  --radius: var(--radius-card);
}
[data-theme="dark"] {
  --canvas: #0f1726;
  --surface: #172235;
  --surface-subtle: #1d2a40;
  --surface-elevated: #21304a;
  --border: #2e3d55;
  --border-strong: #435470;
  --text: #edf3fb;
  --text-secondary: #c0ccdd;
  --muted: #91a0b7;
  --accent: #78a3ff;
  --accent-strong: #9abaff;
  --accent-soft: #24385f;
  --ok: #4dcf91;
  --warn: #f4b04d;
  --err: #ff7581;
  --info: #70c2fb;
  --chip: #223149;
  --focus-ring: 0 0 0 3px rgba(120,163,255,.30);
  --bg: var(--canvas);
  --bg-2: var(--surface);
  --card: var(--surface);
  --card-2: var(--surface-subtle);
  --shadow: 0 1px 3px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.18);
  --shadow-hover: 0 12px 32px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--canvas);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: background var(--transition), color var(--transition);
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: none; }
::selection { color: var(--text); background: #cfe0ff; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 300; transform: translateY(-160%); padding: 9px 12px; border-radius: var(--radius-control); background: var(--text); color: var(--surface); }
.skip-link:focus { transform: translateY(0); }
code { background: var(--chip); padding: 2px 6px; border-radius: 5px; font-size: .9em; }

/* Application shell */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 100; width: var(--sidebar-w);
  display: flex; flex-direction: column; background: var(--surface);
  border-right: 1px solid var(--border); transition: width var(--transition), transform var(--transition);
}
.sidebar-head { display: flex; align-items: center; min-height: var(--topbar-h); padding: 0 var(--space-4); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; min-width: 0; gap: 10px; color: var(--text); font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.brand:hover { color: var(--text); }
.brand-logo { display: inline-flex; align-items: end; justify-content: center; gap: 2px; width: 28px; height: 28px; padding: 6px; border-radius: 8px; background: var(--accent); flex-shrink: 0; }
.brand-logo span { display: block; width: 3px; border-radius: 2px; background: #fff; }
.brand-logo span:nth-child(1) { height: 7px; }.brand-logo span:nth-child(2) { height: 11px; }.brand-logo span:nth-child(3) { height: 15px; }
.brand-text b { color: var(--accent); }
.sidebar-collapse { margin-left: auto; padding: 4px 8px; color: var(--muted); font-size: 20px; line-height: 1; }
.nav { flex: 1; overflow-y: auto; padding: var(--space-4) var(--space-2); }
.nav-group { margin-bottom: var(--space-4); }
.nav-group-title { padding: 8px 12px 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 8px 12px; color: var(--text-secondary); border-radius: var(--radius-control); font-size: 13px; transition: background var(--transition), color var(--transition); }
.nav-link:hover { background: var(--surface-subtle); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 650; }
.nav-link.active::before { width: 3px; height: 18px; margin-left: -12px; margin-right: 0; border-radius: 0 3px 3px 0; background: var(--accent); content: ""; }.nav-ico { display: inline-flex; align-items: center; justify-content: center; width: 20px; color: currentColor; font-size: 14px; filter: grayscale(1); }.nav-ico .ui-icon { width: 17px; height: 17px; }.nav-link.active .nav-ico { filter: none; }
.sidebar-foot { display: grid; gap: var(--space-2); padding: var(--space-3); border-top: 1px solid var(--border); }
.workspace-switcher { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px; color: var(--text-secondary); font-size: 11px; }
.workspace-switcher b, .workspace-switcher small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.workspace-switcher b { color: var(--text); font-size: 12px; }.workspace-switcher small { color: var(--muted); }
.workspace-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 750; flex-shrink: 0; }
.side-status { padding: 0 8px; color: var(--muted); font-size: 11px; }
.logout-btn { justify-content: center; width: 100%; }
.sidebar-backdrop { display: none; }

.main { display: flex; flex: 1; flex-direction: column; min-width: 0; margin-left: var(--sidebar-w); }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: var(--space-4); min-height: var(--topbar-h); padding: 12px var(--space-7); background: rgba(255,255,255,.9); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); }
[data-theme="dark"] .topbar { background: rgba(23,34,53,.92); }
.burger { display: none; }
.topbar-context { display: grid; gap: 0; min-width: 145px; }.topbar-context strong { color: var(--text); font-size: 14px; }.topbar-kicker { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.search { position: relative; display: flex; flex: 1; min-width: 240px; max-width: 560px; }
.search input { width: 100%; min-height: 40px; padding: 9px 108px 9px 13px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--text); outline: none; transition: border-color var(--transition), box-shadow var(--transition); }
.search input::placeholder { color: var(--muted); }.search input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.search .search-clear { position: absolute; right: 42px; top: 0; width: 32px; height: 100%; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; opacity: 0; pointer-events: none; }.search.has-value .search-clear { opacity: 1; pointer-events: auto; }.search button { position: absolute; right: 0; top: 0; height: 100%; width: 42px; border: 0; border-left: 1px solid var(--border); border-radius: 0 var(--radius-control) var(--radius-control) 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; }
.search button:hover { color: var(--accent); background: var(--surface-subtle); }
.search-shortcut { position: absolute; top: 10px; right: 48px; padding: 2px 5px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-subtle); color: var(--muted); font-size: 10px; }
.topbar-right { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--text-secondary); cursor: pointer; transition: background var(--transition), border-color var(--transition), color var(--transition); }.icon-btn:hover { border-color: var(--border); background: var(--surface-subtle); color: var(--text); }.icon-btn:active { transform: translateY(1px); }
.bell { position: relative; font-size: 18px; }.bell-dot { display: none; position: absolute; top: 3px; right: 3px; min-width: 16px; padding: 1px 4px; border-radius: 10px; background: var(--err); color: #fff; font-size: 9px; font-weight: 700; text-align: center; }.bell-dot.show { display: block; }

.container { width: 100%; max-width: var(--content-w); flex: 1; margin: 0 auto; padding: var(--space-6) clamp(var(--space-4), 3vw, var(--space-8)) var(--space-11); }
.footer { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-4); padding: var(--space-4) var(--space-7); border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }

/* Shared page hierarchy */
.view { animation: fadeIn 180ms ease both; }.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); margin: 0 0 var(--space-6); }.page-head h1 { margin: 0; color: var(--text); font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.035em; line-height: 1.15; }.page-head .muted { font-size: 14px; font-weight: 400; letter-spacing: 0; }.crumbs { margin-bottom: var(--space-3); color: var(--muted); font-size: 13px; }.panel-note { padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-subtle); }.loading { padding: var(--space-12) 0; color: var(--muted); text-align: center; }.empty { padding: var(--space-10) var(--space-4); color: var(--muted); text-align: center; }.muted { color: var(--muted); }h1 { margin: 4px 0 var(--space-5); font-size: clamp(24px, 3vw, 32px); letter-spacing: -.035em; }h2 { margin: 0 0 var(--space-4); color: var(--text); font-size: 18px; letter-spacing: -.02em; }h3 { margin: 0 0 var(--space-3); color: var(--text-secondary); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

/* Buttons and controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 13px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--text-secondary); cursor: pointer; font-size: 13px; transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition); }.btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }.btn:active { transform: translateY(1px); }.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }.btn-sm { min-height: 30px; padding: 4px 9px; font-size: 12px; }.btn.danger:hover { border-color: var(--err); background: #fff0f2; color: var(--err); }.btn.primary, .btn[data-primary="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }.btn.primary:hover, .btn[data-primary="true"]:hover { border-color: var(--accent-strong); background: var(--accent-strong); color: #fff; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }.toolbar input, .toolbar select, .ai-form input, .ai-form select, .aiop-input input { min-height: 38px; padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--text); outline: none; }.toolbar input:focus, .toolbar select:focus, .ai-form input:focus, .ai-form select:focus, .aiop-input input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }

/* Signal cards and panels — retained selectors for all existing pages */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-7); }.stat-card { min-width: 0; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-subtle); transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition); }.stat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card); transform: translateY(-1px); }.stat-card .label { color: var(--muted); font-size: 12px; }.stat-card .value { margin-top: 3px; color: var(--text); font-size: 24px; font-weight: 700; letter-spacing: -.025em; overflow-wrap: anywhere; }.stat-card.accent { border-color: #a9c3ff; background: var(--accent-soft); }.stat-card.warn { border-color: #e9c987; background: #fffaf0; }.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-7); }.widget, .card { min-width: 0; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-subtle); }.widget h3, .card h3 { margin-bottom: var(--space-3); color: var(--text-secondary); font-size: 12px; text-transform: none; letter-spacing: 0; }.widget-link { margin-top: var(--space-3); font-size: 12px; }.event-row { display: flex; align-items: baseline; gap: var(--space-2); padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }.event-row:last-child { border-bottom: 0; }.event-row .t { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }.event-row .type { font-weight: 600; }.event-row .acc { margin-left: auto; color: var(--muted); white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-6); }.quick-links, .queue-chips, .queue-bar, .btn-group, .acc-actions, .counters, .trace-steps { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }.quick-links { margin-top: var(--space-3); }.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 4px 9px; border-radius: 999px; background: var(--chip); color: var(--text-secondary); font-size: 12px; }.chip b { color: var(--accent-strong); }.stub-chip { display: inline-flex; padding: 4px 9px; border: 1px dashed var(--border-strong); border-radius: 999px; background: var(--surface-subtle); color: var(--muted); font-size: 11px; }

/* Tables */
.table-wrap, .crm-table { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-subtle); -webkit-overflow-scrolling: touch; }table { width: 100%; min-width: 760px; border-collapse: collapse; }th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }th { position: sticky; top: 0; z-index: 1; background: var(--surface-subtle); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; user-select: none; }th:hover { color: var(--text); }tbody tr { transition: background var(--transition); }tbody tr:hover { background: var(--surface-subtle); }tbody tr:last-child td { border-bottom: 0; }td.num { text-align: right; font-variant-numeric: tabular-nums; }.pager { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-4); color: var(--muted); }.pager button { min-height: 34px; padding: 6px 11px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--text); cursor: pointer; }

/* Status system */
.badge, .health-pill, .state-pill, .w-state { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; font-weight: 650; }.badge { min-height: 24px; padding: 3px 9px; font-size: 11px; letter-spacing: .02em; }.badge.READY, .badge.done, .badge.active { background: #e7f7ef; color: var(--ok); }.badge.NEW, .badge.WARMING, .badge.running { background: #e8f2ff; color: var(--info); }.badge.PARSING, .badge.POSTING, .badge.REPLY { background: var(--accent-soft); color: var(--accent-strong); }.badge.REST, .badge.OFF, .badge.unknown, .badge.archived { background: var(--chip); color: var(--muted); }.badge.FLOODWAIT, .badge.queued, .badge.paused, .badge.stopping, .badge.draft { background: #fff4dc; color: var(--warn); }.badge.BANNED, .badge.INVALID, .badge.failed, .badge.cancelled { background: #ffedf0; color: var(--err); }.health-pill { min-width: 34px; justify-content: center; padding: 3px 9px; font-size: 12px; }.health-pill.ok { background: #e7f7ef; color: var(--ok); }.health-pill.warn { background: #fff4dc; color: var(--warn); }.health-pill.err { background: #ffedf0; color: var(--err); }.state-pill { padding: 2px 6px; font-size: 9px; background: var(--chip); color: var(--muted); }.state-pill.ok { background: #e7f7ef; color: var(--ok); }.state-pill.warn { background: #fff4dc; color: var(--warn); }.state-pill.unknown { background: var(--chip); color: var(--muted); }.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--muted); }.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(24,135,91,.14); }.dot.off { background: var(--muted); }

/* Dashboard summary */
.dashboard-summary { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; align-items: center; gap: var(--space-5); margin-bottom: var(--space-4); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-panel); background: linear-gradient(110deg, var(--surface) 0%, var(--surface-subtle) 100%); box-shadow: var(--shadow-subtle); }.summary-copy { display: grid; gap: 2px; }.summary-copy strong { color: var(--text); font-size: 15px; }.summary-copy span { color: var(--muted); font-size: 13px; }.summary-attention { display: flex; gap: var(--space-4); }.attention-item { display: grid; gap: 1px; min-width: 60px; }.attention-item span { color: var(--muted); font-size: 11px; }.attention-item b { color: var(--text); font-size: 18px; }.attention-item.warn b { color: var(--warn); }.attention-item.err b { color: var(--err); }

/* Shared component states */
.ui-icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; }.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: currentColor; }.badge-ready .status-dot, .badge-healthy .status-dot, .badge-completed .status-dot, .badge-active .status-dot { background: var(--ok); }.badge-warning .status-dot, .badge-attention .status-dot, .badge-pending .status-dot, .badge-queued .status-dot { background: var(--warn); }.badge-error .status-dot, .badge-invalid .status-dot, .badge-cancelled .status-dot { background: var(--err); }.badge-running .status-dot, .badge-processing .status-dot { background: var(--accent); }.badge-offline .status-dot, .badge-unknown .status-dot { background: var(--muted); }
.ui-empty { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-11) var(--space-5); border: 1px dashed var(--border-strong); border-radius: var(--radius-card); background: var(--surface); text-align: center; }.ui-empty-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-subtle); color: var(--muted); }.ui-empty h2, .ui-error h2 { margin: 0; font-size: 16px; }.ui-empty p, .ui-error p { max-width: 460px; margin: 0; color: var(--muted); }.ui-empty-action, .ui-error-action { margin-top: var(--space-2); }.ui-loading { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 120px; color: var(--muted); }.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 700ms linear infinite; }.skeleton-list { display: grid; gap: var(--space-3); padding: var(--space-4) 0; }.skeleton-line { display: block; width: 100%; height: 14px; border-radius: 5px; background: linear-gradient(90deg, var(--surface-subtle), var(--border), var(--surface-subtle)); background-size: 200% 100%; animation: shimmer 1.2s ease infinite; }.skeleton-line:nth-child(2) { width: 82%; }.skeleton-line:nth-child(3) { width: 94%; }.skeleton-line:nth-child(4) { width: 66%; }.ui-error { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); border: 1px solid #efadb5; border-radius: var(--radius-card); background: #fff4f5; color: var(--err); }.ui-error p { color: var(--text-secondary); }.ui-error-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #ffdde2; font-weight: 700; }.notice { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-subtle); }.notice > div { display: grid; gap: 1px; }.notice-mark { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }.notice-success { border-color: #9ddbbd; background: #f0fbf5; }.notice-success .notice-mark { background: #d9f3e5; color: var(--ok); }.notice-warning { border-color: #ebca88; background: #fffaf0; }.notice-warning .notice-mark { background: #fff0c9; color: var(--warn); }.notice-danger { border-color: #efadb5; background: #fff4f5; }.notice-danger .notice-mark { background: #ffdde2; color: var(--err); }.table-state { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 100px; padding: var(--space-5); color: var(--muted); }.ui-overlay { position: fixed; inset: 0; z-index: 250; display: flex; justify-content: center; align-items: center; padding: var(--space-5); background: rgba(16,29,52,.40); }.ui-modal, .ui-drawer { display: flex; flex-direction: column; max-height: min(760px, calc(100vh - 40px)); border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface); box-shadow: var(--shadow-floating); }.ui-modal { width: min(560px, 100%); }.ui-modal-head, .ui-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5); border-bottom: 1px solid var(--border); }.ui-modal-head h2, .ui-drawer-head h2 { margin: 0; font-size: 18px; }.ui-modal-body, .ui-drawer-body { overflow: auto; padding: var(--space-5); }.ui-modal-foot, .ui-drawer-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); }.ui-drawer-overlay { justify-content: flex-end; padding: 0; }.ui-drawer { width: min(520px, 100%); height: 100%; max-height: 100%; border-width: 0 0 0 1px; border-radius: var(--radius-panel) 0 0 var(--radius-panel); }.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }.filter-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; }.filter-chip button { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }.toast { display: flex; align-items: center; gap: var(--space-3); }.toast-message { flex: 1; }.toast-close { padding: 0 3px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }.toast-close:hover { color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } } @keyframes shimmer { to { background-position: -200% 0; } }

/* Existing specialized components */
.kv { display: grid; grid-template-columns: minmax(110px, 130px) 1fr; gap: 7px 14px; font-size: 13px; }.kv .k, .kv-grid .k { color: var(--muted); }.kv .v { font-weight: 500; overflow-wrap: anywhere; }.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; font-size: 13px; }.kv-grid .v { color: var(--text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }.tabs, .me-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-6) 0 var(--space-4); }.tab { min-height: 35px; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--muted); cursor: pointer; }.tab:hover, .tab.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }.tl-box { padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }.tl { position: relative; padding-left: 30px; }.tl::before { position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--border); content: ""; }.tl-item { position: relative; padding: 9px 0 9px 10px; }.tl-item::before { position: absolute; left: -25px; top: 15px; width: 10px; height: 10px; border: 2px solid var(--muted); border-radius: 50%; background: var(--surface); content: ""; }.tl-item.sev-2::before, .tl-item.sev-3::before { border-color: var(--err); background: var(--err); }.tl-item.sev-1::before { border-color: var(--warn); background: var(--warn); }.tl-item.sev-0::before { border-color: var(--accent); }.detail-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-5); margin-bottom: var(--space-4); padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }.detail-head .k { color: var(--muted); font-size: 12px; }.detail-head .v { color: var(--text); font-size: 15px; font-weight: 650; }.search-results { display: grid; gap: var(--space-6); }.big-num { color: var(--accent); font-size: 32px; font-weight: 750; line-height: 1.1; }.system-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 650; }.system-status.ok { border-color: #9ddbbd; color: var(--ok); }.system-status.warn { border-color: #ebca88; color: var(--warn); }.system-status.err { border-color: #efadb5; color: var(--err); }.system-status .dot { flex-shrink: 0; }

.workers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: var(--space-4); }.worker-card { padding: var(--space-5); border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-subtle); }.worker-card.state-busy { border-left-color: var(--accent); }.worker-card.state-idle { border-left-color: var(--ok); }.worker-card.state-cooldown { border-left-color: var(--warn); }.worker-card.state-dead { border-left-color: var(--err); opacity: .86; }.w-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }.w-name { font-size: 15px; font-weight: 700; }.w-state { padding: 4px 9px; font-size: 11px; }.w-state.busy { background: var(--accent-soft); color: var(--accent-strong); }.w-state.idle { background: #e7f7ef; color: var(--ok); }.w-state.cooldown { background: #fff4dc; color: var(--warn); }.w-state.dead { background: #ffedf0; color: var(--err); }.w-body { display: grid; gap: 7px; }.w-row { display: flex; gap: 10px; font-size: 12.5px; }.w-row .k { min-width: 118px; color: var(--muted); }.w-row .v { font-weight: 500; overflow-wrap: anywhere; }.w-cooldown { margin-top: var(--space-3); padding: 8px 10px; border-radius: var(--radius-control); background: #fff8e9; font-size: 12px; }.w-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.acc-card-item { margin-bottom: var(--space-2); border-radius: var(--radius-card); cursor: pointer; }.acc-card-inner { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); transition: border-color var(--transition), background var(--transition); }.acc-card-item:hover .acc-card-inner { border-color: #a9c3ff; background: var(--accent-soft); }.acc-card-icon { width: 30px; font-size: 20px; text-align: center; }.acc-card-body { flex: 1; min-width: 0; }.acc-card-name { font-size: 14px; font-weight: 650; }.acc-card-username { font-size: 12px; }.acc-card-status { margin-top: 4px; }.acc-card-meta { display: flex; align-items: center; gap: var(--space-2); color: var(--muted); font-size: 12px; white-space: nowrap; }.acc-card-arrow { color: var(--muted); font-size: 17px; }
.nav-card { display: block; color: inherit; transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition); }.nav-card:hover { border-color: #a9c3ff; box-shadow: var(--shadow-card); transform: translateY(-2px); }.proxy-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }.proxy-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }.proxy-id { font-size: 15px; font-weight: 700; }.proxy-status { font-size: 16px; }.proxy-accounts { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }.proxy-account { display: flex; align-items: center; gap: var(--space-2); padding: 6px 8px; border-radius: var(--radius-control); background: var(--surface-subtle); color: var(--text-secondary); }.proxy-account:hover { background: var(--accent-soft); }
.live-controls { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }.live-stream { max-height: 70vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }.live-row { display: flex; align-items: baseline; gap: var(--space-3); padding: 9px var(--space-4); border-bottom: 1px solid var(--border); font-size: 12px; }.live-row .lt { min-width: 56px; color: var(--muted); white-space: nowrap; }.live-row .ltype { min-width: 100px; color: var(--text); font-weight: 650; }.live-row .lpayload { flex: 1; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }.live-row .lacc { color: var(--muted); white-space: nowrap; }.live-row.sev-2, .live-row.sev-3 { background: #fff4f5; }.live-row.sev-1 { background: #fffaf0; }

/* AI/CRM compatibility */
.ai-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-3); }.ai-form label { display: flex; flex-direction: column; gap: var(--space-1); color: var(--muted); font-size: 12px; }.ai-estimate { margin-top: var(--space-3); font-size: 13px; }.job-card { margin-bottom: var(--space-3); }.job-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }.job-metrics { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }.method-layout .step-btn { display: block; width: 100%; margin-bottom: var(--space-2); text-align: left; }.editor-label { display: block; margin: var(--space-4) 0; color: var(--muted); font-size: 12px; }.editor-label textarea, .json-output { display: block; width: 100%; margin-top: var(--space-1); padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-subtle); color: var(--text); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }.json-output { min-height: 80px; max-height: 520px; overflow: auto; white-space: pre-wrap; }.acq-toggle { display: flex; align-items: flex-start; gap: var(--space-2); margin: var(--space-3) 0; color: var(--text); cursor: pointer; }.acq-toggle input { margin-top: 4px; accent-color: var(--accent); }.acq-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-2) 0; }.acq-row > span:first-child { flex: 1; min-width: 180px; font-size: 13px; }.acq-tri { display: inline-flex; gap: var(--space-1); }.media-card, .rec-row { margin: var(--space-2) 0; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-subtle); }.media-card summary { cursor: pointer; }.crm-grid2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }.crm-table th { position: static; }.crm-table td.ok { color: var(--ok); font-weight: 650; }.crm-table td.err { color: var(--err); font-weight: 650; }.crm-balance .big { font-size: 2.2em; font-weight: 700; }.mini-bars { display: block; width: 100%; height: auto; max-height: 90px; }.small { color: var(--muted); font-size: 11px; }.funnel-row { display: flex; align-items: center; gap: var(--space-3); padding: 7px 0; font-size: 13px; }.funnel-label { width: 130px; flex-shrink: 0; }.funnel-bar { flex: 1; height: 10px; overflow: hidden; border-radius: 99px; background: var(--chip); }.funnel-fill { height: 100%; border-radius: 99px; background: var(--accent); opacity: .8; transition: width 400ms ease; }.funnel-val { width: 48px; text-align: right; font-variant-numeric: tabular-nums; }.rec-problem { font-weight: 650; }.rec-detail { margin-top: 2px; color: var(--text); font-size: 13px; }.rec-conf { margin-top: 4px; color: var(--muted); font-size: 11px; font-style: italic; }
.aiop-chat { display: flex; flex-direction: column; gap: var(--space-2); }.aiop-log { max-height: 340px; overflow-y: auto; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-subtle); font-size: 13px; line-height: 1.5; }.aiop-line { margin-bottom: 4px; white-space: pre-wrap; word-break: break-word; }.aiop-line.user { color: var(--accent-strong); }.aiop-line.ai { color: var(--text); }.aiop-line.code { color: var(--muted); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }.aiop-line.err { color: var(--err); }.aiop-input { display: flex; gap: var(--space-2); }.aiop-input input { flex: 1; }.btn.mini { min-height: 29px; padding: 3px 8px; font-size: 12px; }.btn.ghost { background: transparent; }.tbl td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }.tbl td.small { font-size: 12px; }
.toasts { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 200; display: flex; flex-direction: column; gap: var(--space-2); pointer-events: none; }.toast { max-width: 380px; padding: 11px 14px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-control); background: var(--surface); box-shadow: var(--shadow-floating); font-size: 13px; pointer-events: auto; }.toast.warn { border-left-color: var(--warn); }.toast.error { border-left-color: var(--err); }.toast.ok { border-left-color: var(--ok); }.toast.out { opacity: 0; transition: opacity 300ms ease; }

/* Dense pages retain their data, but recompose at smaller sizes. */
@media (min-width: 901px) {
  .sidebar.is-collapsed { width: var(--sidebar-collapsed-w); }.sidebar.is-collapsed + .sidebar-backdrop + .main, .sidebar.is-collapsed ~ .main { margin-left: var(--sidebar-collapsed-w); }.sidebar.is-collapsed .brand-text, .sidebar.is-collapsed .nav-group-title, .sidebar.is-collapsed .nav-link > span:last-child, .sidebar.is-collapsed .workspace-switcher > span:last-child, .sidebar.is-collapsed .side-status, .sidebar.is-collapsed .logout-btn { display: none; }.sidebar.is-collapsed .sidebar-head { justify-content: center; padding: 0 8px; }.sidebar.is-collapsed .sidebar-collapse { margin-left: 0; }.sidebar.is-collapsed .nav-link { justify-content: center; }.sidebar.is-collapsed .nav-link.active::before { display: none; }.sidebar.is-collapsed .sidebar-foot { justify-items: center; }.sidebar.is-collapsed .workspace-switcher { padding: 8px 0; }
}
@media (max-width: 1100px) {
  .topbar { padding-inline: var(--space-5); }.topbar-context { min-width: 120px; }.search { min-width: 180px; }.container { padding-inline: var(--space-5); }.widgets { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 900px) {
  .page-header { grid-template-columns: 1fr; align-items: start; }.page-actions { justify-content: flex-start; }.dashboard-primary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }.dashboard-two-column { grid-template-columns: 1fr; }.dashboard-skeleton-grid { grid-template-columns: 1fr; }.sidebar { transform: translateX(-100%); width: min(var(--sidebar-w), calc(100vw - 48px)); box-shadow: var(--shadow-floating); }.sidebar.open { transform: translateX(0); }.sidebar-backdrop { position: fixed; inset: 0; z-index: 90; display: block; border: 0; background: rgba(16,29,52,.36); opacity: 0; pointer-events: none; transition: opacity var(--transition); }.sidebar.open ~ .sidebar-backdrop { opacity: 1; pointer-events: auto; }.main { margin-left: 0; }.burger { display: inline-flex; }.topbar-context { display: none; }.topbar { flex-wrap: wrap; padding: 10px var(--space-4); }.topbar .search { order: 3; flex-basis: 100%; max-width: none; min-width: 0; }.container { padding: var(--space-6) var(--space-4) var(--space-10); }.stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }  .workers-grid, .crm-grid2 { grid-template-columns: 1fr; }.dashboard-summary { grid-template-columns: 1fr; gap: var(--space-4); }.summary-attention { justify-content: space-between; }
}
@media (max-width: 640px) {
  .dashboard-health-section, .dashboard-panel { padding: var(--space-4); }.dashboard-health-head, .dashboard-panel-head { gap: var(--space-3); }.dashboard-health-head { align-items: flex-start; flex-direction: column; }.dashboard-primary-section { padding-inline: 0; }.dashboard-primary-metrics { grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-top: var(--space-3); }.dashboard-metric { padding: var(--space-3); }.dashboard-metric strong { font-size: 20px; }.dashboard-rate-grid { grid-template-columns: 1fr 1fr; }.attention-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: var(--space-2); }.attention-row .btn { grid-column: 2 / -1; justify-self: start; }.attention-copy span { white-space: normal; }.dashboard-secondary-list > div { align-items: flex-start; flex-direction: column; gap: 2px; }.dashboard-secondary-list strong { text-align: left; }.ui-overlay { align-items: flex-end; padding: 0; }.ui-modal { width: 100%; max-height: 92vh; border-radius: var(--radius-panel) var(--radius-panel) 0 0; }.ui-drawer { width: 100%; border-width: 0; border-radius: var(--radius-panel) var(--radius-panel) 0 0; }.ui-modal-head, .ui-drawer-head { padding: var(--space-4); }.ui-modal-body, .ui-drawer-body { padding: var(--space-4); }.ui-modal-foot, .ui-drawer-foot { padding: var(--space-3) var(--space-4); }.ui-modal-foot .btn, .ui-drawer-foot .btn { flex: 1; }.topbar-right { gap: 2px; }.topbar { gap: var(--space-2); }.dashboard-summary { padding: var(--space-4); }.summary-attention { gap: var(--space-2); }.attention-item { flex: 1; }.topbar .search input { min-height: 42px; }.search-shortcut { display: none; }.page-head { align-items: flex-start; }.page-head h1 { font-size: 25px; }.stats-grid { gap: var(--space-2); }.stat-card { padding: var(--space-3); }.stat-card .value { font-size: 21px; }.widgets, .cards { grid-template-columns: 1fr; }.widget, .card, .panel-note { padding: var(--space-4); }.kv, .kv-grid { grid-template-columns: 1fr; }.kv-grid .v { text-align: left; }.toolbar { align-items: stretch; }.toolbar > input, .toolbar > select, .toolbar > .search, .toolbar > .btn { width: 100%; max-width: none; }.acc-card-inner { align-items: flex-start; gap: var(--space-3); padding: var(--space-3); }.acc-card-meta { display: none; }.workers-grid { grid-template-columns: 1fr; }.worker-card { padding: var(--space-4); }.w-row { align-items: flex-start; flex-direction: column; gap: 1px; }.w-row .k { min-width: 0; }.table-wrap table, .crm-table table { min-width: 680px; }.live-row { display: grid; grid-template-columns: auto 1fr; gap: 3px var(--space-2); }.live-row .lpayload { grid-column: 1 / -1; white-space: normal; overflow-wrap: anywhere; }.live-row .lacc { grid-column: 2; }.funnel-label { width: 105px; }.aiop-input { flex-direction: column; }.aiop-input .btn { width: 100%; }.footer { padding-inline: var(--space-4); }
}
@media (max-width: 380px) {
  .dashboard-primary-metrics { grid-template-columns: 1fr; }.dashboard-rate-grid { grid-template-columns: 1fr; }.container { padding-inline: var(--space-3); }.topbar { padding-inline: var(--space-3); }.topbar-right .icon-btn { padding-inline: 7px; }.page-head h1 { font-size: 23px; }.stat-card .label { font-size: 11px; }.stat-card .value { font-size: 19px; }.table-wrap table, .crm-table table { min-width: 620px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .spinner, .skeleton-line { animation: none !important; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

/* Dashboard command center */
.dashboard-view { display: grid; gap: var(--space-5); }.dashboard-view .page-header { margin-bottom: 0; }.page-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-4); margin-bottom: var(--space-5); }.page-eyebrow, .section-kicker { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .10em; text-transform: uppercase; }.page-header-main h1 { margin: 4px 0 3px; color: var(--text); font-size: clamp(28px, 4vw, 36px); letter-spacing: -.045em; }.page-header-main p { margin: 0; color: var(--muted); font-size: 14px; }.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }.page-back { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }.dashboard-health-section, .dashboard-panel { min-width: 0; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface); box-shadow: var(--shadow-subtle); }.dashboard-health-section { background: linear-gradient(120deg, var(--surface) 0%, var(--surface-subtle) 100%); }.dashboard-health-head, .dashboard-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }.dashboard-health-head h2, .dashboard-panel-head h2 { margin: 4px 0 0; font-size: 18px; }.dashboard-health-reason { margin: var(--space-2) 0 0; color: var(--muted); font-size: 13px; }.dashboard-primary-section { padding: 0 var(--space-1); }.dashboard-primary-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }.dashboard-metric { position: relative; display: grid; gap: 3px; min-width: 0; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); color: var(--text); }.dashboard-metric:hover { border-color: #a9c3ff; background: var(--accent-soft); }.dashboard-metric-label { color: var(--muted); font-size: 12px; }.dashboard-metric strong { overflow-wrap: anywhere; color: var(--text); font-size: 24px; letter-spacing: -.025em; }.dashboard-metric-link { position: absolute; top: var(--space-3); right: var(--space-3); color: var(--muted); font-size: 13px; }.dashboard-metric:hover .dashboard-metric-link { color: var(--accent); }.dashboard-metric.secondary { box-shadow: none; }.dashboard-metric.secondary strong { font-size: 20px; }.dashboard-two-column { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: var(--space-4); }.dashboard-priority-grid { align-items: start; }.dashboard-lower-grid { align-items: start; }.attention-list, .operation-list, .dashboard-events { display: grid; gap: 2px; margin-top: var(--space-4); }.attention-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3); min-height: 54px; padding: 7px 0; border-bottom: 1px solid var(--border); }.attention-row:last-child { border-bottom: 0; }.attention-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff0c9; color: var(--warn); font-weight: 800; }.attention-error .attention-mark { background: #ffdde2; color: var(--err); }.attention-copy { display: grid; min-width: 0; }.attention-copy strong { color: var(--text); font-size: 13px; }.attention-copy span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.attention-value { min-width: 26px; color: var(--text); font-size: 17px; text-align: right; }.attention-error .attention-value { color: var(--err); }.attention-warning .attention-value { color: var(--warn); }.operation-row { display: flex; align-items: center; gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); }.operation-row:last-child { border-bottom: 0; }.operation-row > span:nth-child(2) { display: grid; flex: 1; }.operation-row strong { font-size: 13px; }.operation-row small { color: var(--muted); font-size: 12px; }.operation-state { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }.operation-state.automation { background: var(--ok); box-shadow: 0 0 0 4px #e7f7ef; }.operation-state.processing { background: var(--warn); box-shadow: 0 0 0 4px #fff4dc; }.operation-arrow { color: var(--muted); }.dashboard-event { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); width: 100%; padding: 9px 0; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; text-align: left; }.dashboard-event:last-child { border-bottom: 0; }.dashboard-event:hover { background: var(--surface-subtle); }.dashboard-event-main { display: grid; min-width: 0; }.dashboard-event-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.dashboard-event-main small, .dashboard-event time { color: var(--muted); font-size: 11px; }.event-severity { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; }.event-severity.sev-1 { background: #fff4dc; color: var(--warn); }.event-severity.sev-2, .event-severity.sev-3 { background: #ffedf0; color: var(--err); }.dashboard-rate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-4); }.dashboard-secondary-list { display: grid; gap: 0; margin-top: var(--space-4); border-top: 1px solid var(--border); }.dashboard-secondary-list > div { display: flex; justify-content: space-between; gap: var(--space-3); padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 12px; }.dashboard-secondary-list span { color: var(--muted); }.dashboard-secondary-list strong { color: var(--text-secondary); font-weight: 600; text-align: right; }.dashboard-actions-panel { padding-block: var(--space-4); }.dashboard-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }.dashboard-skeleton { display: grid; gap: var(--space-4); }.dashboard-skeleton .skeleton-title { width: 220px; height: 30px; }.dashboard-skeleton .skeleton-summary { height: 130px; }.dashboard-skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }.dashboard-skeleton-grid .skeleton-line { height: 130px; }.technical-details { margin-top: var(--space-5); border-top: 1px solid var(--border); padding-top: var(--space-4); }.technical-details summary { cursor: pointer; color: var(--accent); font-size: 13px; }.technical-details pre { max-height: 260px; overflow: auto; padding: var(--space-3); border-radius: var(--radius-control); background: var(--surface-subtle); color: var(--text-secondary); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

/* Compatibility for old status color selectors and inline page styles. */
.stat-card.err { border-color: #efadb5; background: #fff4f5; }.system-card { border-left: 3px solid var(--muted); }.system-card .system-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }.system-card .system-icon { font-size: 17px; }.system-card .system-name { font-weight: 650; font-size: 14px; }.crm-balance .kv-grid { margin-top: var(--space-3); }.funnel-fill { max-width: 100%; }.w-actions .stub, .stub { opacity: .72; }
