:root {
  color-scheme: dark;
  --bg: #10100f;
  --panel: #181816;
  --panel-2: #20201d;
  --ink: #f3f0e8;
  --muted: #9b9a92;
  --line: #35342f;
  --accent: #ff5a36;
  --acid: #d9ff43;
  --good: #6ee7a8;
  --danger: #ff8571;
  --radius: 3px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); min-width: 320px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.auth-screen { min-height: 100svh; width: min(1440px, calc(100% - clamp(32px, 8vw, 128px))); margin: 0 auto; display: flex; flex-direction: column; }
.auth-brand { height: 72px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); font-weight: 760; }
.auth-brand small { color: var(--muted); font: 600 10px/1 monospace; letter-spacing: .13em; padding-left: 12px; border-left: 1px solid var(--line); }
.auth-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .62fr); gap: clamp(52px, 8vw, 130px); align-items: center; padding: 72px 0; }
.auth-intro h1 { font-size: clamp(52px, 6.8vw, 104px); }
.auth-intro > p:last-child { color: var(--muted); line-height: 1.75; max-width: 610px; margin: 30px 0 0; }
.auth-card { border: 1px solid var(--line); background: var(--panel); padding: clamp(26px, 4vw, 46px); display: grid; gap: 12px; }
.card-index { color: var(--accent); font: 650 10px/1 monospace; letter-spacing: .12em; }
.auth-card h2, .modal h2 { margin: 7px 0 0; font-size: 27px; letter-spacing: -.04em; }
.auth-card > p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.field.standalone { border: 1px solid var(--line); }
.auth-submit { min-height: 58px; margin-top: 4px; }
.auth-footer { width: 100%; border-top: 1px solid var(--line); }
.topbar { height: 72px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(16,16,15,.94); backdrop-filter: blur(12px); z-index: 20; }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 12px; font-weight: 760; letter-spacing: -.02em; }
.brand small { color: var(--muted); font: 600 10px/1 monospace; letter-spacing: .13em; padding-left: 12px; border-left: 1px solid var(--line); }
.brand-mark { width: 24px; height: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; align-items: end; transform: skew(-10deg); }
.brand-mark i { display: block; background: var(--accent); height: 45%; }
.brand-mark i:nth-child(2) { height: 72%; background: var(--acid); }
.brand-mark i:nth-child(3) { height: 100%; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.status-chip { color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: 12px; }
.status-chip i { width: 7px; height: 7px; background: #77756d; border-radius: 50%; }
.status-chip.online { color: var(--good); }
.status-chip.online i { background: var(--good); box-shadow: 0 0 0 4px rgba(110,231,168,.1); }
.user-chip { min-width: 86px; padding-left: 12px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: var(--muted); font: 9px/1 monospace; letter-spacing: .07em; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.icon-button:hover { color: var(--ink); border-color: #55534b; }
main { width: min(1440px, calc(100% - clamp(32px, 8vw, 128px))); margin: 0 auto; }
.hero { min-height: 420px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .7fr); align-items: end; gap: 80px; padding: 88px 0 64px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 20px; color: var(--acid); text-transform: uppercase; font: 650 12px/1.2 monospace; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(50px, 7.4vw, 112px); line-height: .88; letter-spacing: -.07em; font-weight: 810; }
h1 em { color: var(--accent); font-style: normal; }
.hero-copy { max-width: 620px; color: var(--muted); font-size: 16px; line-height: 1.75; margin: 32px 0 0; }
.signal-stats { margin: 0; border-top: 1px solid var(--line); }
.signal-stats div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.signal-stats dt { color: var(--muted); font-size: 12px; }
.signal-stats dd { margin: 0; font: 650 clamp(24px, 3vw, 42px)/1 monospace; letter-spacing: -.04em; }
.signal-stats .source-label { color: var(--acid); font-size: 16px; letter-spacing: 0; }
.search-panel, .results-section { padding: 52px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading > div { display: flex; align-items: baseline; gap: 14px; }
.section-heading span { color: var(--accent); font: 650 11px/1 monospace; }
.section-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.section-heading.compact { margin: 0; }
.search-form { display: grid; grid-template-columns: minmax(260px, 1fr) 130px 140px 170px; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.field { background: var(--panel); padding: 14px 18px 13px; display: flex; flex-direction: column; gap: 8px; }
.field span { color: var(--muted); font: 600 10px/1 monospace; letter-spacing: .08em; text-transform: uppercase; }
.field input, .field select { width: 100%; border: 0; background: transparent; color: var(--ink); padding: 0; min-height: 28px; outline: none; }
.field-keyword input { font-size: 20px; font-weight: 650; }
.button { border: 0; min-height: 42px; padding: 0 18px; cursor: pointer; color: var(--ink); border-radius: var(--radius); transition: background-color .15s ease, color .15s ease, opacity .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .38; transform: none; }
.button-primary { background: var(--acid); color: #141510; border-radius: 0; font-weight: 760; display: flex; align-items: center; justify-content: space-between; }
.button-primary b { font-size: 22px; font-weight: 400; }
.button-secondary { background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; }
.button-quiet { background: transparent; border: 1px solid var(--line); font-size: 12px; }
.job-panel { margin-top: 22px; }
.job-copy { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.job-copy strong { color: var(--ink); font-family: monospace; }
.progress-track { height: 3px; background: var(--panel-2); overflow: hidden; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--acid); transition: width .25s ease; }
.notice { min-height: 20px; margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.notice.error { color: var(--danger); }
.notice.success { color: var(--good); }
.notice.warning { color: #f3ba63; }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.toolbar-actions { display: flex; gap: 12px; align-items: center; }
.tabs { display: flex; border: 1px solid var(--line); padding: 3px; }
.tab { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 8px 14px; font-size: 12px; }
.tab.active { background: var(--ink); color: var(--bg); }
.table-wrap { position: relative; min-height: 310px; border: 1px solid var(--line); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th { color: var(--muted); font: 600 10px/1 monospace; text-align: left; letter-spacing: .07em; padding: 13px 14px; border-bottom: 1px solid var(--line); }
td { padding: 15px 14px; border-bottom: 1px solid #292925; color: #d4d1c8; font-size: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #171714; }
.material-cell { width: 62%; }
.copy-text { color: var(--ink); font-size: 13px; font-weight: 620; line-height: 1.55; max-width: 820px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.video-link { color: var(--acid); text-decoration: none; white-space: nowrap; font-weight: 700; }
.video-link:hover { text-decoration: underline; }
.metric { font: 650 13px/1 monospace; color: var(--ink); }
.empty-state { min-height: 270px; display: grid; place-items: center; align-content: center; text-align: center; padding: 40px; }
.empty-state h3 { margin: 18px 0 7px; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.radar-empty { width: 58px; height: 58px; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.radar-empty i { position: absolute; inset: 9px; border: 1px solid var(--line); border-radius: 50%; }
.radar-empty i:nth-child(2) { inset: 18px; }
.radar-empty i:nth-child(3) { inset: 27px; background: var(--acid); border: 0; }
.radar-empty b { position: absolute; width: 50%; height: 1px; background: var(--accent); left: 50%; top: 50%; transform-origin: left; transform: rotate(-32deg); }
.adapter-state { border: 1px dashed var(--line); padding: 52px; max-width: 760px; }
.adapter-state span { color: var(--accent); font: 650 10px/1 monospace; letter-spacing: .12em; }
.adapter-state h3 { margin: 16px 0 8px; font-size: 24px; }
.adapter-state p { margin: 0; color: var(--muted); line-height: 1.7; }
.modal { width: min(720px, calc(100% - 32px)); max-height: min(820px, calc(100svh - 40px)); overflow-y: auto; padding: 34px; color: var(--ink); background: var(--panel); border: 1px solid #494840; box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.modal::backdrop { background: rgba(0,0,0,.74); backdrop-filter: blur(4px); }
.modal-wide { width: min(960px, calc(100% - 32px)); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.modal-copy { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 22px 0; }
.pairing-grid { display: grid; grid-template-columns: 1fr 180px; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pairing-grid > div { background: #121210; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.field-label { color: var(--muted); font: 600 10px/1 monospace; letter-spacing: .08em; }
.pairing-code { color: var(--acid); font: 760 34px/1.1 monospace; letter-spacing: .12em; }
.pairing-grid small { color: var(--muted); font-size: 10px; }
.setup-steps { margin: 24px 0; padding-left: 24px; color: #cfccc3; font-size: 12px; line-height: 1.9; }
.collector-download { display: grid; gap: 8px; margin: -8px 0 16px; }
.collector-download .button { display: flex; align-items: center; justify-content: space-between; color: var(--ink); text-decoration: none; }
.collector-download .button b { color: var(--acid); font-size: 18px; }
.collector-download small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.command-box { display: flex; align-items: stretch; border: 1px solid var(--line); background: #10100f; }
.command-box code { min-width: 0; flex: 1; padding: 14px; overflow-x: auto; color: var(--good); font-size: 11px; white-space: nowrap; }
.command-box button { border: 0; border-left: 1px solid var(--line); padding: 0 18px; color: var(--ink); background: var(--panel-2); cursor: pointer; }
.device-list-head { display: flex; justify-content: space-between; margin: 28px 0 10px; font-size: 12px; }
.device-list-head span { color: var(--muted); }
.device-list, .member-list { border-top: 1px solid var(--line); }
.device-row, .member-row { display: flex; align-items: center; gap: 12px; min-height: 62px; border-bottom: 1px solid var(--line); }
.device-row > i { width: 8px; height: 8px; border-radius: 50%; background: #67655e; }
.device-row > i.online { background: var(--good); box-shadow: 0 0 0 4px rgba(110,231,168,.08); }
.device-row > div, .member-row > div:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.device-row strong, .member-row strong { font-size: 12px; }
.device-row small, .member-row small { color: var(--muted); font-size: 10px; }
.device-row > span { color: #f3ba63; font-size: 10px; }
.unlink-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; padding: 8px; }
.unlink-button:hover { color: var(--danger); }
.list-empty { color: var(--muted); font-size: 12px; padding: 18px 0; margin: 0; }
.member-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.member-form .button-primary { min-height: 58px; }
.member-avatar { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--acid); color: var(--bg); font-weight: 800; }
.member-status { color: var(--good); font-size: 10px; }
footer { width: min(1440px, calc(100% - clamp(32px, 8vw, 128px))); margin: 0 auto; padding: 28px 0 44px; color: var(--muted); display: flex; justify-content: space-between; gap: 24px; font-size: 10px; font-family: monospace; }
footer p { margin: 0; }
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; gap: 44px; align-items: start; }
  .hero { grid-template-columns: 1fr; gap: 50px; min-height: 0; padding-top: 64px; }
  .search-form { grid-template-columns: 1fr 1fr; }
  .field-keyword { grid-column: 1 / -1; }
  .button-primary { min-height: 64px; }
  .results-toolbar { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .auth-screen { width: calc(100% - 32px); }
  .auth-layout { padding: 48px 0; }
  .auth-card { padding: 24px 18px; }
  .auth-brand small { display: none; }
  .topbar { height: auto; min-height: 66px; padding: 12px 16px; }
  .brand small, .status-chip span, .user-chip small { display: none; }
  .top-actions { gap: 7px; }
  .top-actions .button { min-height: 38px; padding: 0 10px; }
  .user-chip { min-width: 0; padding-left: 8px; }
  .button-secondary { padding: 0 12px; }
  main, footer { width: calc(100% - 32px); }
  .hero { padding: 52px 0 42px; }
  h1 { font-size: clamp(48px, 16vw, 74px); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .search-form { grid-template-columns: 1fr; }
  .field-keyword { grid-column: auto; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .adapter-state { padding: 32px 22px; }
  .modal { padding: 24px 18px; }
  .pairing-grid, .member-form { grid-template-columns: 1fr; }
  .pairing-grid .button-primary { min-height: 56px; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
