:root { color-scheme: light; --ink: #14213d; --ink-soft: #526176; --muted: #8390a4; --line: #e5ebf3; --bg: #f6f8fc; --surface: #fff; --soft: #f8faff; --blue: #2f6bff; --blue-soft: #edf3ff; --teal: #13a8a0; --teal-soft: #e7faf7; --orange: #c47b17; --orange-soft: #fff5df; --pink: #c6537a; --pink-soft: #fff0f5; --red: #d45869; --red-soft: #fff3f5; --shadow: 0 10px 32px rgba(32, 58, 92, .07); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 17px; height: 17px; stroke-width: 1.9; }
.hidden { display: none !important; }
.scope-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:12px 20px; margin-bottom:20px; }
.scope-toolbar > .muted { font-size:12px; line-height:1.6; flex:1 1 200px; }
.scope-switch { display:flex; flex-wrap:wrap; gap:4px; padding:4px; border:1px solid var(--line); border-radius:8px; background:#eef2f7; max-width:100%; }
.scope-switch button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:8px 12px; border:1px solid transparent; border-radius:5px; background:transparent; color:var(--ink-soft); font-size:13px; font-weight:650; transition:background-color .16s,color .16s,box-shadow .16s; }
.scope-switch button[hidden] { display:none; }
.scope-switch button[aria-pressed=true] { background:#fff; border-color:var(--line); color:var(--blue); box-shadow:0 2px 5px #203a5c0a; }
.scope-switch button[data-card-scope=rom][aria-pressed=true] { color:#08776f; }
.scope-switch button[data-card-scope=pending][aria-pressed=true] { color:#946006; }
.scope-switch button:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.scope-badge { display:inline-flex; align-items:center; white-space:nowrap; border-radius:4px; padding:4px 7px; font-size:11px; font-weight:650; }
.scope-app { color:#2554bd; background:var(--blue-soft); }
.scope-rom { color:#08776f; background:var(--teal-soft); }
.scope-pending { color:#946006; background:var(--orange-soft); }
.binding-scope { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.scope-assignment label { display:grid; gap:8px; font-size:13px; margin:12px 0; }
@media(max-width:500px) { .scope-toolbar { gap:8px; } .scope-switch { width:100%; } .scope-switch button { flex:1 1 auto; padding:8px; } }
@media(prefers-reduced-motion:reduce) { .scope-switch button { transition:none; } }
.shell { min-height: 100vh; }
.muted { color: var(--muted); }
.eyebrow, .section-kicker { margin: 0 0 7px; color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: 1.5px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; color: var(--ink); font-size: 13px; font-weight: 750; white-space: nowrap; transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 7px 15px rgba(47, 107, 255, .18); }
.button.primary:hover { background: #1f5ced; box-shadow: 0 10px 20px rgba(47, 107, 255, .25); }
.button.ghost { border-color: var(--line); background: #fff; }
.button.ghost:hover { border-color: #9ab5f3; color: var(--blue); background: var(--blue-soft); }
.button.danger { border-color: #f3c8ce; color: #bc4355; background: var(--red-soft); }
.button.danger:hover { border-color: var(--red); background: #ffe8ec; }
.button.small { min-height: 32px; padding: 0 10px; font-size: 12px; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 6px; color: var(--ink-soft); background: transparent; transition: .18s ease; }
.icon-button:hover { border-color: var(--line); color: var(--blue); background: var(--blue-soft); }
.icon-button:disabled, .button:disabled { opacity: .5; cursor: wait; transform: none; }
.topbar { display: none; }
.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; width: 236px; height: 100vh; padding: 24px 14px 16px; border-right: 1px solid var(--line); background: #fff; z-index: 30; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 24px; }
.sidebar-brand img { width: 40px; height: 40px; object-fit: contain; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { color: var(--ink); font-size: 15px; }
.sidebar-brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.edition { margin-left: auto; padding: 4px 6px; border-radius: 4px; color: var(--blue); background: var(--blue-soft); font-size: 9px; font-weight: 850; }
.workspace-label { display: flex; align-items: center; gap: 7px; margin: 0 10px 10px; color: #9aa6b7; font-size: 10px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(19,168,160,.12); }
.nav-list { display: grid; gap: 4px; }
.nav-list a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 11px; border-left: 3px solid transparent; border-radius: 5px; color: #68768d; font-size: 13px; font-weight: 700; transition: .18s ease; }
.nav-list a svg { width: 17px; color: #91a0b5; }
.nav-list a:hover { color: var(--ink); background: #f6f8fc; }
.nav-list a.active { border-left-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.nav-list a.active svg { color: var(--blue); }
.nav-count { min-width: 21px; margin-left: auto; padding: 3px 5px; border-radius: 10px; color: #65738a; background: #eef2f7; text-align: center; font-size: 10px; }
.nav-label { margin: 22px 11px 4px; color: #a4afbf; font-size: 10px; font-weight: 850; letter-spacing: 1.3px; text-transform: uppercase; }
.sidebar-bottom { display: grid; gap: 14px; margin-top: auto; }
.sidebar-status { display: flex; align-items: center; gap: 8px; padding: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.sidebar-status small { margin-left: auto; color: #b0bac8; }
.account { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; }
.account .avatar { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: #fff; background: var(--blue); font-size: 11px; font-weight: 850; }
.account strong, .account small { display: block; }
.account strong { max-width: 100px; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.account .icon-button { width: 28px; height: 28px; margin-left: auto; }
.app-main { min-width: 0; }
.app-main > .topbar { display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 0 38px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.82); }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: #9aa6b7; font-size: 12px; }
.breadcrumb svg { width: 14px; color: #b2bdc9; }
.breadcrumb strong { color: var(--ink-soft); font-weight: 750; }
.top-actions { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.top-account { display: flex; align-items: center; gap: 6px; color: #64738a; font-weight: 700; }
.top-account svg { width: 15px; color: var(--teal); }
.divider { width: 1px; height: 16px; background: var(--line); }
.content { width: min(1480px, calc(100% - 76px)); margin: auto; padding: 35px 0 60px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { margin: 0; color: var(--ink); font-size: 30px; letter-spacing: 0; }
.page-actions { display: flex; align-items: center; gap: 12px; }
#updated-at { color: var(--muted); font-size: 11px; }
.page-progress { height: 2px; margin: -15px 0 18px; overflow: hidden; background: var(--line); }
.page-progress::after { display: block; width: 35%; height: 100%; content: ""; background: var(--blue); animation: progress 1s infinite ease-in-out; }
.page-error { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid #f2ced3; border-radius: 6px; color: #a73d4c; background: var(--red-soft); font-size: 13px; }
.app-view[hidden] { display: none; }
.app-view { animation: view-in .22s ease both; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { position: relative; min-height: 130px; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.stat::after { display: none; }
.stat.total { border-top: 3px solid var(--blue); }.stat.total::after { background: var(--blue-soft); }
.stat.active { border-top: 3px solid var(--teal); }.stat.active::after { background: var(--teal-soft); }
.stat.devices { border-top: 3px solid var(--orange); }.stat.devices::after { background: var(--orange-soft); }
.stat.sessions { border-top: 3px solid var(--pink); }.stat.sessions::after { background: var(--pink-soft); }
.stat span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat strong { position: relative; z-index: 1; display: block; margin-top: 14px; color: var(--ink); font-size: 31px; font-weight: 800; }
.stat small { position: relative; z-index: 1; display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 20px; margin-bottom: 20px; }
.trend-section, .distribution-section, .overview-bottom > section { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 32px; }
.section-heading h2, .section-heading h3, .section-heading p { margin: 0; }
.section-heading h2 { font-size: 17px; }.section-heading h3 { font-size: 16px; }.section-heading .muted { font-size: 11px; }
.chart-legend { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; }.dot.cobalt { background: var(--blue); }.dot.teal { background: var(--teal); }
.trend-canvas { height: 250px; margin-top: 18px; }.trend-canvas canvas { width: 100%; height: 100%; }
.trend-summary { display: flex; gap: 22px; margin-top: 13px; color: var(--muted); font-size: 11px; }
.trend-summary strong { margin-left: 4px; color: var(--ink); }
.donut-wrap { position: relative; width: 180px; height: 180px; margin: 26px auto 18px; }.donut-wrap canvas { width: 100%; height: 100%; }
.donut-label { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; pointer-events: none; }.donut-label strong { font-size: 28px; }.donut-label span { color: var(--muted); font-size: 10px; }
.status-legend { display: grid; gap: 9px; }.status-legend span { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }.status-legend b { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-weight: 700; }.status-legend i { width: 7px; height: 7px; border-radius: 50%; }
.overview-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }.overview-bottom > section { min-height: 230px; }.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-size: 11px; font-weight: 750; }.text-link svg { width: 13px; }
.region-chart { display: grid; gap: 15px; margin-top: 20px; }.region-row > div { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--ink-soft); font-size: 11px; }.region-row strong { color: var(--blue); }.region-row > i { display: block; height: 7px; overflow: hidden; border-radius: 6px; background: #eef2f7; }.region-row b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--teal)); }
.audit-preview { display: grid; gap: 2px; margin-top: 14px; }.audit-preview-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f3f7; color: var(--muted); font-size: 11px; }.audit-preview-row strong { overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.view-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }.view-intro h3 { margin: 0 0 5px; font-size: 22px; }.view-intro p { margin: 0; color: var(--muted); font-size: 12px; }.view-intro-actions { display: flex; gap: 10px; }
.result-title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 17px; font-weight: 800; }.count { display: inline-grid; place-items: center; min-width: 25px; height: 21px; padding: 0 7px; border-radius: 11px; color: var(--blue); background: var(--blue-soft); font-size: 10px; }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 16px 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }.filter-bar select, .filter-bar input { width: auto; min-width: 140px; min-height: 37px; padding: 0 10px; font-size: 12px; }.search-field { position: relative; display: flex; align-items: center; min-width: 240px; }.search-field svg { position: absolute; left: 10px; width: 15px; color: #a4afbd; }.search-field input { width: 100%; padding-left: 32px; }.filter-bar .button { min-height: 37px; }.filter-bar > .icon-button { border-color: var(--line); }
.selection-bar { display: flex; align-items: center; gap: 12px; margin: -3px 0 12px; padding: 8px 12px; border-left: 3px solid var(--blue); background: var(--blue-soft); color: var(--ink-soft); font-size: 12px; }.selection-bar .text-button { margin-left: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow); }table { width: 100%; min-width: 960px; border-collapse: collapse; }th, td { padding: 14px 12px; border-bottom: 1px solid #edf1f6; text-align: left; vertical-align: middle; font-size: 12px; }th { color: #8a97aa; font-size: 10px; font-weight: 850; letter-spacing: .4px; text-transform: uppercase; }tbody tr { transition: background-color .15s ease; }tbody tr:hover { background: #fbfcff; }tbody tr:last-child td { border-bottom: 0; }.checkbox-cell { width: 38px; }.actions-heading { text-align: right; }.table-wrap input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--blue); }.card-code { color: var(--blue); font-size: 12px; font-weight: 800; white-space: nowrap; }.cell-note { display: block; max-width: 180px; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.cell-muted { color: var(--muted); font-size: 11px; }.status-cell { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 12px; font-size: 10px; font-weight: 800; }.status-cell.good { color: #147568; background: var(--teal-soft); }.status-cell.warn { color: #a96813; background: var(--orange-soft); }.status-cell.bad { color: #ae4051; background: var(--red-soft); }.status-cell.neutral { color: #6d7b8f; background: #eff2f6; }.row-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }.row-actions .icon-button { width: 29px; height: 29px; border-color: var(--line); }.row-actions .button { min-height: 29px; padding: 0 8px; font-size: 10px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 15px; }.pagination button { min-width: 30px; height: 30px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink-soft); background: #fff; font-size: 11px; }.pagination button.active { border-color: var(--blue); color: #fff; background: var(--blue); }.pagination button:disabled { cursor: default; opacity: .45; }
.panel-icon { color: var(--teal); }.dialog-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }.dialog-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 82px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; transition: .18s ease; }.dialog-item:hover, .dialog-item.selected { border-color: #a9c2fa; box-shadow: 0 6px 18px rgba(47,107,255,.08); transform: translateY(-1px); }.dialog-item strong, .dialog-item small { display: block; }.dialog-item strong { font-size: 13px; }.dialog-item small { margin-top: 6px; color: var(--muted); font-size: 10px; }.dialog-item .row-actions { justify-content: flex-end; }.dialog-workbench { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }.form-stack { display: grid; gap: 15px; }.form-stack label, .settings-band label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 750; }.form-stack input, .form-stack select, .form-stack textarea { min-height: 40px; }.form-stack textarea { min-height: 88px; padding: 10px; resize: vertical; }.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.button-editor-heading { margin-top: 5px; }.button-editor-heading h3 { margin: 0; font-size: 13px; }.button-editor-heading small { color: var(--muted); font-weight: 600; }.button-row { display: grid; grid-template-columns: minmax(90px, 1fr) 100px 120px minmax(120px, 1.2fr) 30px; gap: 7px; margin-bottom: 8px; }.button-row input, .button-row select { min-height: 35px; padding: 0 8px; font-size: 11px; }.remove-button { width: 30px; min-height: 35px; font-size: 18px; }.preview-section { min-width: 0; }.preview-stage { display: grid; place-items: center; min-height: 390px; margin-top: 12px; border: 1px dashed #cbd6e5; border-radius: 7px; background: #f5f8fd; }.dialog-preview { width: min(310px, calc(100% - 30px)); padding: 23px; border-radius: 17px; background: #fff; box-shadow: 0 22px 50px rgba(20,33,61,.16); animation: preview-in .35s ease both; }.dialog-preview h4 { margin: 0 0 9px; font-size: 20px; }.dialog-preview p { min-height: 38px; margin: 0 0 18px; font-size: 12px; line-height: 1.6; }.preview-buttons { display: grid; gap: 8px; }.preview-buttons button { min-height: 35px; border: 0; border-radius: 7px; color: #fff; background: var(--blue); font-weight: 750; }.preview-buttons button.alt { color: var(--ink-soft); background: #edf2f8; }.preview-buttons button.extra { color: var(--teal); background: var(--teal-soft); }
.settings-band { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }.setting-row { display: flex; align-items: center; gap: 13px; min-height: 66px; padding: 15px 0; border-bottom: 1px solid #eef2f6; }.setting-row:last-child { border-bottom: 0; }.setting-row h3, .setting-row p { margin: 0; }.setting-row h3 { font-size: 14px; }.setting-row p { margin-top: 5px; color: var(--muted); font-size: 11px; }.setting-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; color: var(--blue); background: var(--blue-soft); }.setting-icon.teal { color: var(--teal); background: var(--teal-soft); }.policy-switch { margin-left: auto; cursor: pointer; }.policy-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }.switch-track { position: relative; display: block; width: 42px; height: 24px; border-radius: 13px; background: #c5cedb; transition: .2s ease; }.switch-track::before { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; content: ""; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.14); transition: .2s ease; }.policy-switch input:checked + .switch-track { background: var(--blue); }.policy-switch input:checked + .switch-track::before { transform: translateX(18px); }.details-list { display: grid; gap: 12px; margin: 0; }.details-list div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid #eef2f6; }.details-list div:last-child { border-bottom: 0; }.details-list dt { color: var(--muted); font-size: 12px; }.details-list dd { margin: 0; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 12px; font-size: 10px; font-weight: 800; }.pill.good { color: #147568; background: var(--teal-soft); }.pill.neutral { color: #6c7a8e; background: #eff2f6; }.green { color: var(--teal) !important; }.empty { padding: 25px !important; color: var(--muted); text-align: center; }
.app-footer { display: flex; justify-content: space-between; padding: 20px 38px 28px; color: #9ba7b7; font-size: 10px; }.mobile-only, .mobile-scrim { display: none; }
.generated { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }.generated pre { max-height: 180px; margin: 8px 0 0; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--blue); background: var(--blue-soft); white-space: pre-wrap; word-break: break-word; }
.modal { width: min(470px, calc(100% - 28px)); padding: 22px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; box-shadow: 0 30px 90px rgba(20,33,61,.2); }.modal::backdrop { background: rgba(20,33,61,.28); backdrop-filter: blur(3px); }.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.modal-heading h2 { margin: 0; font-size: 18px; }.modal-heading p { margin: 4px 0 0; font-size: 11px; }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }.confirm-modal { max-width: 400px; }.confirm-modal > p { margin: 18px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }.drawer { width: min(520px, calc(100% - 28px)); height: min(100vh - 28px, 720px); margin: auto 14px auto auto; border-radius: 8px; }.drawer::backdrop { background: rgba(20,33,61,.25); }.drawer #drawer-content { margin-top: 18px; }.detail-block { padding: 13px 0; border-bottom: 1px solid #edf1f6; }.detail-block h3 { margin: 0 0 8px; font-size: 12px; }.detail-block p { margin: 3px 0; color: var(--muted); font-size: 11px; }.toast { position: fixed; right: 26px; bottom: 25px; z-index: 80; max-width: min(420px, calc(100% - 32px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; box-shadow: 0 14px 35px rgba(20,33,61,.14); opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }.toast.visible { opacity: 1; transform: translateY(0); }.toast.error { border-color: #f1c8ce; color: #a43f4c; background: #fff8f8; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } } @keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(300%); } } @keyframes preview-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 1180px) { .content { width: min(100% - 48px, 1100px); }.analytics-grid { grid-template-columns: 1fr; }.distribution-section { min-height: 300px; }.dialog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }.dialog-workbench { grid-template-columns: 1fr; }.preview-section { min-height: 390px; } }
@media (max-width: 860px) { .app-shell { display: block; }.sidebar { position: fixed; left: -250px; transition: left .22s ease; box-shadow: 15px 0 35px rgba(20,33,61,.12); }.sidebar.open { left: 0; }.mobile-only { display: inline-grid; }.mobile-scrim { position: fixed; inset: 0; z-index: 20; display: block; border: 0; background: rgba(20,33,61,.22); }.app-main > .topbar { padding: 0 22px; }.content { width: min(100% - 36px, 760px); padding-top: 25px; }.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }.overview-bottom { grid-template-columns: 1fr; }.app-footer { padding: 20px 18px; } }
@media (max-width: 600px) { .app-main > .topbar { min-height: 54px; padding: 0 15px; }.top-account, .divider, #today { display: none; }.content { width: calc(100% - 24px); padding: 21px 0 40px; }.page-heading, .view-intro { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }.page-heading h1 { font-size: 25px; }.page-actions { width: 100%; justify-content: space-between; }.page-actions .button { margin-left: auto; }.stats { gap: 9px; }.stat { min-height: 110px; padding: 14px; }.stat strong { margin-top: 10px; font-size: 25px; }.trend-section, .distribution-section, .overview-bottom > section { padding: 16px; }.trend-canvas { height: 190px; }.trend-summary { gap: 10px; font-size: 10px; }.filter-bar { align-items: stretch; }.filter-bar > * { flex: 1 1 130px; }.filter-bar .search-field { flex-basis: 100%; }.filter-bar select, .filter-bar input { min-width: 0; }.two-col { grid-template-columns: 1fr; }.dialog-list { grid-template-columns: 1fr; }.dialog-workbench { padding: 15px; }.button-row { grid-template-columns: 1fr 1fr 30px; }.button-row [data-button-field=text] { grid-column: 1 / 3; }.button-row [data-button-field=body] { grid-column: 1 / 4; }.button-row [data-button-field=action] { grid-column: 1; }.button-row [data-button-field=role] { grid-column: 2; }.preview-stage { min-height: 310px; }.app-footer { gap: 10px; flex-direction: column; }.drawer { width: calc(100% - 12px); margin: auto 6px auto auto; }.modal { padding: 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* W9 keeps card actions together and leaves only controls in the list footer. */
.cards-heading { align-items: center; }
.cards-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.export-tools { display: flex; align-items: center; gap: 8px; }
.pagination { justify-content: center; }
.list-footer { position: static; justify-content: center; min-height: 46px; margin-top: 14px; padding: 10px 0 2px; border-top: 1px solid var(--line); background: transparent; }
.list-footer .pagination { flex: 0 0 auto; margin-top: 0; }
.list-footer .page-size { margin-left: 4px; }
.version-distribution { display: grid; gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #eef2f6; }
.version-distribution-title { color: var(--muted); font-size: 11px; font-weight: 750; }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--ink-soft); font-size: 11px; }
.version-row strong { color: var(--blue); font-weight: 800; }
.settings-hint { max-width: 760px; margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.75; }
@media (max-width: 600px) {
    .cards-heading { align-items: flex-start; flex-wrap: wrap; }
    .cards-tools { width: 100%; justify-content: flex-end; }
    .list-footer { align-items: center; flex-wrap: nowrap; gap: 8px; }
    .list-footer .pagination { flex-basis: auto; order: initial; }
    .list-footer .page-size { order: initial; margin-left: 0; }
}

/* Shared list controls stay usable while the table content scrolls. */
.selection-bar select { min-width: 150px; min-height: 33px; padding: 0 9px; font-size: 11px; }
.selection-bar .button { min-height: 33px; }
.selection-bar .button:disabled { cursor: default; opacity: .5; }
.list-footer { display: flex; align-items: center; gap: 16px; min-height: 48px; position: static; padding: 8px 0; background: transparent; }
.list-footer .pagination { flex: 0 0 auto; margin-top: 0; }
.page-size { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.page-size select { min-height: 30px; padding: 0 8px; font-size: 11px; }
/* Shared controls and the responsive application shell. */
* { letter-spacing: 0; }
input, select, textarea { min-width: 0; max-width: 100%; padding: 10px 12px; border: 1px solid #dfe5ee; border-radius: 5px; color: var(--ink); background: #fff; outline: none; font-size: 13px; transition: border-color .16s, box-shadow .16s; }
input:focus, select:focus, textarea:focus { border-color: #85a9fa; box-shadow: 0 0 0 3px #3165ed12; }
input[type=checkbox] { accent-color: var(--blue); }
input[type=color] { width: 100%; padding: 4px; }
button:focus-visible, a:focus-visible { outline: 3px solid #89b1ff; outline-offset: 3px; }
button svg, a svg { flex-shrink: 0; pointer-events: none; }
label { min-width: 0; }
body:not(.auth-mode) .auth-shell { display: none; }
.boot-state:not(.hidden) { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; gap: 14px; color: #758197; background: #f6f8fc; font-size: 13px; }
.boot-state img { object-fit: contain; }
.offline { background: var(--red); }
.eyebrow, .section-kicker, .workspace-label, .nav-label, th { letter-spacing: 0; }
.content { max-width: 1480px; }
.app-view { min-height: 440px; }
.stat { min-height: 134px; box-shadow: none; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-top svg { color: var(--blue); width: 19px; height: 19px; }
.stat.active .stat-top svg { color: var(--teal); }
.stat.devices .stat-top svg { color: var(--orange); }
.stat.sessions .stat-top svg { color: var(--pink); }
.analytics-grid { gap: 0; margin-top: 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trend-section, .distribution-section, .overview-bottom > section { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 24px 0; }
.trend-section { padding-right: 28px; border-right: 1px solid var(--line); }
.distribution-section { padding-left: 28px; }
.overview-bottom { gap: 34px; }
.trend-canvas { height: 260px; }
.region-row span { display: inline-flex; gap: 14px; }
.region-row small { color: #a0aabb; font-size: 10px; }
.region-row b { background: #729aed; }
.region-row:nth-child(2n) b { background: #60b7a8; }
.audit-preview-row { grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; padding: 11px 0; }
.audit-preview-row .event-icon { display: grid; place-items: center; height: 26px; width: 26px; border-radius: 50%; color: #5683da; background: #eaf0fc; }
.audit-preview-row strong, .audit-preview-row small { display: block; }
.audit-preview-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.audit-preview-row time { font-size: 10px; }
.table-wrap { box-shadow: none; }
th { background: #f9fafc; height: 43px; }
td { height: 67px; }
.code-link { display: inline; padding: 0; border: 0; color: #3764bb; background: none; font-family: ui-monospace, Consolas, monospace; text-align: left; font-size: 12px; overflow-wrap: anywhere; }
.code-link:hover { text-decoration: underline; }
.location-cell { min-width: 135px; max-width: 220px; color: #657389; line-height: 1.6; }
.row-actions { flex-wrap: nowrap; }
.row-actions .icon-button[data-card-action=delete]:hover { color: var(--red); background: var(--red-soft); border-color: #f2c9d0; }
.table-wrap input[type=checkbox] { margin: 0; padding: 0; }
.empty svg { display: block; width: 24px; height: 24px; margin: 5px auto 12px; color: #a6b1bf; }
.page-count { margin-right: auto; color: var(--muted); font-size: 11px; }
.pagination button { display: inline-grid; place-items: center; }
.pagination svg { height: 14px; width: 14px; }
.filter-bar { padding: 14px 0; border: 0; border-radius: 0; background: transparent; }
.filter-bar > input { width: 170px; }
.search-field { flex: 1; }
.filter-bar select { min-width: 135px; }
.dialog-workbench { padding: 24px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; grid-template-columns: minmax(0,1.3fr) minmax(260px,.7fr); gap: 28px; }
.dialog-item { flex-direction: column; }
.dialog-item .row-actions { align-self: flex-end; }
.dialog-item .pill { margin-top: 10px; }
.form-stack > .button.primary { justify-self: start; min-width: 128px; }
.button-row { grid-template-columns: minmax(0,1fr) 100px 118px 30px; }
.button-row [data-field=text] { grid-column: 1; }
.button-row [data-field=role] { grid-column: 2; }
.button-row [data-field=action] { grid-column: 3; }
.button-row [data-field=body] { grid-row: 2; grid-column: 1 / 4; }
.button-row .remove-button { grid-column: 4; grid-row: 1; }
.button-row + .button-row { padding-top: 12px; border-top: 1px solid var(--line); }
.button-row > * { width: 100%; min-width: 0; }
.preview-section { position: sticky; top: 24px; align-self: start; }
.preview-stage { min-height: 470px; padding: 24px 0; background: #eef1f6; border: 1px solid #e1e6ee; border-radius: 8px; }
.dialog-preview { border-radius: 8px; }
.dialog-preview h4, .dialog-preview p { overflow-wrap: anywhere; white-space: pre-wrap; }
.dialog-preview p { line-height: 1.7; }
.preview-buttons button { padding: 10px; white-space: normal; overflow-wrap: anywhere; }
.preview-input { padding: 10px 0; margin-bottom: 22px; border-bottom: 1px solid #c8d0db; color: #9aa4b1; font-size: 12px; }
.dialog-preview.style-1 { border: 2px solid #13a8a0; }
.dialog-preview.style-1 .preview-buttons button:not(.alt) { background: #13a8a0; }
.dialog-preview.style-2 { border-top: 5px solid #c6537a; }
.dialog-preview.style-2 .preview-buttons button:not(.alt) { background: #c6537a; }
.dialog-preview.style-3 { border-radius: 2px; box-shadow: none; border: 1px solid #293342; }
.dialog-preview.style-3 .preview-buttons button:not(.alt) { background: #293342; }
.dialog-preview.style-4 { background: #eaf2ff; border: 1px solid #bdcff5; }
.settings-band { padding: 24px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; max-width: 820px; }
.setting-row > div { min-width: 0; }
.setting-row .pill { margin-left: auto; flex-shrink: 0; }
.policy-switch input { padding: 0; }
.policy-switch .switch-track { pointer-events: none; }
.policy-switch input:focus-visible + .switch-track { outline: 3px solid #89b1ff; outline-offset: 3px; }
.modal { max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal[open] { animation: modal-in .2s ease-out; }
.modal .modal-heading { margin-bottom: 22px; }
.modal input, .modal select { width: 100%; }
.modal #confirm-input-wrap { display: grid; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.modal-actions .button { min-width: 86px; }
.drawer { padding: 24px; max-height: calc(100dvh - 28px); overflow-y: auto; border: 1px solid var(--line); color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.drawer[open] { animation: drawer-in .25s ease-out; }
.drawer .section-heading h3 { font-size: 14px; }
.drawer .details-list { margin-bottom: 25px; }
.detail-block { overflow-wrap: anywhere; }
.detail-block p { font-size: 12px; line-height: 1.6; }
.detail-code { color: #3764bb; overflow-wrap: anywhere; }
.details-list dd { text-align: right; overflow-wrap: anywhere; }
.toast { top: 24px; bottom: auto; left: 50%; right: auto; transform: translate(-50%,-12px); }
.toast.visible { transform: translate(-50%,0); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes drawer-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media(min-width: 1440px) { .analytics-grid { grid-template-columns: minmax(0,2fr) minmax(260px,1fr); } }
@media(max-width: 1180px) { .analytics-grid { grid-template-columns: minmax(0,1.55fr) minmax(220px,1fr); }.trend-section { padding-right: 20px; }.distribution-section { padding-left: 20px; }.dialog-workbench { grid-template-columns: 1fr; }.preview-section { position: static; } }
@media(max-width: 860px) { .sidebar { height: 100dvh; overflow-y: auto; }.menu-open { overflow: hidden; }.stats { grid-template-columns: repeat(2,minmax(0,1fr)); }.mobile-only svg { width: 19px; }.sidebar-bottom { margin-top: auto; padding-top: 30px; } }
@media(max-width: 600px) {
    .analytics-grid { grid-template-columns: 1fr; }
    .trend-section { padding-right: 0; border-right: 0; }
    .distribution-section { padding-left: 0; border-top: 1px solid var(--line); min-height: 0; }
    .trend-canvas { height: 220px; }.section-heading h2 { font-size: 16px; }
    .stat { min-height: 126px; }.stat span { font-size: 11px; }.stat small { line-height: 1.6; }
    .filter-bar > .icon-button { flex: 0 0 37px; }.filter-bar select,.filter-bar > input { width: 100%; min-width: 0; }
    .button-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 30px; }
    .button-row [data-field=text] { grid-column: 1 / 3; }
    .button-row [data-field=role] { grid-row: 2; grid-column: 1; }
    .button-row [data-field=action] { grid-row: 2; grid-column: 2 / 4; }
    .button-row [data-field=body] { grid-row: 3; grid-column: 1 / 4; }
    .button-row .remove-button { grid-column: 3; grid-row: 1; }
    .pagination { flex-wrap: wrap; }.page-count { flex-basis: 100%; margin-bottom: 8px; }
    .drawer { width: calc(100% - 12px); }.chart-legend { gap: 6px; font-size: 9px; }
    .setting-row { align-items: flex-start; }.setting-row p { line-height: 1.65; }
    .app-footer { flex-direction: row; font-size: 9px; }
    .list-footer { align-items: center; flex-wrap: nowrap; gap: 8px; }
    .list-footer .pagination { flex-basis: auto; order: initial; }
    .page-size { order: initial; margin-left: 0; }
}

/* W9 final list layout: controls are centered below the table without side labels. */
.cards-heading { align-items: center; }
.cards-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.export-tools { display: flex; align-items: center; gap: 8px; }
.pagination { justify-content: center; }
.list-footer { position: static; justify-content: center; min-height: 46px; margin-top: 14px; padding: 10px 0 2px; border-top: 1px solid var(--line); background: transparent; }
.list-footer .pagination { flex: 0 0 auto; margin-top: 0; }
.list-footer .page-size { margin-left: 4px; }
.version-distribution { display: grid; gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #eef2f6; }
.version-distribution-title { color: var(--muted); font-size: 11px; font-weight: 750; }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--ink-soft); font-size: 11px; }
.version-row strong { color: var(--blue); font-weight: 800; }
.settings-hint { max-width: 760px; margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.75; }
@media (max-width: 600px) {
    .cards-heading { align-items: flex-start; flex-wrap: wrap; }
    .cards-tools { width: 100%; justify-content: flex-end; }
    .list-footer { align-items: center; flex-wrap: nowrap; gap: 8px; }
    .list-footer .pagination { flex-basis: auto; order: initial; }
    .list-footer .page-size { order: initial; margin-left: 0; }
}
