:root {
  color-scheme: dark;
  --bg: #080d18;
  --bg-soft: #0c1220;
  --sidebar: #090e19;
  --surface: #101827;
  --surface-raised: #141e30;
  --surface-input: #0b1321;
  --border: #202d41;
  --border-soft: #182539;
  --text: #f3f6fb;
  --text-soft: #b9c4d3;
  --muted: #74839a;
  --accent: #6b7cff;
  --accent-bright: #8a96ff;
  --cyan: #3ed6d0;
  --good: #4bd4a0;
  --warn: #f8bd61;
  --bad: #ff6c82;
  --shadow: 0 28px 90px rgba(0, 0, 0, .27);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 75% -15%, rgba(89, 77, 220, .12), transparent 34rem), var(--bg); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(107, 124, 255, .32); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .48; filter: saturate(.4); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column; padding: 24px 16px 18px; background: rgba(8, 13, 24, .95); border-right: 1px solid var(--border-soft); backdrop-filter: blur(20px); z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: white; font-size: 12px; font-weight: 850; letter-spacing: -.03em; background: linear-gradient(145deg, #7888ff, #4356de); box-shadow: 0 12px 28px rgba(84, 99, 226, .28), inset 0 1px rgba(255,255,255,.2); }
.brand > span:last-child { min-width: 0; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 2px; letter-spacing: .05em; text-transform: uppercase; }
.side-nav { display: grid; gap: 16px; margin-top: 30px; }
.nav-group { display: grid; gap: 4px; }
.nav-group-title { margin: 0 12px 3px; color: #4f5e74; font-size: 7px; font-weight: 820; letter-spacing: .13em; text-transform: uppercase; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; min-height: 38px; padding: 0 12px; color: #8e9db1; border-radius: 11px; font-size: 12px; font-weight: 620; transition: .18s ease; }
.nav-item:hover { color: #dfe5ef; background: rgba(255,255,255,.035); }
.nav-item.is-active { color: white; background: linear-gradient(90deg, rgba(105, 123, 255, .17), rgba(105, 123, 255, .06)); }
.nav-item.is-active::before { content: ""; position: absolute; left: -16px; width: 3px; height: 25px; border-radius: 0 3px 3px 0; background: var(--accent-bright); box-shadow: 0 0 20px rgba(128,142,255,.7); }
.nav-icon { width: 23px; color: #71809a; font-size: 17px; text-align: center; }
.nav-item.is-active .nav-icon { color: var(--accent-bright); }
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; }
.runtime-card { padding: 13px; border: 1px solid var(--border-soft); border-radius: 12px; background: rgba(19, 29, 45, .56); }
.runtime-line { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.runtime-line strong { font-size: 11px; }
.runtime-card > small { display: block; color: var(--muted); font-size: 9px; margin-top: 8px; }
.pulse-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(75,212,160,.1); }
.pulse-dot.is-busy { background: var(--warn); box-shadow: 0 0 0 4px rgba(248,189,97,.11); animation: pulse 1.25s infinite; }
@keyframes pulse { 50% { opacity: .38; transform: scale(.88); } }
.user-button { width: 100%; border: 0; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 11px; color: var(--text-soft); background: transparent; cursor: pointer; text-align: left; transition: background .16s; }
.user-button:hover { background: rgba(255,255,255,.035); }
.user-button > span:last-child { color: var(--muted); }
.user-button strong, .user-button small { display: block; }
.user-button strong { font-size: 11px; }.user-button small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #1a2740; color: #b9c5ff; font-size: 12px; font-weight: 800; }

.main-area { grid-column: 2; width: min(1480px, 100%); padding: 42px clamp(28px, 4vw, 64px) 78px; }
.mobile-header, .mobile-nav { display: none; }
.page-head { min-height: 90px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.page-head h1 { margin: 7px 0 7px; font-size: clamp(30px, 3.5vw, 44px); line-height: 1; letter-spacing: -.045em; }
.page-head > div > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.kicker { margin: 0; color: var(--accent-bright); font-size: 9px; line-height: 1.2; font-weight: 850; letter-spacing: .16em; }
.button { min-height: 40px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 0 15px; border-radius: 10px; color: var(--text); background: transparent; font-size: 12px; font-weight: 760; cursor: pointer; transition: transform .16s, border-color .16s, background .16s, filter .16s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { min-width: 156px; background: linear-gradient(135deg, #7585ff, #5266e7); box-shadow: 0 13px 32px rgba(66, 84, 217, .22); }
.button-primary:hover:not(:disabled) { filter: brightness(1.08); }
.button-secondary { color: #ced6e3; border-color: #30405a; background: #172236; }
.button-secondary:hover:not(:disabled) { border-color: #485c7d; background: #1a2940; }
.button-ghost { color: var(--text-soft); border-color: var(--border); background: rgba(255,255,255,.015); }
.button-small { min-height: 32px; padding: 0 11px; font-size: 10px; border-radius: 8px; }
.button-large { min-height: 50px; padding: 0 18px; }
.text-link { color: #9aa8bd; font-size: 11px; font-weight: 700; }.text-link span { color: var(--accent-bright); margin-left: 5px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric-card { min-height: 150px; padding: 19px; border: 1px solid var(--border-soft); border-radius: 15px; background: linear-gradient(145deg, rgba(17, 26, 42, .96), rgba(13, 21, 35, .96)); box-shadow: 0 16px 50px rgba(0,0,0,.12); }
.metric-card.metric-accent { border-color: rgba(107, 124, 255, .32); background: radial-gradient(circle at 100% 0, rgba(105,123,255,.19), transparent 65%), linear-gradient(145deg, #151e35, #101728); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #8795aa; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.metric-icon { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #2b3a51; border-radius: 9px; color: #9aa9d9; background: #111c2f; font-size: 13px; }
.metric-card > strong { display: block; margin: 17px 0 14px; font-size: 32px; line-height: .9; letter-spacing: -.04em; }
.metric-card > strong small { margin-left: 7px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 0; }
.metric-card > strong.metric-word { font-size: 24px; line-height: 1.15; }
.metric-card > p { margin: 0; color: #8290a5; font-size: 10px; }
.mini-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--muted); vertical-align: 1px; }.mini-dot.good { background: var(--good); }.mini-dot.bad { background: var(--bad); }.mini-dot.warn { background: var(--warn); }.mini-dot.accent { background: var(--accent-bright); }.mini-dot.neutral { background: #56657c; }
.text-bad { color: #ff8798 !important; }

.panel { border: 1px solid var(--border-soft); border-radius: var(--radius); background: linear-gradient(145deg, rgba(16, 24, 39, .98), rgba(12, 19, 32, .98)); box-shadow: var(--shadow); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 16px; margin-top: 16px; }
.activity-panel, .quick-panel, .history-panel { padding: 23px; }
.panel-head { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.panel-head h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.025em; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid var(--border-soft); }
.activity-row:first-child { border-top: 0; }
.activity-symbol { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #8190a7; background: #172235; font-size: 11px; font-weight: 850; }
.activity-symbol[data-status="succeeded"] { color: var(--good); background: rgba(75,212,160,.1); }.activity-symbol[data-status="failed"] { color: var(--bad); background: rgba(255,108,130,.1); }.activity-symbol[data-status="running"] { color: var(--warn); background: rgba(248,189,97,.1); }
.activity-main { min-width: 0; }
.activity-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.activity-title > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.activity-main > p { margin: 5px 0; overflow: hidden; color: #8997aa; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.activity-meta { display: flex; align-items: center; gap: 5px; color: #5e6d82; font-size: 9px; }
.status-badge { width: max-content; display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid #2a394f; border-radius: 999px; color: #9ba9bb; background: rgba(15,24,38,.72); font-size: 8px; line-height: 1; font-weight: 760; white-space: nowrap; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge[data-status="active"], .status-badge[data-status="healthy"], .status-badge[data-status="connected"], .status-badge[data-status="succeeded"], .status-badge[data-status="valid"] { color: var(--good); border-color: rgba(75,212,160,.22); background: rgba(75,212,160,.07); }
.status-badge[data-status="banned"], .status-badge[data-status="dead"], .status-badge[data-status="tls_error"], .status-badge[data-status="error"], .status-badge[data-status="failed"], .status-badge[data-status="closed"], .status-badge[data-status="unavailable"] { color: var(--bad); border-color: rgba(255,108,130,.22); background: rgba(255,108,130,.07); }
.status-badge[data-status="challenge"], .status-badge[data-status="session_expired"], .status-badge[data-status="running"] { color: var(--warn); border-color: rgba(248,189,97,.22); background: rgba(248,189,97,.07); }
.status-badge[data-status="queued"] { color: var(--accent-bright); border-color: rgba(107,124,255,.25); background: rgba(107,124,255,.08); }
.status-badge[data-status="complete"] { color: var(--good); border-color: rgba(75,212,160,.22); background: rgba(75,212,160,.07); }
.status-badge[data-status="limited"] { color: var(--warn); border-color: rgba(248,189,97,.22); background: rgba(248,189,97,.07); }
.icon-button { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; display: grid; place-items: center; color: #8391a6; background: #121c2c; cursor: pointer; transition: .16s; }
.icon-button:hover { color: white; border-color: #3b4d69; background: #19263b; }
.readiness-list { list-style: none; padding: 0; margin: 0; display: grid; }
.readiness-list li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border-top: 1px solid var(--border-soft); }
.readiness-list li:first-child { border-top: 0; }
.readiness-list li > span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #2a394f; border-radius: 50%; color: #8695aa; font-size: 9px; font-weight: 800; }
.readiness-list li.is-ready > span { color: var(--good); border-color: rgba(75,212,160,.25); background: rgba(75,212,160,.07); }
.readiness-list strong, .readiness-list p { display: block; margin: 0; }.readiness-list strong { font-size: 11px; }.readiness-list p { color: var(--muted); font-size: 9px; margin-top: 3px; }
.readiness-list a { color: #96a5ba; font-size: 9px; font-weight: 700; }.readiness-list a:hover { color: white; }
.safe-note { display: flex; gap: 11px; margin-top: 16px; padding: 13px; border: 1px solid rgba(80,98,145,.23); border-radius: 11px; color: #96a5ba; background: rgba(86,101,177,.06); }
.safe-note > span { color: var(--accent-bright); }.safe-note p { margin: 0; font-size: 9px; line-height: 1.5; }.safe-note strong { display: block; margin-bottom: 2px; color: #cbd3df; font-size: 10px; }

.compact-metrics { min-height: 74px; display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; padding: 0 8px; border: 1px solid var(--border-soft); border-radius: 14px; background: rgba(14,22,36,.8); }
.compact-metrics-five { grid-template-columns: repeat(5, 1fr); }
.compact-metrics > div { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border-left: 1px solid var(--border-soft); color: #8190a4; font-size: 10px; }
.compact-metrics > div:first-child { border-left: 0; }.compact-metrics strong { color: var(--text); font-size: 19px; margin-left: auto; letter-spacing: -.03em; }
.data-panel { overflow: hidden; box-shadow: 0 18px 60px rgba(0,0,0,.17); }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; border-bottom: 1px solid var(--border-soft); }
.search-box { width: min(330px, 100%); height: 36px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; color: #617087; background: var(--surface-input); }
.search-box input { min-width: 0; flex: 1; border: 0; padding: 0; color: var(--text); background: transparent; outline: 0; font-size: 10px; }
.search-box input::placeholder { color: #5f6c80; }
.filter-pills { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border-soft); border-radius: 9px; background: #0b1320; }
.filter-pills button, .filter-pills a { min-height: 27px; border: 0; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 6px; color: #6f7e93; background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; }
.filter-pills button.is-active, .filter-pills a.is-active { color: #dfe5ef; background: #1a273a; box-shadow: inset 0 0 0 1px #26364d; }
.responsive-table { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 39px; padding: 0 15px; color: #637188; background: rgba(9,16,27,.55); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { min-height: 63px; padding: 13px 15px; border-top: 1px solid var(--border-soft); color: #b4bfce; font-size: 10px; vertical-align: middle; }
tbody tr { transition: background .14s, opacity .14s; } tbody tr:hover { background: rgba(113,129,255,.025); } tbody tr.is-disabled { opacity: .42; }
.identity-cell { min-width: 150px; display: flex; align-items: center; gap: 10px; }
.identity-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: #c8ceff; background: linear-gradient(145deg,#283658,#1b2941); font-size: 10px; font-weight: 850; }
.identity-cell strong, .identity-cell small, .proxy-address strong, .proxy-address small, .date-cell strong, .date-cell small { display: block; }
.identity-cell strong, .proxy-address strong, .date-cell strong { color: #dfe5ee; font-size: 10px; }.identity-cell small, .proxy-address small, .date-cell small { color: #647287; font-size: 8px; margin-top: 3px; }
.status-stack { min-width: 165px; display: grid; gap: 5px; }.status-stack > small { max-width: 210px; color: #66758a; font-size: 8px; line-height: 1.35; }
.session-state { display: flex; align-items: center; gap: 6px; color: #6b798d; white-space: nowrap; }.session-state > span { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: #182337; font-size: 8px; }.session-state.has-session { color: #9eafc2; }.session-state.has-session > span { color: var(--good); background: rgba(75,212,160,.08); }
.row-actions { width: 1%; white-space: nowrap; }.row-actions, .row-actions form { align-items: center; }.row-actions { display: flex; gap: 6px; }.row-actions form { display: inline-flex; }
.table-foot { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 19px; border-top: 1px solid var(--border-soft); color: #5f6d81; font-size: 8px; }
.pagination { display: flex; align-items: center; gap: 10px; }.pagination a { color: #9aa8bd; font-weight: 700; }.pagination a:hover { color: white; }.pagination > span { opacity: .35; }.pagination strong { min-width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #30405a; border-radius: 7px; color: #dbe2ec; background: #172236; font-size: 8px; }
.id-code { color: #92a0b6; font-size: 9px; }.protocol-badge { padding: 4px 6px; border: 1px solid #2b3a50; border-radius: 6px; color: #8090aa; background: #111b2b; font-size: 8px; font-weight: 780; }.latency { color: #97a6b9; font: 9px ui-monospace, monospace; }

.head-state { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 11px; background: rgba(17,27,43,.72); }
.head-state strong, .head-state small { display: block; }.head-state strong { font-size: 10px; }.head-state small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.operation-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(275px, .65fr); gap: 16px; align-items: start; }
.operation-builder, .run-guide { padding: 23px; }
.step-pill { padding: 6px 9px; border: 1px solid rgba(107,124,255,.23); border-radius: 999px; color: #9eabff; background: rgba(107,124,255,.07); font-size: 8px; font-weight: 800; }
.builder-form { display: grid; }
.builder-step { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 13px; padding: 18px 0; border-top: 1px solid var(--border-soft); }
.builder-step:first-child { border-top: 0; padding-top: 0; }
.step-number { padding-top: 3px; color: #687796; font: 800 9px ui-monospace, monospace; }
.step-content { display: grid; gap: 13px; }
.step-title strong, .step-title small { display: block; }.step-title strong { font-size: 11px; }.step-title small { margin-top: 4px; color: #69778c; font-size: 8px; line-height: 1.4; }
.step-title code { color: #a9b4ff; }
.form-stack { display: grid; gap: 14px; }
.form-grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field { display: grid; gap: 7px; color: #aeb9c8; font-size: 9px; font-weight: 700; }
.field > span { display: flex; justify-content: space-between; }.field > span small { color: var(--muted); font-size: 8px; font-weight: 500; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 10px 11px; outline: 0; color: #e3e8f0; background: var(--surface-input); font-size: 10px; transition: border .16s, box-shadow .16s; }
.field input, .field select { min-height: 38px; }.field textarea { resize: vertical; min-height: 82px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #5869de; box-shadow: 0 0 0 3px rgba(88,105,222,.1); }
.field input::placeholder, .field textarea::placeholder { color: #4f5d71; }.field select { appearance: none; background-image: linear-gradient(45deg,transparent 50%,#68768a 50%),linear-gradient(135deg,#68768a 50%,transparent 50%); background-position: calc(100% - 14px) 16px,calc(100% - 10px) 16px; background-size: 4px 4px,4px 4px; background-repeat: no-repeat; }
.switch-line { display: grid; grid-template-columns: 0 31px 1fr; align-items: center; gap: 9px; cursor: pointer; }.switch-line input { width: 0; height: 0; opacity: 0; }.switch-ui { width: 31px; height: 18px; position: relative; border-radius: 999px; background: #263247; transition: .18s; }.switch-ui::after { content: ""; position: absolute; width: 12px; height: 12px; top: 3px; left: 3px; border-radius: 50%; background: #a7b1c0; transition: .18s; }.switch-line input:checked + .switch-ui { background: var(--accent); }.switch-line input:checked + .switch-ui::after { transform: translateX(13px); background: white; }.switch-line input:disabled + .switch-ui { opacity: .35; }.switch-line strong, .switch-line small { display: block; }.switch-line strong { color: #aeb9c8; font-size: 9px; }.switch-line small { margin-top: 2px; color: #657388; font-size: 8px; }
.button-run { min-height: 48px; justify-content: space-between; margin-top: 7px; padding-inline: 18px; }
.guide-list { display: grid; }.guide-list > div { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 15px 0; border-top: 1px solid var(--border-soft); }.guide-list > div:first-child { border-top: 0; padding-top: 0; }.guide-list > div > span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #2b3b53; border-radius: 8px; color: #8897af; background: #131e30; font-size: 8px; font-weight: 800; }.guide-list p { margin: 0; color: #718096; font-size: 9px; line-height: 1.5; }.guide-list strong { display: block; margin-bottom: 2px; color: #cbd3df; font-size: 10px; }
.history-panel { margin-top: 16px; }.activity-list-roomy .activity-row { padding: 16px 0; }

.group-search-grid { margin-bottom: 16px; }
.search-history-card { display: block; }
.search-history-card .activity-row { grid-template-columns: 30px minmax(0,1fr) auto; gap: 9px; }
.search-history-card .activity-meta span:first-child { display: none; }
.group-results-panel { overflow: hidden; }
.table-title { margin: 5px 0 0; font-size: 18px; letter-spacing: -.025em; }
.result-run-state { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; }
.metric-compact-word { max-width: 150px; overflow: hidden; font-size: 13px !important; text-overflow: ellipsis; white-space: nowrap; }
.group-subtitle { color: #8e9db1; font-size: 9px; }
.group-table .identity-cell { min-width: 240px; }
.group-filter-toolbar { padding-block: 12px; background: rgba(9,16,27,.2); }
.verified-mark { display: inline-grid; width: 14px; height: 14px; margin-left: 5px; place-items: center; border-radius: 50%; color: #d7dcff; background: var(--accent); font-size: 8px; vertical-align: 1px; }

.audience-builder-grid { margin-bottom: 16px; }
.audience-groups-card { max-height: 720px; overflow: auto; }
.audience-group-list { display: grid; }
.audience-group-list > div { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.audience-group-list > div:first-child { border-top: 0; padding-top: 0; }
.audience-group-list strong, .audience-group-list small { display: block; }
.audience-group-list strong { max-width: 185px; overflow: hidden; color: #cfd6e2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.audience-group-list small { margin-top: 3px; color: #657388; font-size: 8px; }
.audience-group-result { flex: 0 0 auto; display: grid; justify-items: end; gap: 3px; }
.audience-results-panel { overflow: hidden; }
.audience-filter-toolbar { padding-block: 12px; background: rgba(9,16,27,.2); }
.audience-filter-actions { display: flex; align-items: end; gap: 7px; }
.compact-select { display: grid; gap: 4px; color: #637188; font-size: 8px; font-weight: 700; }
.compact-select select { min-width: 230px; height: 33px; padding: 0 31px 0 10px; border: 1px solid var(--border); border-radius: 8px; color: #aeb9c8; background: var(--surface-input); outline: 0; font-size: 9px; }
.audience-table .identity-cell { min-width: 220px; }
.profile-link { max-width: 250px; display: inline-block; overflow: hidden; color: #9aa8ff; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.profile-link:hover { color: #c7ceff; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.settings-card { min-height: 260px; display: grid; grid-template-columns: 42px 1fr; gap: 15px; padding: 22px; }
.settings-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #2b3a50; border-radius: 11px; color: #a0aec2; background: #142034; }.accent-icon { color: #aab3ff; border-color: rgba(107,124,255,.3); background: rgba(107,124,255,.1); }.small-icon { width: 31px; height: 31px; }
.settings-body { min-width: 0; }.settings-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.settings-title h2 { margin: 4px 0 0; font-size: 17px; }.settings-body > p { margin: 14px 0; color: #748298; font-size: 9px; line-height: 1.6; }
.balance-box { margin: 17px 0 12px; padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: #0c1422; }.balance-box span,.balance-box strong,.balance-box small { display: block; }.balance-box span { color: #718097; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }.balance-box strong { margin: 8px 0 5px; font-size: 25px; letter-spacing: -.04em; }.balance-box small { color: #59687c; font-size: 8px; }
.details-list { margin: 16px 0 0; }.details-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-top: 1px solid var(--border-soft); font-size: 9px; }.details-list dt { color: #68768a; }.details-list dd { margin: 0; color: #acb7c6; text-align: right; }
.config-note { margin-top: 15px; padding: 18px 22px; box-shadow: none; }.config-note > div { display: flex; gap: 13px; align-items: flex-start; }.config-note h3 { margin: 2px 0 5px; font-size: 11px; }.config-note p { margin: 0; color: #718096; font-size: 9px; line-height: 1.55; }

.dialog { width: min(580px, calc(100% - 28px)); max-height: min(90vh, 820px); padding: 0; border: 0; border-radius: 20px; color: var(--text); background: transparent; overflow: visible; }
.dialog::backdrop { background: rgba(3,7,14,.78); backdrop-filter: blur(7px); }
.dialog[open] { animation: dialog-in .16s ease-out; } @keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.dialog-card { position: relative; max-height: min(90vh, 820px); overflow: auto; padding: 24px; border: 1px solid #293850; border-radius: 20px; background: linear-gradient(145deg,#151f31,#0e1726); box-shadow: 0 35px 110px rgba(0,0,0,.55); }.dialog-wide { width: min(680px, calc(100vw - 30px)); }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }.dialog-head h2 { margin: 5px 0 5px; font-size: 21px; letter-spacing: -.03em; }.dialog-head p:last-child { margin: 0; color: var(--muted); font-size: 9px; }
.dialog-close { width: 31px; height: 31px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 9px; color: #8190a4; background: #111b2b; font-size: 18px; cursor: pointer; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--border-soft); border-radius: 10px; background: #0b1320; }.tabs button { min-height: 34px; border: 0; border-radius: 7px; color: #758399; background: transparent; font-size: 9px; font-weight: 750; cursor: pointer; }.tabs button.is-active { color: white; background: #1a273a; box-shadow: inset 0 0 0 1px #2a3a52; }
.tab-panel { display: none; }.tab-panel.is-active { display: grid; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.format-hints { display: flex; flex-wrap: wrap; gap: 6px; }.format-hints code { padding: 5px 7px; border: 1px solid #27364c; border-radius: 6px; color: #8190ac; background: #0d1625; font-size: 8px; }
.upload-zone { min-height: 112px; display: grid; place-items: center; align-content: center; gap: 4px; border: 1px dashed #354965; border-radius: 12px; color: #aeb9c8; background: rgba(11,20,34,.65); cursor: pointer; }.upload-zone:hover { border-color: #5a6cdc; background: rgba(89,106,220,.05); }.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }.upload-zone strong { font-size: 10px; }.upload-zone small { color: #647388; font-size: 8px; }.upload-icon { color: var(--accent-bright); font-size: 20px; }
.or-divider { position: relative; margin: 15px 0; text-align: center; color: #526176; font-size: 8px; }.or-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border-soft); }.or-divider span { position: relative; padding: 0 10px; background: #121c2c; }
.inline-alert { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid rgba(107,124,255,.22); border-radius: 9px; color: #9aa8bd; background: rgba(107,124,255,.06); font-size: 9px; line-height: 1.45; }.inline-alert > span { color: var(--accent-bright); font-weight: 850; }.inline-alert strong { display: block; color: #c3ccda; font-size: 9px; }.inline-alert p { margin: 2px 0 0; }.inline-alert[data-tone="bad"] { color: #ffb4bf; border-color: rgba(255,108,130,.28); background: rgba(255,108,130,.08); }.inline-alert[data-tone="bad"] > span { color: var(--bad); }
.job-summary-line { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding: 12px; border: 1px solid var(--border-soft); border-radius: 10px; }.job-summary-line p { margin: 0; color: #8a98ab; font-size: 9px; line-height: 1.45; }
.log-view { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }.log-head { min-height: 37px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: #9da9ba; background: #101a2a; font-size: 9px; }.log-head small { color: #5f6d81; font-size: 7px; }.log-view pre { max-height: 330px; overflow: auto; margin: 0; padding: 14px; color: #8fa0b7; background: #080f1b; font: 8px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.empty-state { min-height: 240px; display: grid; place-items: center; align-content: center; text-align: center; padding: 35px; }.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #2a3a51; border-radius: 13px; color: #8392aa; background: #121d2e; }.empty-state h3 { margin: 14px 0 5px; font-size: 13px; }.empty-state p { max-width: 360px; margin: 0 0 16px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.toast { position: fixed; top: 22px; right: 22px; z-index: 80; width: min(390px, calc(100% - 44px)); min-height: 50px; display: grid; grid-template-columns: 24px 1fr 22px; align-items: center; gap: 8px; padding: 10px 11px; border: 1px solid rgba(75,212,160,.26); border-radius: 12px; color: #c9d5df; background: rgba(15,27,40,.96); box-shadow: 0 18px 60px rgba(0,0,0,.4); backdrop-filter: blur(15px); animation: toast-in .2s ease-out; }.toast > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--good); background: rgba(75,212,160,.1); font-size: 9px; font-weight: 900; }.toast p { margin: 0; font-size: 9px; line-height: 1.4; }.toast button { border: 0; color: #718095; background: transparent; font-size: 16px; cursor: pointer; }.toast[data-tone="bad"] { border-color: rgba(255,108,130,.3); }.toast[data-tone="bad"] > span { color: var(--bad); background: rgba(255,108,130,.1); }.toast[data-tone="warn"] { border-color: rgba(248,189,97,.3); }.toast[data-tone="warn"] > span { color: var(--warn); background: rgba(248,189,97,.1); } @keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.login-page { overflow: hidden; background: #080d18; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px,5vw,70px); border-right: 1px solid var(--border-soft); background: radial-gradient(circle at 28% 50%, rgba(83,97,224,.24), transparent 24rem), linear-gradient(145deg,#0a1020,#0b1222); }
.brand-login { position: relative; z-index: 2; padding: 0; }.story-copy { position: relative; z-index: 2; max-width: 600px; }.story-copy h1 { margin: 16px 0 18px; font-size: clamp(42px,6vw,77px); line-height: .98; letter-spacing: -.06em; }.story-copy > p:last-child { max-width: 480px; margin: 0; color: #7d8ca3; font-size: 13px; line-height: 1.65; }.security-strip { position: relative; z-index: 2; display: flex; gap: 22px; color: #5d6c82; font-size: 8px; letter-spacing: .09em; }
.login-orbit { position: absolute; border: 1px solid rgba(122,135,255,.09); border-radius: 50%; }.orbit-one { width: 550px; height: 550px; left: -120px; top: calc(50% - 275px); }.orbit-two { width: 760px; height: 760px; left: -225px; top: calc(50% - 380px); }
.login-form-side { display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 100% 0, rgba(88,105,222,.08), transparent 28rem), #0a0f1a; }
.login-card { width: min(380px,100%); }.login-heading { margin-bottom: 28px; }.login-heading h2 { margin: 8px 0 7px; font-size: 30px; letter-spacing: -.045em; }.login-heading > p:last-child { margin: 0; color: var(--muted); font-size: 10px; }.mobile-login-mark { display: none; }.login-card .inline-alert { margin-bottom: 15px; }.login-note { margin: 18px 0 0; color: #556377; font-size: 8px; text-align: center; }

/* Entity architecture: index → create drawer → detail. */
.entity-head { align-items: flex-end; }
.toolbar-note { color: #647287; font-size: 9px; }
.entity-primary strong, .entity-primary small, .result-counts strong, .result-counts small { display: block; }
.entity-primary strong { max-width: 260px; overflow: hidden; color: #e1e6ee; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.entity-primary small, .result-counts small { margin-top: 4px; color: #657388; font-size: 8px; }
.result-counts strong { color: #dce3ec; font-size: 14px; letter-spacing: -.025em; }
.text-good { color: #63d9ad; }
.status-progress-cell { min-width: 230px; display: grid; justify-items: start; gap: 8px; }
.status-progress-cell > small { max-width: 280px; overflow: hidden; color: #657388; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.breadcrumbs { min-height: 28px; display: flex; align-items: center; gap: 8px; margin: -8px 0 14px; color: #647287; font-size: 9px; }
.breadcrumbs a { color: #9aa8bd; }.breadcrumbs a:hover { color: #dce3ec; }.breadcrumbs span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-head { min-height: 74px; margin-bottom: 20px; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.community-title { display: flex; align-items: center; gap: 15px; }
.identity-avatar-large { width: 50px; height: 50px; flex: 0 0 auto; border-radius: 15px; font-size: 13px; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(310px,.65fr); gap: 15px; }
.detail-card { padding: 23px; }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: minmax(120px,.45fr) 1fr; gap: 20px; padding: 14px 0; border-top: 1px solid var(--border-soft); }
.detail-list > div:first-child { border-top: 0; padding-top: 0; }
.detail-list dt { color: #67758a; font-size: 9px; }.detail-list dd { margin: 0; color: #d4dbe5; font-size: 10px; line-height: 1.45; }.detail-list dd small { display: block; margin-top: 3px; color: #647287; font-size: 8px; }
.detail-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 8px; padding: 14px; border: 1px solid rgba(75,212,160,.18); border-radius: 11px; background: rgba(75,212,160,.045); }
.detail-action strong { font-size: 10px; }.detail-action p { margin: 4px 0 0; color: #718096; font-size: 8px; }
.detail-history { display: grid; }
.detail-history > a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border-top: 1px solid var(--border-soft); }
.detail-history > a:first-child { border-top: 0; padding-top: 0; }.detail-history strong, .detail-history small { display: block; }.detail-history strong { color: #d5dce6; font-size: 10px; }.detail-history small { margin-top: 3px; color: #647287; font-size: 8px; }.detail-history b { color: #77869a; font-size: 11px; }

/* Durable live progress and ETA. */
.live-progress-panel { margin-bottom: 14px; padding: 19px 21px; border-color: rgba(107,124,255,.28); background: radial-gradient(circle at 100% 0, rgba(107,124,255,.12), transparent 32rem), linear-gradient(145deg,rgba(18,27,46,.98),rgba(12,19,32,.98)); }
.live-progress-copy { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }.live-progress-copy h2 { margin: 5px 0 0; font-size: 17px; }
.job-progress { min-width: 0; display: grid; gap: 8px; }
.job-progress-head { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; color: #9aa7b9; font-size: 9px; }
.job-progress-head > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.job-progress-head strong { color: #dce2ff; font-size: 12px; }.job-progress-head small { min-width: 74px; color: #8896ab; text-align: right; }
.job-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #0a1220; box-shadow: inset 0 0 0 1px rgba(75,91,123,.25); }
.job-progress-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#5266e7,#8491ff,#54d4c1); box-shadow: 0 0 18px rgba(107,124,255,.38); transition: width .45s ease; }
.job-progress[data-status="failed"] .job-progress-track > span { background: var(--bad); }.job-progress[data-status="succeeded"] .job-progress-track > span { background: var(--good); }
.job-progress > p { margin: 0; color: #6d7b90; font-size: 8px; line-height: 1.45; }
.job-progress.is-compact { width: min(250px,100%); gap: 5px; }.job-progress.is-compact .job-progress-head { grid-template-columns: minmax(0,1fr) auto; gap: 7px; }.job-progress.is-compact .job-progress-head small { grid-column: 1 / -1; min-width: 0; text-align: left; }.job-progress.is-compact .job-progress-track { height: 4px; }
.activity-row .job-progress { margin-top: 7px; }

.collection-groups-panel { margin-bottom: 14px; padding: 20px; }
.collection-group-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.collection-group-grid article { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--border-soft); border-radius: 11px; background: rgba(8,15,27,.45); }
.collection-group-main { min-width: 0; display: flex; align-items: center; gap: 9px; }.collection-group-main > div { min-width: 0; }.collection-group-main strong, .collection-group-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.collection-group-main strong { color: #ccd4df; font-size: 9px; }.collection-group-main small { margin-top: 3px; color: #637187; font-size: 8px; }
.collection-group-state { flex: 0 0 auto; display: grid; justify-items: end; gap: 5px; }.collection-group-state > strong { color: #c9d1dd; font-size: 9px; }.collection-group-state > strong small { color: #627087; font-size: 7px; }

/* Right-side creation drawers keep list pages focused on their data. */
.dialog.drawer { position: fixed; inset: 0 0 0 auto; width: min(560px,100vw); max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; border-radius: 0; }
.dialog.drawer[open] { animation: drawer-in .22s cubic-bezier(.22,.8,.28,1); }
.drawer-card { width: 100%; min-height: 100vh; max-height: 100vh; padding: 30px; border-block: 0; border-right: 0; border-radius: 20px 0 0 20px; background: linear-gradient(155deg,#151f31,#0b1422); }
@keyframes drawer-in { from { opacity: .6; transform: translateX(24px); } }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .compact-metrics-five { grid-template-columns: repeat(3,1fr); }.compact-metrics-five > div:nth-child(4) { border-left: 0; border-top: 1px solid var(--border-soft); }.compact-metrics-five > div:nth-child(5) { border-top: 1px solid var(--border-soft); }
  .operation-grid { grid-template-columns: 1fr; }.run-guide { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .collection-group-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }.sidebar { display: none; }.main-area { width: 100%; padding: 22px 20px 92px; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }.mobile-header .brand { padding: 0; }.mobile-header .runtime-line { padding: 8px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); background: #101827; }
  .mobile-nav { position: fixed; z-index: 50; left: 12px; right: 12px; bottom: 10px; min-height: 61px; display: grid; grid-template-columns: repeat(5,1fr); padding: 5px; border: 1px solid rgba(43,57,78,.82); border-radius: 16px; background: rgba(11,17,29,.93); box-shadow: 0 15px 50px rgba(0,0,0,.45); backdrop-filter: blur(20px); }.mobile-nav a { display: grid; place-items: center; align-content: center; gap: 3px; border-radius: 11px; color: #647287; }.mobile-nav a.is-active { color: #aeb8ff; background: rgba(107,124,255,.1); }.mobile-nav span { font-size: 15px; }.mobile-nav small { font-size: 7px; }
  .overview-grid { grid-template-columns: 1fr; }.quick-panel { order: -1; }
}
@media (max-width: 720px) {
  .page-head { min-height: 0; align-items: flex-start; margin-bottom: 22px; }.page-head h1 { font-size: 32px; }.page-head > .button { min-width: 42px; width: 42px; padding: 0; }.page-head > .button span:first-child { display: none; }.head-state { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; }.metric-card { min-height: 135px; padding: 16px; }.metric-card > strong { font-size: 26px; }
  .compact-metrics,.compact-metrics-five { grid-template-columns: 1fr 1fr; min-height: 0; padding: 0; }.compact-metrics > div { min-height: 58px; border-top: 1px solid var(--border-soft); }.compact-metrics > div:nth-child(odd) { border-left: 0; }.compact-metrics > div:nth-child(-n+2) { border-top: 0; }
  .table-toolbar { align-items: stretch; flex-direction: column; }.search-box { width: 100%; }.filter-pills { overflow-x: auto; }.filter-pills button { flex: 1; white-space: nowrap; }
  .responsive-table { overflow: visible; padding: 8px 13px 13px; } table,thead,tbody,tr,th,td { display: block; } thead { display: none; } tbody { display: grid; gap: 10px; } tbody tr { padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: rgba(10,17,29,.5); } td { min-height: 0; display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--border-soft); text-align: right; } td:first-child { border-top: 0; } td::before { content: attr(data-label); color: #5f6d81; font-size: 8px; text-align: left; }.identity-cell,.status-stack { min-width: 0; text-align: left; }.row-actions { width: 100%; justify-content: flex-end; }.row-actions::before { margin-right: auto; }.table-foot { padding: 0 14px; }.table-foot span:last-child { display: none; }
  .form-grid-two { grid-template-columns: 1fr; }.settings-card { grid-template-columns: 34px 1fr; padding: 18px; }.settings-icon { width: 32px; height: 32px; }
  .audience-filter-actions { align-items: stretch; flex-wrap: wrap; }.compact-select { width: 100%; }.compact-select select { width: 100%; min-width: 0; }
  .dialog-card { padding: 19px; }.dialog-actions .button { flex: 1; }.log-head small { display: none; }
  .head-actions { flex-wrap: wrap; justify-content: flex-end; }.detail-head { align-items: flex-start; }.collection-group-grid { grid-template-columns: 1fr; }
  .drawer-card { border-radius: 0; padding: 22px; }
  .login-layout { grid-template-columns: 1fr; }.login-story { display: none; }.login-form-side { padding: 26px; }.mobile-login-mark { display: grid; margin-bottom: 28px; }
}
@media (max-width: 430px) {
  .main-area { padding-inline: 13px; }.metric-grid { gap: 9px; }.metric-card { min-height: 128px; }.metric-card > strong small { display: block; margin: 7px 0 0; }
  .activity-panel,.quick-panel,.history-panel,.operation-builder { padding: 17px; }.activity-row { grid-template-columns: 30px minmax(0,1fr) auto; gap: 9px; }.activity-title .status-badge { display: none; }
  .builder-step { grid-template-columns: 25px minmax(0,1fr); gap: 8px; }.dialog { width: calc(100% - 18px); }.settings-title { flex-direction: column; }
  .dialog.drawer { width: 100%; }.detail-action { align-items: stretch; flex-direction: column; }.detail-action .button { width: 100%; }.job-progress-head { grid-template-columns: 1fr auto; }.job-progress-head small { grid-column: 1 / -1; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
