:root {
  --bg: #07090d;
  --panel: #0d1118;
  --panel-2: #111720;
  --line: #222a35;
  --line-soft: #19212b;
  --text: #f4f7fb;
  --muted: #7e8b9c;
  --muted-2: #566171;
  --lime: #b8ff5a;
  --lime-2: #76d91f;
  --cyan: #53d7ff;
  --amber: #ffbd4a;
  --red: #ff6074;
  --green: #4ee39a;
  --radius: 14px;
  --font-boost: 2px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html[data-font-size="standard"] { --font-boost: 0px; }
html[data-font-size="large"] { --font-boost: 2px; }
html[data-font-size="xlarge"] { --font-boost: 4px; }

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body { margin: 0; min-width: 1080px; min-height: 100vh; background: radial-gradient(circle at 72% -20%, rgba(87, 138, 55, .13), transparent 38%), var(--bg); }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid rgba(184,255,90,.65); outline-offset: 2px; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.topbar { height: 68px; position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(7,9,13,.9); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.35px; }
.brand small { display: block; margin-top: 2px; color: var(--muted-2); font: 600 8px/1.2 ui-monospace, monospace; letter-spacing: 1.8px; }
.brand-mark { width: 31px; height: 31px; display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; transform: skew(-8deg); }
.brand-mark span { border-radius: 2px; background: var(--lime); box-shadow: 0 0 18px rgba(184,255,90,.18); }
.brand-mark span:nth-child(2) { opacity: .55; transform: translateY(5px); }
.brand-mark span:nth-child(3) { opacity: .22; transform: translateY(10px); }
.top-actions { display: flex; align-items: center; gap: 11px; }
.theme-button span { font-size: 17px; line-height: 1; }
.health-pill { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #0b0f15; color: var(--muted); font-size: 12px; }
.health-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px currentColor; }
.health-pill.ok i { background: var(--green); }
.health-pill.error i { background: var(--red); }
.icon-button { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: #0b0f15; cursor: pointer; transition: .2s ease; }
.icon-button:hover { border-color: #3c4857; background: #131922; }
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.app-shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 356px minmax(0,1fr); align-items: start; }
.control-rail { min-width: 0; height: calc(100vh - 68px); position: sticky; top: 68px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(15,20,28,.94), rgba(8,11,16,.96)); }
.control-rail::-webkit-scrollbar { width: 8px; }
.control-rail::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: #34404d; background-clip: padding-box; }
.workflow-step { min-width: 0; padding: 25px 24px 22px; border-bottom: 1px solid var(--line-soft); opacity: .76; transition: opacity .25s; }
.workflow-step.active, .workflow-step:focus-within, .workflow-step:hover { opacity: 1; }
.step-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 18px; }
.step-index { padding-top: 2px; color: var(--lime); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .8px; }
.step-heading h2 { margin: 0; font-size: 14px; letter-spacing: -.15px; }
.step-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.tabs { display: grid; grid-template-columns: repeat(3,1fr); padding: 3px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 9px; background: #090d12; }
.tabs button { border: 0; padding: 7px 4px; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.tabs button.active { background: #1a222c; color: var(--text); box-shadow: 0 1px 5px rgba(0,0,0,.4); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
textarea, input, select { width: 100%; color: var(--text); border: 1px solid var(--line); border-radius: 8px; background: #090d12; transition: border .2s, background .2s; }
textarea:hover, input:hover, select:hover { border-color: #33404e; }
textarea:focus, input:focus, select:focus { border-color: rgba(184,255,90,.52); background: #0b1016; }
textarea { resize: vertical; min-height: 104px; padding: 11px; font: 10.5px/1.6 ui-monospace, "Cascadia Mono", monospace; }
input, select { height: 36px; padding: 0 10px; font-size: 11px; }
select { appearance: none; background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position: calc(100% - 14px) 15px,calc(100% - 10px) 15px; background-size: 4px 4px; background-repeat: no-repeat; padding-right: 26px; }
.field-hint { color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.drop-zone { height: 116px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px dashed #34404d; border-radius: 9px; background: #090d12; cursor: pointer; text-align: center; transition: .2s; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--lime-2); background: rgba(184,255,90,.035); }
.drop-zone input { display: none; }
.drop-zone svg { width: 23px; fill: none; stroke: var(--lime); stroke-width: 1.4; }
.drop-zone strong { font-size: 11px; }
.drop-zone small { color: var(--muted-2); font-size: 9px; }
button.primary, button.secondary, button.danger { position: relative; border-radius: 8px; cursor: pointer; transition: .18s ease; }
button.wide { width: 100%; }
button.secondary { height: 37px; margin-top: 10px; border: 1px solid #32404d; background: #131a23; font-size: 11px; }
button.secondary:hover { border-color: #536273; background: #18212c; }
button.secondary kbd { position: absolute; right: 10px; color: var(--muted-2); background: transparent; }
button.primary { min-height: 50px; overflow: hidden; border: 1px solid #c9ff85; background: var(--lime); color: #11170c; box-shadow: 0 9px 30px rgba(126,215,38,.08); }
button.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px rgba(126,215,38,.16); }
button.primary:disabled { cursor: not-allowed; filter: saturate(.15); opacity: .4; transform: none; }
button.primary strong, button.primary small { position: relative; z-index: 1; display: block; }
button.primary strong { font-size: 13px; }
button.primary small { margin-top: 2px; opacity: .64; font-size: 9px; }
.button-glow { position: absolute; width: 80px; height: 80px; right: -20px; top: -35px; border-radius: 50%; background: #fff; opacity: .25; filter: blur(20px); }
button.danger { height: 37px; border: 1px solid rgba(255,96,116,.35); background: rgba(255,96,116,.07); color: #ff8b9a; }
.run-dock { position: static; padding: 18px 24px 24px; background: #090c11; }
.run-dock .danger { margin-top: 8px; }
.authorization-card { margin-bottom:10px;padding:10px;border:1px solid rgba(83,215,255,.17);border-radius:9px;background:rgba(83,215,255,.035); }
.authorization-card label { display:flex;align-items:flex-start;gap:8px;color:#c8d2dc;font-size:calc(10px + var(--font-boost));line-height:1.45;cursor:pointer; }
.authorization-card input { width:15px;height:15px;flex:0 0 auto;margin:1px 0 0;padding:0;accent-color:var(--lime-2); }
.authorization-card p { margin:7px 0 0 23px;color:var(--muted-2);font-size:calc(9px + var(--font-boost));line-height:1.45; }
.authorization-card a { margin-right:9px;color:#82cfff;text-decoration:none; }
.authorization-card a:hover { text-decoration:underline; }
.import-summary { margin-top: 10px; padding: 10px; border: 1px solid rgba(184,255,90,.22); border-radius: 8px; background: rgba(184,255,90,.035); }
.import-summary strong { display: block; color: var(--lime); font-size: 11px; }
.import-summary small { color: var(--muted); font-size: 9px; }
.preview-note { margin-top:7px;color:var(--muted);font-size:calc(10px + var(--font-boost)); }
.mini-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.mini-chip { padding: 3px 6px; border-radius: 4px; background: #17201d; color: #a8c78b; font: 9px ui-monospace, monospace; }
.field-label { display: flex; justify-content: space-between; margin: 14px 0 8px; color: #aeb8c4; font-size: 10px; font-weight: 650; }
.text-button { border: 0; background: none; color: var(--lime-2); font-size: 9px; cursor: pointer; }
.kernel-grid { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.kernel-card { min-width: 0; min-height: 73px; position: relative; overflow: hidden; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #090d12; cursor: pointer; }
.kernel-card input { position: absolute; opacity: 0; }
.kernel-card.selected { border-color: rgba(184,255,90,.5); background: rgba(184,255,90,.035); }
.kernel-card.unavailable { opacity: .45; cursor: not-allowed; }
.kernel-card strong { display: block; font: 650 11px ui-monospace, monospace; }
.kernel-card small { display: block; width: 100%; margin-top: 5px; color: var(--muted); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kernel-card b { display: inline-block; margin-top: 5px; color: var(--green); font-size: 8px; font-weight: 650; }
.kernel-card.unavailable b { color: var(--red); }
.skeleton-card { height: 73px; border-radius: 9px; background: linear-gradient(90deg,#10151c,#171e27,#10151c); background-size: 200%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.two-col label span, .settings-section label span { display: block; margin: 0 0 5px; color: var(--muted); font-size: 9px; }
.provider-list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.check-tile { min-width: 0; display: flex; align-items: center; gap: 7px; height: 31px; padding: 0 8px; border: 1px solid var(--line-soft); border-radius: 7px; background: #0a0e13; color: #abb4bf; font-size: 9px; cursor: pointer; }
.check-tile input { width: 12px; height: 12px; accent-color: var(--lime-2); }
.check-tile em { margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); }
.check-tile em.configured { background: var(--green); box-shadow: 0 0 8px rgba(78,227,154,.4); }
.optional-block { margin-top: 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: #090d12; }
.optional-block summary { display: flex; justify-content: space-between; padding: 9px; list-style: none; cursor: pointer; color: #b4bdc7; font-size: 10px; }
.optional-block summary span { color: var(--muted-2); font-size: 8px; }
.optional-block[open] { padding-bottom: 8px; }
.optional-block p { margin: 7px 9px 0; color: var(--muted-2); font-size: 8.5px; line-height: 1.45; }
.switch-line { display: flex; align-items: center; gap: 7px; padding: 4px 9px; color: var(--muted); font-size: 9px; }
.switch-line input { display: none; }
.switch-line i { width: 24px; height: 13px; position: relative; border-radius: 8px; background: #28313c; }
.switch-line i:after { content:""; position:absolute; width:9px; height:9px; left:2px; top:2px; border-radius:50%; background:#87919d; transition:.2s; }
.switch-line input:checked + i { background: rgba(184,255,90,.26); }
.switch-line input:checked + i:after { left:13px; background: var(--lime); }
.service-list { display: grid; grid-template-columns: 1fr 1fr; padding: 2px 9px; }
.service-list label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.service-list input { width: 11px; height: 11px; accent-color: var(--lime-2); }
.advanced-filter { display: grid; grid-template-columns: 1.45fr 1fr; gap: 7px; margin-top: 9px; }

.workspace { min-width: 0; padding: 25px 26px 50px; }
.overview-grid { display: grid; grid-template-columns: repeat(4,minmax(170px,1fr)); gap: 11px; }
.metric-card { min-height: 108px; position: relative; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg,#10151d,#0c1016); overflow: hidden; }
.metric-card:after { content:""; position:absolute; right:-18px; bottom:-35px; width:95px; height:95px; border:1px solid rgba(255,255,255,.035); border-radius:50%; box-shadow:0 0 0 16px rgba(255,255,255,.012); }
.metric-card.accent { border-color: rgba(184,255,90,.27); background: linear-gradient(145deg,rgba(184,255,90,.075),#0d1214 65%); }
.metric-card span { color: var(--muted); font-size: 10px; }
.metric-card strong { display: block; margin-top: 8px; font: 650 29px/1 ui-monospace, monospace; letter-spacing: -1.2px; }
.metric-card.accent strong { color: var(--lime); }
.metric-card small { display: block; margin-top: 8px; color: var(--muted-2); font-size: 9px; }
.task-strip { min-height: 74px; display: grid; grid-template-columns: minmax(260px,.8fr) minmax(260px,1fr) auto; align-items: center; gap: 22px; margin-top: 11px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #0c1118; }
.task-copy { display: flex; align-items: center; gap: 10px; min-width: 0; }
.task-copy strong, .task-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-copy strong { font-size: 11px; }
.task-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.status-orb { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; border: 1px solid #29333f; background: #111821; box-shadow: inset 0 0 0 7px #0b0f15; }
.status-orb.running { border-color: var(--lime); box-shadow: inset 0 0 0 7px #0b0f15,0 0 14px rgba(184,255,90,.18); animation: pulse 1.5s infinite; }
.status-orb.completed { border-color: var(--green); background: var(--green); }
.status-orb.failed { border-color: var(--red); }
@keyframes pulse { 50% { opacity: .5; } }
.progress-wrap { display: flex; align-items: center; gap: 10px; }
.progress-track { height: 6px; flex: 1; overflow: hidden; border-radius: 5px; background: #202832; }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg,#72ca29,var(--lime)); box-shadow: 0 0 12px rgba(184,255,90,.24); transition: width .35s ease; }
.progress-wrap b { width: 38px; color: var(--muted); font: 600 10px ui-monospace,monospace; }
.task-actions { display: flex; gap: 5px; }
.small-button { height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #121821; color: #a8b2be; cursor: pointer; font-size: 9px; }
.small-button:hover:not(:disabled) { border-color: #465363; color: var(--text); }
.small-button:disabled { opacity: .35; cursor: not-allowed; }

.results-panel { margin-top: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: #0b0f15; overflow: hidden; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-end; padding: 18px 18px 13px; }
.eyebrow { display: block; margin-bottom: 5px; color: var(--lime-2); font: 650 8px/1 ui-monospace,monospace; letter-spacing: 1.4px; }
.panel-header h1, .card-heading h2, .modal h2 { margin: 0; font-size: 16px; letter-spacing: -.35px; }
.view-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 9px; }
.filter-bar { display: grid; grid-template-columns: minmax(260px,1fr) repeat(4,130px); gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: #0e131a; }
.filter-bar input, .filter-bar select { height: 32px; }
.search-box { position: relative; }
.search-box svg { position: absolute; width: 14px; left: 10px; top: 9px; fill: none; stroke: var(--muted-2); stroke-width: 1.7; }
.search-box input { padding-left: 32px; }
.selection-bar { min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 12px;border-bottom:1px solid var(--line-soft);background:#0b1117; }
.selection-bar strong,.selection-bar small { display:block; }
.selection-bar strong { color:var(--cyan);font-size:calc(10px + var(--font-boost)); }
.selection-bar small { margin-top:3px;color:var(--muted);font-size:calc(9px + var(--font-boost)); }
.selection-actions { display:flex;align-items:center;gap:6px;color:var(--muted);font-size:calc(9px + var(--font-boost)); }
.selection-actions .pager { min-width:30px;padding:0;font-size:18px; }
.table-wrap { min-height: 330px; position: relative; overflow: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { position: sticky; top: 0; z-index: 2; height: 36px; padding: 0 10px; text-align: left; color: var(--muted-2); background: #0b0f15; border-bottom: 1px solid var(--line-soft); font-size: 8px; font-weight: 650; letter-spacing: .4px; }
.select-col{width:3%}.select-col input,.select-cell input{width:15px;height:15px;margin:0;accent-color:var(--lime-2)}
th:nth-child(2){width:19%} th:nth-child(3){width:8%} th:nth-child(4){width:13%} th:nth-child(5){width:18%} th:nth-child(6){width:13%} th:nth-child(7){width:10%} th:nth-child(8){width:10%} th:nth-child(9){width:6%}
td { height: 57px; padding: 8px 10px; border-bottom: 1px solid #151c24; color: #bdc6d1; font-size: 10px; overflow: hidden; }
.select-cell{text-align:center;padding-left:8px;padding-right:4px}
tbody tr { transition: background .15s; }
tbody tr:hover { background: #10161e; }
.cell-main, .cell-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-main { color: #e0e6ed; font-weight: 560; }
.cell-sub { margin-top: 4px; color: var(--muted-2); font: 8.5px ui-monospace,monospace; }
.status-badge, .risk-badge, .type-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 5px; font-size: 8.5px; white-space: nowrap; }
.status-badge:before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; }
.status-success { color: var(--green); background: rgba(78,227,154,.07); }
.status-failed { color: var(--red); background: rgba(255,96,116,.07); }
.status-skipped { color: var(--amber); background: rgba(255,189,74,.07); }
.status-pending { color:var(--cyan);background:rgba(83,215,255,.07); }
.risk-low { color: var(--green); background: rgba(78,227,154,.07); }
.risk-medium { color: var(--amber); background: rgba(255,189,74,.07); }
.risk-high { color: var(--red); background: rgba(255,96,116,.08); }
.type-badge { color: #9bc7ff; border: 1px solid rgba(83,157,255,.15); background: rgba(83,157,255,.045); }
.latency-good { color: var(--green); } .latency-mid { color: var(--amber); } .latency-bad { color: var(--red); }
.row-action { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 6px; background: #111821; color: var(--muted); cursor: pointer; }
.empty-state { position: absolute; inset: 36px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state h3 { margin: 15px 0 5px; font-size: 12px; }
.empty-state p { max-width: 430px; margin: 0; color: var(--muted-2); font-size: 9px; }
.radar { width: 70px; height: 70px; position: relative; border: 1px solid #27313d; border-radius: 50%; background: repeating-radial-gradient(circle,transparent 0 11px,#1b232d 12px 12px); overflow: hidden; }
.radar:before,.radar:after { content:""; position:absolute; background:#222b36; }
.radar:before { width:1px;height:100%;left:50%; } .radar:after{height:1px;width:100%;top:50%;}
.radar span { position:absolute; width:50%; height:50%; top:0; left:50%; transform-origin:0 100%; background:linear-gradient(45deg,rgba(184,255,90,.13),transparent); animation:sweep 2.4s linear infinite; }
.radar i { position:absolute; z-index:2; width:4px;height:4px;border-radius:50%;background:var(--lime);box-shadow:0 0 8px var(--lime); }
.radar i:nth-child(1){left:21px;top:19px}.radar i:nth-child(2){right:13px;top:36px}.radar i:nth-child(3){left:34px;bottom:9px}
@keyframes sweep { to { transform: rotate(360deg); } }

.bottom-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 11px; margin-top: 11px; }
.activity-card,.history-card { min-height: 200px; border: 1px solid var(--line); border-radius: var(--radius); background: #0c1118; padding: 16px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-heading h2 { font-size: 13px; }
.live-indicator { display:flex;align-items:center;gap:5px;color:var(--muted-2);font:8px ui-monospace,monospace; }
.live-indicator i { width:5px;height:5px;border-radius:50%;background:var(--green); }
.event-list { max-height: 150px; overflow: auto; }
.event { display:grid;grid-template-columns:62px 1fr;gap:10px;padding:7px 0;border-bottom:1px solid var(--line-soft);font-size:9px; }
.event time { color:var(--muted-2);font:8px ui-monospace,monospace; }
.event.success span{color:#8bdcb4}.event.error span{color:#ff8d9c}.event.warn span{color:#e0bb73}
.history-list { display:flex;flex-direction:column;gap:6px;max-height:380px;overflow:auto; }
.history-count { color:var(--muted);font-size:calc(10px + var(--font-boost)); }
.history-item { display:grid;grid-template-columns:1fr auto;gap:10px;padding:9px;border:1px solid var(--line-soft);border-radius:7px;background:#0a0e13;cursor:pointer; }
.history-item:hover { border-color:#35414f; }
.history-item.active { border-color:rgba(184,255,90,.38);background:rgba(184,255,90,.035); }
.history-item strong,.history-item small{display:block}.history-item strong{font-size:9px}.history-item small{margin-top:4px;color:var(--muted-2);font-size:8px}.history-item b{font:8px ui-monospace,monospace;color:var(--green)}
.history-actions{display:flex;align-items:center;gap:7px}.history-actions button{width:25px;height:25px;border:1px solid var(--line);border-radius:6px;background:#111821;color:var(--muted);cursor:pointer}.history-actions button:hover{color:var(--text);border-color:#465363}
.muted-copy { color:var(--muted-2);font-size:9px; }

.modal-backdrop { position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:30px;background:rgba(1,3,5,.78);backdrop-filter:blur(9px); }
.modal { width:min(720px,92vw); max-height:88vh; display:flex;flex-direction:column;border:1px solid #303b48;border-radius:16px;background:#0e131a;box-shadow:0 30px 100px rgba(0,0,0,.65); }
.modal > header { display:flex;justify-content:space-between;align-items:flex-start;padding:20px;border-bottom:1px solid var(--line); }
.modal header p { margin:7px 0 0;color:var(--muted);font-size:9px; }
.modal header .icon-button { font-size:20px;line-height:1; }
.modal-body { padding:18px 20px;overflow:auto; }
.modal footer { display:flex;justify-content:flex-end;gap:8px;padding:12px 20px;border-top:1px solid var(--line); }
.modal footer button { width:auto;min-width:110px;margin:0;padding:0 14px; }
.settings-section { margin-bottom:20px; }
.settings-section h3 { margin:0 0 11px;font-size:11px; }
.settings-help { margin:-4px 0 12px;color:var(--muted);font-size:calc(9px + var(--font-boost));line-height:1.5; }
.settings-section > label { display:block;margin-top:9px; }
.preference-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px; }
.preference-grid label { min-width:0; }
.preference-note { margin:9px 0 0;color:var(--muted);font-size:calc(10px + var(--font-boost));line-height:1.55; }
.settings-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px; }
.key-field { min-width:0; }
.key-field > label { min-width:0;display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;color:var(--muted);font-size:9px; }
.key-field > label span { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.key-field label b { color:var(--green);font-size:8px; }
.key-input-row { min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start;gap:6px; }
.key-input-row > input { min-width:0; }
.secret-entry { min-width:0;min-height:68px;height:68px;resize:vertical;-webkit-text-security:disc; }
.saved-key-list { display:flex;flex-wrap:wrap;gap:5px;margin:0 0 7px; }
.saved-key { display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:4px 5px 4px 7px;border:1px solid var(--line-soft);border-radius:6px;background:#0a0e13;color:#b7c2cf; }
.saved-key code { max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:calc(9px + var(--font-boost)) ui-monospace,monospace; }
.saved-key.pending-remove { opacity:.45;text-decoration:line-through;border-color:rgba(255,96,116,.42); }
.key-remove,.key-eye { border:1px solid var(--line);border-radius:6px;background:#111821;color:var(--muted);cursor:pointer; }
.key-remove { width:20px;height:20px;padding:0;line-height:1; }
.key-eye { width:36px;height:36px;flex:0 0 36px;display:inline-flex;align-items:center;justify-content:center;padding:0; }
.key-eye-icon { width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.key-eye:hover,.key-remove:hover { color:var(--text);border-color:#465363; }
.settings-modal footer button { width:148px;min-width:148px;height:48px;min-height:48px;flex:0 0 148px;margin:0;padding:0; }
.settings-section .clear-option { height:36px;display:flex;align-items:center;gap:5px;padding:0 9px;border:1px solid rgba(255,96,116,.24);border-radius:8px;background:rgba(255,96,116,.035);color:#d4939c;font-size:8px;cursor:pointer; }
.settings-section .clear-option:hover { border-color:rgba(255,96,116,.5); }
.settings-section .clear-option input { width:12px;height:12px;margin:0;padding:0;accent-color:var(--red); }
.settings-section .clear-option span { margin:0;white-space:nowrap; }
.vault-note { padding:10px;border:1px solid rgba(83,215,255,.13);border-radius:8px;background:rgba(83,215,255,.035);color:#86a9b8;font-size:9px;line-height:1.55; }
.detail-modal { width:min(820px,92vw); }
.rename-modal { width:min(520px,92vw); }
.online-mode-modal { width:min(620px,92vw); }
.online-mode-modal footer button { width:180px;min-height:48px;padding:0 18px; }
.online-privacy-card { padding:14px 16px;border:1px solid rgba(78,227,154,.28);border-radius:10px;background:rgba(78,227,154,.055); }
.online-privacy-card strong { color:var(--green);font-size:calc(12px + var(--font-boost)); }
.online-privacy-card p,.online-caveat,.online-steps { color:var(--muted);font-size:calc(10px + var(--font-boost));line-height:1.65; }
.online-privacy-card p { margin:7px 0 0; }
.online-steps { margin:16px 0;padding-left:24px; }
.online-steps li+li { margin-top:6px; }
.online-caveat { margin:0;padding:11px 13px;border-left:3px solid var(--amber);background:rgba(255,189,74,.045); }
.rename-field span { display:block;margin-bottom:7px;color:var(--muted);font-size:calc(10px + var(--font-boost)); }
.detail-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:8px; }
.detail-stat { padding:11px;border:1px solid var(--line-soft);border-radius:8px;background:#0a0e13; }
.detail-stat span { display:block;color:var(--muted-2);font-size:8px; }
.detail-stat strong { display:block;margin-top:6px;font:550 10px ui-monospace,monospace;word-break:break-all; }
.detail-section { margin-top:16px; }
.detail-section h3 { font-size:10px;color:#b9c2cc; }
.detail-section pre { max-height:220px;overflow:auto;padding:12px;border:1px solid var(--line-soft);border-radius:8px;background:#080b10;color:#9daeBD;font:9px/1.55 ui-monospace,monospace;white-space:pre-wrap; }
.toast-stack { position:fixed;z-index:80;right:18px;bottom:18px;display:flex;flex-direction:column;gap:7px; }
.toast { min-width:260px;max-width:390px;padding:11px 13px;border:1px solid #35404d;border-radius:9px;background:#131922;box-shadow:0 12px 35px rgba(0,0,0,.4);font-size:10px;animation:toastin .2s ease; }
.toast.success{border-color:rgba(78,227,154,.35)}.toast.error{border-color:rgba(255,96,116,.4)}
@keyframes toastin{from{transform:translateY(8px);opacity:0}}

/* Readability pass: the original console typography was too small at 125% Windows scaling. */
.brand strong { font-size:calc(19px + var(--font-boost)); }
.brand small,.eyebrow,.live-indicator,.event time { font-size:calc(9px + var(--font-boost)); }
.step-heading h2 { font-size:calc(16px + var(--font-boost)); }
.step-heading p,.tabs button,input,select,.drop-zone strong,button.secondary,.import-summary strong,.kernel-card strong,.task-copy strong { font-size:calc(12px + var(--font-boost)); }
textarea { font-size:calc(11px + var(--font-boost)); }
.field-hint,.field-label,.optional-block summary,.metric-card span,.view-meta,.toast,.detail-stat strong { font-size:calc(11px + var(--font-boost)); }
.drop-zone small,.import-summary small,.two-col label span,.settings-section label span,.check-tile,.switch-line,.service-list label,.metric-card small,.task-copy small,.small-button,.event,.history-item strong,.muted-copy,.modal header p,.key-field > label,.vault-note,.detail-section h3 { font-size:calc(10px + var(--font-boost)); }
.kernel-card small,.kernel-card b,.optional-block summary span,.optional-block p,.history-item small,.history-item b,.key-field label b,.settings-section .clear-option,.detail-stat span,.detail-section pre { font-size:calc(9px + var(--font-boost)); }
button.primary strong { font-size:calc(14px + var(--font-boost)); }
button.primary small { font-size:calc(10px + var(--font-boost)); }
.panel-header h1,.modal h2 { font-size:calc(19px + var(--font-boost)); }
.card-heading h2 { font-size:calc(15px + var(--font-boost)); }
.settings-section h3 { font-size:calc(13px + var(--font-boost)); }
th { font-size:calc(9px + var(--font-boost)); }
td { font-size:calc(11px + var(--font-boost)); }
.cell-sub,.status-badge,.risk-badge,.type-badge { font-size:calc(9px + var(--font-boost)); }
.empty-state h3 { font-size:calc(14px + var(--font-boost)); }
.empty-state p { font-size:calc(11px + var(--font-boost)); }

/* Light theme keeps the same information hierarchy without the near-black surfaces. */
html[data-theme="light"] {
  --bg:#edf3fb;--panel:#ffffff;--panel-2:#f6f9fd;--line:#ccd7e5;--line-soft:#dde5ef;
  --text:#0d1728;--muted:#53647a;--muted-2:#738198;--lime:#278a1e;--lime-2:#2f971e;
  --cyan:#087fb1;--amber:#a36500;--red:#c82745;--green:#087a4b;
}
html[data-theme="dark"] { color-scheme:dark; }
html[data-theme="light"] { color-scheme:light; }
html[data-theme="light"] body { background:radial-gradient(circle at 72% -20%,rgba(81,142,225,.13),transparent 38%),var(--bg); }
html[data-theme="light"] .noise { opacity:.018; }
html[data-theme="light"] .topbar { background:rgba(255,255,255,.92); }
html[data-theme="light"] .control-rail { background:linear-gradient(180deg,rgba(250,252,255,.98),rgba(239,245,252,.98)); }
html[data-theme="light"] .health-pill,html[data-theme="light"] .icon-button,html[data-theme="light"] textarea,html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] .tabs,html[data-theme="light"] .tab-panel,html[data-theme="light"] .drop-zone,html[data-theme="light"] .kernel-card,html[data-theme="light"] .check-tile,html[data-theme="light"] .optional-block,html[data-theme="light"] .history-item,html[data-theme="light"] .detail-stat { background:#fff; }
html[data-theme="light"] textarea:focus,html[data-theme="light"] input:focus,html[data-theme="light"] select:focus { background:#fff; }
html[data-theme="light"] .tabs button.active,html[data-theme="light"] .small-button,html[data-theme="light"] .row-action { background:#e8eef7; }
html[data-theme="light"] button.secondary { background:#edf3fa;color:#17243a;border-color:#c7d3e2; }
html[data-theme="light"] button.secondary:hover { background:#e2eaf5;border-color:#aebed1; }
html[data-theme="light"] button.danger { color:#b71f3b; }
html[data-theme="light"] .run-dock button.primary { color:#10200d; }
html[data-theme="light"] .run-dock,html[data-theme="light"] .results-panel,html[data-theme="light"] th { background:#f8fbff; }
html[data-theme="light"] .authorization-card { border-color:#c8d8e8;background:#f2f7fc; }
html[data-theme="light"] .authorization-card label { color:#223348; }

/* Standalone local compliance and privacy page. */
body.legal-page { min-height:100vh;overflow:auto;background:var(--bg);color:var(--text); }
.legal-shell { width:min(980px,calc(100% - 40px));margin:36px auto 70px; }
.legal-hero,.legal-section { border:1px solid var(--line);border-radius:16px;background:var(--panel);box-shadow:0 18px 60px rgba(0,0,0,.15); }
.legal-hero { padding:32px; }
.legal-hero h1 { margin:6px 0 10px;font-size:30px; }
.legal-hero p,.legal-section p,.legal-section li { color:var(--muted);font-size:14px;line-height:1.75; }
.legal-nav { display:flex;flex-wrap:wrap;gap:9px;margin-top:20px; }
.legal-nav a,.legal-back { display:inline-flex;align-items:center;min-height:38px;padding:0 14px;border:1px solid var(--line);border-radius:9px;color:var(--text);text-decoration:none;background:var(--panel-2); }
.legal-nav a:hover,.legal-back:hover { border-color:var(--lime); }
.legal-section { margin-top:16px;padding:26px 30px; }
.legal-section h2 { margin:0 0 11px;font-size:21px; }
.legal-section h3 { margin:22px 0 7px;font-size:16px; }
.legal-section ul { padding-left:22px; }
.legal-section a { color:#66bfff; }
.legal-warning { border-left:4px solid var(--amber);padding:12px 14px;background:rgba(255,189,74,.06);color:var(--text);line-height:1.65; }
@media (max-width:640px){.legal-shell{width:min(100% - 22px,980px);margin-top:14px}.legal-hero,.legal-section{padding:20px}.legal-hero h1{font-size:24px}}
@media (max-width:640px){.settings-modal footer button{width:auto;min-width:0;flex:1 1 0;}}
html[data-theme="light"] .metric-card { background:linear-gradient(145deg,#fff,#f3f7fc); }
html[data-theme="light"] .metric-card.accent { background:linear-gradient(145deg,rgba(72,173,46,.13),#fff 70%); }
html[data-theme="light"] .task-strip,html[data-theme="light"] .activity-card,html[data-theme="light"] .history-card,html[data-theme="light"] .modal { background:#fff;box-shadow:0 18px 55px rgba(45,69,98,.12); }
html[data-theme="light"] .filter-bar { background:#f5f8fc; }
html[data-theme="light"] .selection-bar { background:#f5f8fc; }
html[data-theme="light"] .saved-key,html[data-theme="light"] .history-actions button,html[data-theme="light"] .key-eye,html[data-theme="light"] .key-remove { background:#eef3f9; }
html[data-theme="light"] td { color:#34445a;border-bottom-color:#e2e8f1; }
html[data-theme="light"] .cell-main { color:#142138; }
html[data-theme="light"] tbody tr:hover { background:#f1f6fc; }
html[data-theme="light"] .modal-backdrop { background:rgba(32,48,69,.42); }
html[data-theme="light"] .detail-section pre { background:#f4f7fb;color:#33455c; }
html[data-theme="light"] .toast { background:#fff;box-shadow:0 12px 35px rgba(44,65,91,.18); }

@media(max-width:1300px){.filter-bar{grid-template-columns:minmax(220px,1fr) repeat(4,112px)}.workspace{padding-left:18px;padding-right:18px}.app-shell{grid-template-columns:338px minmax(0,1fr)}}
@media(max-height:760px){.workflow-step{padding-top:18px;padding-bottom:17px}.modal{max-height:92vh}.modal-body{padding-top:14px;padding-bottom:14px}}
@media(max-width:1180px){.preference-grid{grid-template-columns:1fr 1fr}.preference-grid label:last-child{grid-column:1/-1}}
