:root {
  --ink: #11191a;
  --muted: #667274;
  --line: #d8e0df;
  --surface: #ffffff;
  --canvas: #f1f5f4;
  --sidebar: #0b1112;
  --green: #12805d;
  --green-soft: #e5f4ee;
  --cyan: #007f95;
  --cyan-soft: #e3f3f5;
  --amber: #a96105;
  --amber-soft: #fff2dc;
  --red: #bd3b36;
  --red-soft: #ffedeb;
  --radius: 4px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .72; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; line-height: 1.2; }
h2 { margin-bottom: 0; font-size: 18px; }
h3 { margin-bottom: 8px; font-size: 15px; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 24px 16px; color: #f7f8fa; background: var(--sidebar); border-right: 1px solid #243032; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid #2bc3d6; border-radius: 4px; color: #72e4ef; background: #102326; box-shadow: 0 0 22px rgba(43, 195, 214, .16); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 14px; }
.brand span { margin-top: 2px; color: #aeb5c0; font-size: 11px; }
.nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: 3px; color: #9cabad; background: transparent; text-align: left; }
.nav-item:hover { color: white; border-color: #263638; background: #111b1d; }
.nav-item.active { color: #e9ffff; border-color: #234447; background: #122124; box-shadow: inset 3px 0 #25bfd0; }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: auto; padding: 0 5px; border-radius: 10px; color: white; background: var(--amber); font-size: 10px; }
.nav-count[hidden] { display: none; }
.nav-item svg, .text-button svg, .button svg, .icon-button svg, .section-heading > svg { width: 17px; height: 17px; flex: 0 0 17px; }
.sidebar-foot { display: grid; gap: 14px; margin-top: auto; padding: 16px 8px 0; border-top: 1px solid #343a43; }
.mode-badge { display: flex; align-items: center; gap: 8px; color: #d8dde4; font-size: 11px; font-weight: 700; }
.sidebar .text-button { color: #bfc5ce; }

.main { min-width: 0; padding: 28px 36px 52px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1440px; margin: 0 auto 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.topbar-actions { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: white; }
.icon-button:hover { border-color: #afb5be; background: #fafafa; }
.tab-panel { display: none; max-width: 1440px; margin: 0 auto; }
.tab-panel.active { display: block; }

.status-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 54px; padding: 11px 16px; border: 1px solid #c9d9d8; border-left: 4px solid var(--cyan); border-radius: var(--radius); background: #fbfdfd; box-shadow: 0 8px 24px rgba(20, 39, 39, .04); }
.status-strip > div { display: flex; align-items: center; gap: 9px; }
.status-strip strong { font-size: 13px; }
.status-strip .muted { font-size: 12px; }
.status-meta { gap: 20px !important; color: var(--muted); font-size: 12px; }
.status-meta strong { margin-left: 4px; color: var(--ink); }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #9aa1ac; }
.status-dot.green { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status-dot.amber { background: var(--amber); }
.status-dot.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.amber-text { color: var(--amber) !important; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.metric { position: relative; min-height: 118px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 24px rgba(20, 39, 39, .035); }
.metric::before { content: ""; position: absolute; top: -1px; left: 17px; width: 34px; height: 2px; background: var(--cyan); }
.metric span, .metric small { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin: 9px 0 4px; font-size: 28px; line-height: 1; }
.overview-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.section-block { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 10px 30px rgba(20, 39, 39, .035); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.page-section-heading { margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; margin-bottom: 14px; }
.page-toolbar > p { margin: 0; color: var(--muted); font-size: 13px; }
.wallet-actions { display: flex; align-items: center; gap: 8px; }
.portfolio-summary { display: grid; grid-template-columns: .8fr .9fr 1.45fr 1.15fr; gap: 12px; margin-bottom: 14px; }
.portfolio-summary article { min-width: 0; min-height: 112px; padding: 17px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.portfolio-summary article span, .portfolio-summary article small { display: block; color: var(--muted); font-size: 11px; }
.portfolio-summary article strong { display: block; margin: 12px 0 7px; overflow-wrap: anywhere; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.portfolio-summary .portfolio-primary { border-top: 3px solid var(--green); padding-top: 15px; }
.portfolio-summary .portfolio-primary strong { color: #126b4b; }
.custody-summary { display: flex; align-items: center; gap: 22px; min-height: 40px; margin-bottom: 14px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: white; font-size: 11px; }
.custody-summary span { display: inline-flex; align-items: center; gap: 6px; }
.custody-summary svg { width: 14px; height: 14px; }
.event-section { margin-top: 16px; }
.health-list { margin: 0; }
.health-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #eceef1; }
.health-list div:first-child { border-top: 0; }
.health-list dt { color: var(--muted); font-size: 13px; }
.health-list dd { margin: 0; font-size: 13px; font-weight: 650; }
.compact-health-list div:last-child { padding-bottom: 0; }
.lock-state { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.section-block > .muted { max-width: 58ch; font-size: 13px; line-height: 1.6; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 3px; font-weight: 650; font-size: 13px; }
.button.primary { color: white; background: var(--green); }
.button.primary:hover { background: #0f7650; }
.button.secondary { border-color: var(--line); color: var(--ink); background: white; }
.button.secondary:hover { border-color: #afb5be; background: #fafafa; }
.button.danger { color: var(--red); background: var(--red-soft); border-color: #f1c5c2; }
.button.wide { width: 100%; }
.text-button { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: var(--cyan); background: transparent; font-size: 12px; font-weight: 650; }
.chip { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border: 1px solid #d9dde2; border-radius: 4px; color: #535a65; background: #f8f9fa; font-size: 11px; font-weight: 700; }
.amber-chip { color: var(--amber); border-color: #eed4a6; background: var(--amber-soft); }
.green-chip { color: var(--green); border-color: #b8dfce; background: var(--green-soft); }
.red-chip { color: var(--red); border-color: #f1c5c2; background: var(--red-soft); }
.neutral-chip { color: var(--muted); border-color: var(--line); background: #f5f6f7; }

.event-list { display: grid; gap: 0; }
.event-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 11px; align-items: start; padding: 12px 0; border-top: 1px solid #eceef1; }
.event-item:first-child { border-top: 0; padding-top: 0; }
.event-item h3 { margin: 0 0 4px; font-size: 13px; }
.event-item p { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: pre-line; }
.event-time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.event-list.tall { max-height: 620px; overflow: auto; }
.event-severity { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #8f97a2; }
.event-severity.p0, .event-severity.error { background: var(--red); }
.event-severity.p1 { background: var(--amber); }
.empty-state { padding: 28px 0; color: var(--muted); text-align: center; font-size: 13px; }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table-panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 10px 30px rgba(20, 39, 39, .035); }
.data-table-panel th:first-child, .data-table-panel td:first-child { border-left: 0; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 12px; border-bottom: 1px solid var(--line); color: #526163; background: #f4f8f7; text-align: left; font-weight: 700; white-space: nowrap; }
td { padding: 14px 12px; border-bottom: 1px solid #eceef1; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.selection-cell { width: 42px; padding-right: 8px; padding-left: 12px; text-align: center; }
.row-checkbox { width: 16px; height: 16px; margin: 0; accent-color: var(--green); cursor: pointer; vertical-align: middle; }
.row-checkbox:disabled { cursor: not-allowed; opacity: .4; }
tbody tr:hover { background: #fafcfc; }
.address { display: inline-block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.tx-link { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-decoration: none; }
.tx-link:hover { text-decoration: underline; }
.transaction-error { display: block; max-width: 260px; margin-top: 5px; overflow: hidden; color: var(--red); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.user-name { display: block; font-weight: 650; }
.user-id { color: var(--muted); font-size: 11px; }
.switch { position: relative; display: inline-flex; align-items: center; width: 38px; height: 22px; padding: 0; border: 0; border-radius: 11px; background: #c5cad1; }
.switch::after { content: ""; position: absolute; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .18s ease; }
.switch.active { background: var(--green); }
.switch.active::after { transform: translateX(16px); }
.strategy-control { display: inline-flex; align-items: center; gap: 8px; }
.strategy-control small { min-width: 24px; color: var(--muted); font-size: 11px; }
.evidence-list { display: inline-block; max-width: 280px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.proposal-actions { display: inline-flex; gap: 5px; }
.proposal-actions .icon-button { width: 30px; height: 30px; }
.proposal-actions .icon-button { color: var(--cyan); }
.toolbar-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.signal-layout { display: grid; gap: 16px; }
.settings-list { border-top: 1px solid var(--line); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.setting-row p { max-width: 760px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.setting-form-row { align-items: flex-start; }
.setting-form-row > div:first-child { flex: 1; padding-top: 3px; }
.inline-setting-form { display: flex; align-items: flex-end; gap: 8px; width: min(620px, 52%); }
.inline-setting-form .field { flex: 1; }
.password-setting-form { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)) auto; align-items: end; gap: 8px; width: min(780px, 64%); }
.password-setting-form .field + .field { margin-top: 0; }
.password-setting-form:has(#learning-wallet) { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.password-setting-form:has(#learning-wallet) .dialog-actions { justify-content: flex-end; align-self: end; }
.fee-wallet-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
.fee-wallet-form .dialog-actions { justify-content: flex-end; align-self: end; }
.settings-footnote { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: right; }
.session-badge, .session-authorization { display: inline-flex; align-items: center; gap: 8px; color: #176448; font-size: 12px; font-weight: 700; }
.session-badge { min-height: 34px; padding: 0 10px; border: 1px solid #b8dacc; background: var(--green-soft); }
.session-badge svg, .session-authorization svg { width: 16px; height: 16px; }
.session-authorization { margin: 16px 22px 0; padding: 11px 12px; border-left: 3px solid var(--green); background: var(--green-soft); }
.whitelist-control, .execution-control, .learning-wallet-control { width: min(780px, 64%); }
.whitelist-control .inline-setting-form { width: 100%; }
.whitelist-list { display: flex; flex-wrap: wrap; gap: 7px; min-height: 36px; margin-top: 10px; padding: 8px; border: 1px solid var(--line); background: #f8faf9; }
.whitelist-list > .muted { align-self: center; padding-left: 3px; font-size: 12px; }
.whitelist-item { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding-left: 9px; border: 1px solid #bfd8d3; color: #145e55; background: #eaf5f2; }
.whitelist-item code { font-size: 11px; }
.whitelist-item button { display: grid; place-items: center; width: 27px; height: 26px; padding: 0; border: 0; border-left: 1px solid #bfd8d3; color: #506563; background: transparent; }
.whitelist-item button:hover { color: var(--red); background: white; }
.whitelist-item svg { width: 13px; height: 13px; }
.whitelist-label { color: var(--green); font-weight: 700; }
.learning-wallet-control { display: grid; gap: 10px; }
.learning-wallet-list { display: grid; gap: 8px; }
.learning-wallet-item { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; align-items: end; gap: 10px; padding: 11px 12px; border: 1px solid #bfd8d3; background: #f4faf8; }
.learning-wallet-main { min-width: 0; }
.learning-wallet-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.learning-wallet-heading strong { font-size: 12px; }
.learning-wallet-main code { display: block; overflow: hidden; color: #0d5d65; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.learning-wallet-main small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.learning-wallet-buttons { display: flex; gap: 7px; }
.learning-wallet-create { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; padding-top: 2px; }
.learning-scope-count { min-height: 54px; padding: 8px 10px; border: 1px solid var(--line); background: #f8faf9; }
.learning-scope-count span, .learning-scope-count strong { display: block; }
.learning-scope-count span { color: var(--muted); font-size: 11px; font-weight: 700; }
.learning-scope-count strong { margin-top: 7px; color: var(--ink); font-size: 12px; }
.learning-wallet-address { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 10px; min-height: 72px; padding: 11px 12px; border: 1px solid #bfd8d3; background: #f4faf8; }
.learning-wallet-address span, .learning-wallet-address code, .learning-wallet-address small { display: block; }
.learning-wallet-address span { margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.learning-wallet-address code { overflow: hidden; color: #0d5d65; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.learning-wallet-address small { margin-top: 6px; color: var(--muted); font-size: 11px; }
.learning-wallet-actions { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; }
.execution-control { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr); gap: 12px; }
.execution-control .segmented-control { grid-column: 1 / -1; }
.execution-control .field + .field { margin-top: 0; }
.segmented-control { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #cbd5d4; background: #f3f6f5; }
.segment { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 12px; border: 0; border-left: 1px solid #cbd5d4; color: #4d5b5d; background: transparent; font-size: 12px; font-weight: 700; }
.segment:first-child { border-left: 0; }
.segment:hover { color: var(--ink); background: white; }
.segment.active { color: white; background: var(--cyan); }
.segment.danger-segment.active { background: var(--red); }
.segment svg { width: 15px; height: 15px; }
.fee-wallet-form { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 10px; width: min(780px, 64%); }
.compact-actions { display: flex; gap: 8px; }

.error-banner { max-width: 1440px; margin: 0 auto 16px; padding: 11px 13px; border: 1px solid #f0c1be; border-radius: 5px; color: #922d29; background: var(--red-soft); font-size: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: 360px; padding: 11px 14px; border-radius: 5px; color: white; background: #252a31; box-shadow: 0 10px 28px rgba(25, 30, 36, .18); font-size: 12px; }

.admin-dialog { width: min(520px, calc(100vw - 40px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid #aebdbc; border-radius: 4px; color: var(--ink); background: white; box-shadow: 0 22px 60px rgba(15, 29, 30, .28); }
.admin-dialog.wide-dialog { width: min(920px, calc(100vw - 40px)); }
.admin-dialog::backdrop { background: rgba(25, 29, 35, .52); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; }
.admin-dialog > .field, .admin-dialog > .risk-callout, .admin-dialog > .preview-form, .admin-dialog > .sweep-preview, .admin-dialog > .sweep-selection-bar { margin-right: 22px; margin-left: 22px; }
.candidate-review-body { max-height: calc(100vh - 190px); padding: 20px 22px 4px; overflow-y: auto; }
.candidate-review-lead { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.candidate-review-lead > div { min-width: 0; }
.candidate-review-lead span:first-child { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.candidate-review-lead .address { max-width: 680px; font-size: 13px; }
.candidate-verdict { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 12px; margin: 18px 0; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #fafbfb; }
.candidate-verdict p { margin: 0; font-size: 13px; line-height: 1.6; }
.candidate-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.candidate-detail-grid section { min-width: 0; }
.candidate-detail-grid h3 { margin-bottom: 9px; color: #4f5660; font-size: 12px; }
.audit-list { min-height: 104px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 5px; list-style: none; }
.audit-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 11px; border-bottom: 1px solid #eceef1; color: #4f5660; font-size: 12px; line-height: 1.45; }
.audit-list li:last-child { border-bottom: 0; }
.audit-list strong { color: var(--green); font-variant-numeric: tabular-nums; }
.caution-list li { justify-content: flex-start; }
.caution-list li::before { content: ""; width: 6px; height: 6px; margin-top: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--amber); }
.candidate-push-reason { margin-top: 18px; padding: 12px; border: 1px solid #efd7aa; border-radius: 5px; color: #6f4b12; background: var(--amber-soft); }
.candidate-push-reason.push-eligible { color: #246246; border-color: #b9decc; background: var(--green-soft); }
.candidate-push-reason > div { display: flex; align-items: center; gap: 8px; }
.candidate-push-reason svg { width: 16px; height: 16px; }
.candidate-push-reason p { margin: 7px 0 0; font-size: 12px; line-height: 1.6; }
.candidate-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.candidate-meta div { min-width: 0; padding: 10px 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.candidate-meta dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.candidate-meta dd { margin: 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.5; }
.candidate-review-actions { flex-wrap: wrap; }
.risk-callout { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; margin-top: 18px; margin-bottom: 18px; padding: 12px; border: 1px solid #efc7c4; border-radius: 5px; color: #852f2b; background: var(--red-soft); }
.risk-callout.amber-callout { color: #7c4d0c; border-color: #efd7aa; background: var(--amber-soft); }
.risk-callout svg { width: 18px; height: 18px; }
.risk-callout p { margin: 0; font-size: 12px; line-height: 1.6; }
.field { display: block; }
.field + .field { margin-top: 14px; }
.field span { display: block; margin-bottom: 7px; color: #4f5660; font-size: 12px; font-weight: 650; }
.field input, .field select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #cfd4da; border-radius: 5px; outline: none; background: white; }
.field input:focus, .field select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.field .checkbox-line { display: flex; align-items: center; min-height: 40px; margin: 0; font-weight: 500; line-height: 1.4; }
.field .checkbox-line input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0 8px 0 0; accent-color: var(--green); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fafbfb; }
.preview-form { display: flex; align-items: flex-end; gap: 10px; }
.preview-form .grow { flex: 1; }
.percentage-field { width: 150px; flex: 0 0 150px; }
.percentage-input { position: relative; display: block; margin: 0 !important; }
.percentage-input input { padding-right: 34px; font-variant-numeric: tabular-nums; }
.percentage-input b { position: absolute; right: 11px; top: 10px; color: var(--muted); font-size: 12px; }
.sweep-selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 42px; margin-bottom: 16px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: #fafbfb; color: var(--muted); font-size: 12px; }
.sweep-selection-bar > div { display: flex; align-items: center; gap: 12px; }
.sweep-selection-bar svg { width: 15px; height: 15px; }
.sweep-selection-bar strong { color: var(--ink); font-size: 14px; }
.muted-action { color: var(--muted); }
.sweep-preview { margin-top: 18px; }
.preview-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 5px; }
.preview-metrics div { padding: 12px; border-left: 1px solid var(--line); }
.preview-metrics div:first-child { border-left: 0; }
.preview-metrics span, .preview-metrics strong { display: block; }
.preview-metrics span { margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.preview-metrics strong { overflow-wrap: anywhere; font-size: 14px; }
.preview-table { max-height: 220px; margin-top: 12px; border: 1px solid var(--line); }
.execution-confirmation { display: grid; grid-template-columns: minmax(260px, 1fr); gap: 12px; width: min(440px, 100%); margin-top: 14px; }
.execution-confirmation .field + .field { margin-top: 0; }
.locked-note { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; color: var(--amber); font-size: 12px; }
.locked-note svg { width: 15px; height: 15px; }
.balance-value { font-variant-numeric: tabular-nums; font-weight: 650; }
.balance-usdt { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.balance-error { color: var(--red); font-size: 11px; }

.login-page { min-height: 100vh; background: #eaf0ef; }
.login-shell { display: grid; grid-template-columns: minmax(300px, 1fr) 400px; width: min(940px, calc(100% - 40px)); min-height: 540px; margin: 8vh auto 0; border: 1px solid #b9c6c5; border-radius: 4px; overflow: hidden; background: white; box-shadow: 0 24px 70px rgba(17, 34, 35, .14); }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 58px; color: white; background: #0b1112; border-right: 1px solid #203033; }
.login-brand::after { content: "ROBINHOOD CHAIN / CONTROL NODE 4663"; position: absolute; right: 24px; bottom: 22px; color: #608084; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.login-brand .brand-mark { width: 44px; height: 44px; margin-bottom: 28px; }
.login-brand h1 { margin-bottom: 16px; font-size: 30px; }
.login-brand > p:not(.eyebrow) { max-width: 400px; color: #c7cdd5; line-height: 1.7; }
.mode-line { display: flex; align-items: center; gap: 9px; margin-top: 32px; color: #dce0e5; font-size: 12px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 44px; }
.login-panel h2 { margin-bottom: 8px; font-size: 22px; }
.login-panel .muted { font-size: 13px; }
.login-form { display: grid; gap: 18px; margin-top: 30px; }
.login-form label span { display: block; margin-bottom: 7px; color: #4f5660; font-size: 12px; font-weight: 650; }
.login-form input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #cfd4da; border-radius: 5px; outline: none; background: white; }
.login-form input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.inline-error { margin: 16px 0 0; padding: 9px 10px; color: #922d29; background: var(--red-soft); border-radius: 4px; font-size: 12px; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 12px 16px; }
  .brand { padding: 0 0 12px; }
  .nav { grid-template-columns: repeat(6, minmax(0, 1fr)); overflow-x: auto; }
  .nav-item { justify-content: center; min-width: 116px; padding: 0 8px; }
  .nav-item.active { box-shadow: inset 0 -3px var(--green); }
  .sidebar-foot { display: none; }
  .main { padding: 20px; }
  .overview-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .nav { grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; }
  .nav-item { min-width: 0; padding: 0 5px; white-space: nowrap; }
  .nav-item span { display: none; }
  .nav-item::after { content: attr(data-short); }
  .main { padding: 16px 12px 36px; }
  .topbar { align-items: flex-end; margin-bottom: 18px; }
  .topbar .eyebrow, #refresh-time { display: none; }
  h1 { font-size: 21px; }
  .status-strip { align-items: flex-start; }
  .status-meta { display: none !important; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .portfolio-summary { grid-template-columns: 1fr; }
  .metric { min-height: 102px; padding: 13px; }
  .metric strong { font-size: 24px; }
  .section-block { padding: 14px; }
  .setting-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .candidate-review-body { padding: 16px 14px 4px; }
  .candidate-review-lead, .candidate-verdict { align-items: flex-start; grid-template-columns: 1fr; flex-direction: column; }
  .candidate-review-lead .address { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .candidate-detail-grid, .candidate-meta { grid-template-columns: 1fr; }
  .candidate-review-actions { justify-content: stretch; padding: 12px 14px; }
  .candidate-review-actions .button { flex: 1 1 calc(50% - 8px); }
  .event-item { grid-template-columns: 10px minmax(0, 1fr); }
  .event-time { grid-column: 2; }
  .login-shell { grid-template-columns: 1fr; width: calc(100% - 24px); margin-top: 12px; }
  .login-brand { min-height: 230px; padding: 32px; }
  .login-brand h1 { font-size: 25px; }
  .login-brand .brand-mark { margin-bottom: 18px; }
  .mode-line { margin-top: 14px; }
  .login-panel { padding: 32px; }
}
