:root {
  --navy: #0b1728;
  --navy-2: #111f33;
  --canvas: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #142033;
  --muted: #647184;
  --line: #dce2e7;
  --line-strong: #c6cfd7;
  --blue: #2762d9;
  --blue-soft: #edf3ff;
  --mint: #138569;
  --mint-soft: #e8f6f1;
  --amber: #986911;
  --amber-soft: #fbf4df;
  --coral: #a63a4f;
  --coral-soft: #fff0f2;
  --shadow: 0 16px 45px rgba(15, 28, 45, .09);
}

* { box-sizing: border-box; }
html { min-width: 0; color: var(--ink); background: var(--canvas); font-family: Manrope, system-ui, sans-serif; scroll-behavior: smooth; }
body { min-width: 0; min-height: 100vh; margin: 0; overflow-x: clip; background: linear-gradient(180deg, #eef2f5 0, #f7f8f9 300px, var(--canvas) 100%); }
button, input, select, textarea { font: inherit; }
button, .button, input, select { min-height: 44px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #2762d9; outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 10px; padding: 10px 14px; color: #fff; background: var(--navy); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.journey-header { position: sticky; z-index: 20; top: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; color: #fff; background: rgba(11, 23, 40, .98); border-bottom: 1px solid rgba(255,255,255,.1); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--navy); background: #fff; font-weight: 800; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.header-status { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.header-status span { padding: 5px 8px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; font: 500 10px/1 "DM Mono", monospace; }
.header-status b { color: #aeb9c8; font-weight: 600; }

.journey-layout { width: min(1500px, 100%); min-height: calc(100vh - 64px); margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0,1fr); }
.journey-nav { position: sticky; top: 64px; align-self: start; min-height: calc(100vh - 64px); padding: 30px 18px 24px; color: #d9e1ea; background: var(--navy-2); }
.journey-nav > p { margin: 0 12px 20px; color: #8493a6; font: 500 11px/1 "DM Mono", monospace; letter-spacing: .09em; text-transform: uppercase; }
.journey-nav ol { margin: 0; padding: 0; list-style: none; }
.journey-nav li { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 10px; align-items: center; padding: 12px; border-radius: 8px; color: #8493a6; }
.journey-nav li > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #435267; border-radius: 50%; font: 500 11px/1 "DM Mono", monospace; }
.journey-nav li strong, .journey-nav li small { display: block; }
.journey-nav li strong { color: #c8d2de; font-size: 12px; }
.journey-nav li small { margin-top: 3px; font-size: 10px; line-height: 1.35; }
.journey-nav li.current { color: #fff; background: #192b43; }
.journey-nav li.current > span { border-color: #fff; color: var(--navy); background: #fff; }
.journey-nav li.complete { color: #8ee1c9; }
.journey-nav li.complete > span { border-color: var(--mint); color: #fff; background: var(--mint); }
.journey-nav li.future-result { color: #6f7f93; }
.journey-nav li.future-result strong { color: #9aa8b9; }
.nav-boundary { margin: 26px 10px 0; padding: 14px; border: 1px solid #35475e; border-radius: 8px; background: #14243a; }
.nav-boundary strong { color: #fff; font-size: 11px; }
.nav-boundary p { margin: 6px 0 0; color: #93a2b5; font-size: 10px; line-height: 1.55; }

.journey-shell { min-width: 0; padding: 44px clamp(22px, 4vw, 64px) 70px; }
.journey-step { width: min(1100px, 100%); margin: 0 auto; }
.step-heading { max-width: 780px; margin-bottom: 28px; }
.step-heading.with-status { max-width: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font: 500 11px/1 "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 820px; margin: 0; color: var(--navy); font-size: clamp(31px, 4vw, 52px); line-height: 1.03; letter-spacing: -.045em; }
h2 { margin: 0; color: var(--navy); font-size: 17px; letter-spacing: -.02em; }
.lead { max-width: 720px; margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.journey-message { width: min(1100px, 100%); margin: 0 auto 18px; padding: 11px 13px; border: 1px solid #e5b8c0; border-radius: 7px; color: #7d2638; background: var(--coral-soft); font-size: 12px; }

.panel { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 1px 2px rgba(14,27,42,.03); }
.form-card { display: grid; gap: 15px; padding: 24px; }
.form-card label, .upload-card label { display: grid; gap: 7px; color: #526174; font-size: 12px; font-weight: 700; }
input, select { width: 100%; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: #fff; }
textarea { width: 100%; min-height: 96px; padding: 10px 11px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: #fff; }
input::placeholder { color: #929eaa; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; text-decoration: none; font-size: 12px; font-weight: 800; }
.button.primary { color: #fff; background: var(--blue); }
.button.secondary { color: var(--navy); border-color: var(--line-strong); background: #fff; }
.button.quiet { color: var(--muted); border-color: transparent; background: transparent; }
.button:disabled, .button[aria-disabled="true"] { cursor: not-allowed; opacity: .42; }
.security-note, .field-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.security-note { padding: 11px 12px; border-left: 3px solid var(--amber); background: var(--amber-soft); }
.security-note strong { color: #6f4b0d; }

.signin-layout { display: grid; grid-template-columns: minmax(0,500px) minmax(280px,380px); gap: 20px; align-items: stretch; }
.assurance-card { padding: 26px; color: #dce6ef; border-radius: 10px; background: var(--navy); box-shadow: var(--shadow); }
.assurance-card > span { color: #8ca0b7; font: 500 10px/1 "DM Mono", monospace; letter-spacing: .11em; }
.assurance-card h2 { margin-top: 14px; color: #fff; font-size: 24px; line-height: 1.2; }
.assurance-card ul { margin: 24px 0 0; padding: 0; list-style: none; }
.assurance-card li { position: relative; padding: 10px 0 10px 25px; border-bottom: 1px solid rgba(255,255,255,.09); font-size: 12px; }
.assurance-card li::before { content: "✓"; position: absolute; left: 0; color: #64d3b3; }

.control-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.control-card { min-height: 360px; display: flex; flex-direction: column; align-items: flex-start; padding: 26px; text-align: left; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); cursor: pointer; box-shadow: 0 4px 18px rgba(14,27,42,.04); }
.control-card:hover { border-color: #9ab2df; transform: translateY(-1px); }
.control-card[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,98,217,.12), var(--shadow); }
.control-card > span { color: var(--blue); font: 500 10px/1 "DM Mono", monospace; letter-spacing: .1em; }
.control-card h2 { margin-top: 18px; font-size: 25px; }
.control-card p { margin: 12px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.control-card ul { margin: 8px 0 24px; padding-left: 19px; color: #455468; font-size: 12px; line-height: 1.7; }
.control-card > b { margin-top: auto; color: var(--blue); font-size: 12px; }
.step-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.count-pill { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 11px; }
.count-pill b { color: var(--navy); font: 500 15px/1 "DM Mono", monospace; }
.workspace-grid, .upload-grid { display: grid; grid-template-columns: minmax(320px,.7fr) minmax(0,1.3fr); gap: 18px; align-items: start; }
.workspace-grid > *, .upload-grid > *, .progress-layout > * { min-width: 0; }
.compact-form { padding: 20px; }
.form-row { display: grid; grid-template-columns: .55fr 1.45fr; gap: 10px; }
.panel-title { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-title span { display: block; margin-bottom: 5px; color: var(--muted); font: 500 9px/1 "DM Mono", monospace; letter-spacing: .09em; }
.text-action { border: 0; color: var(--blue); background: none; cursor: pointer; font-size: 11px; font-weight: 800; }
.table-scroll { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 660px; border-collapse: collapse; }
th { padding: 10px 13px; color: var(--muted); background: var(--surface-soft); text-align: left; font: 500 9px/1.2 "DM Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 13px; border-top: 1px solid var(--line); color: #334155; font-size: 11px; vertical-align: top; }
.empty-row td { padding: 34px 13px; color: var(--muted); text-align: center; }
.account-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.row-edit, .row-remove { min-height: 32px; padding: 4px 8px; border: 0; background: none; cursor: pointer; font-size: 11px; font-weight: 800; }
.row-edit { color: var(--blue); }
.row-remove { color: var(--coral); }
.role-pill, .hash-pill { display: inline-block; padding: 4px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font: 500 9px/1 "DM Mono", monospace; white-space: nowrap; }
.hash-cell { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "DM Mono", monospace; }

.upload-card { display: grid; gap: 14px; justify-items: stretch; padding: 25px; border: 1px dashed #b7c3cf; text-align: center; }
.upload-card > p { margin: -5px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.upload-card label { text-align: left; }
.upload-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto; border-radius: 14px; color: var(--blue); background: var(--blue-soft); font-size: 26px; }
.file-picker { min-height: 70px; place-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--blue) !important; background: var(--surface-soft); cursor: pointer; text-align: center !important; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.statement-workspace { width: 100%; }
.statement-panel { width: 100%; overflow: hidden; }
.statement-panel-title { align-items: center; }
.statement-table-wrap { width: 100%; max-width: 100%; overflow-x: hidden; }
.statement-table { width: 100%; min-width: 0; table-layout: fixed; }
.statement-col-file { width: 24%; }
.statement-col-account { width: 17%; }
.statement-col-size { width: 8%; }
.statement-col-hash { width: 25%; }
.statement-col-state { width: 16%; }
.statement-col-action { width: 10%; }
.statement-table th, .statement-table td { overflow-wrap: anywhere; }
.statement-table .hash-cell { max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statement-table .row-remove { width: 100%; text-align: right; }
.statement-upload-dialog, .statement-removal-dialog { width: min(620px, calc(100vw - 32px)); }
.upload-dialog-body > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }

.run-state { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: var(--amber); background: var(--amber-soft); font: 500 10px/1 "DM Mono", monospace; }
.run-state.running { color: var(--blue); background: var(--blue-soft); }
.run-state.complete { color: var(--mint); background: var(--mint-soft); }
.run-state.stale { color: var(--coral); background: var(--coral-soft); }
.progress-layout { display: grid; grid-template-columns: minmax(300px,.75fr) minmax(0,1.25fr); gap: 18px; align-items: start; }
.run-summary { padding-bottom: 20px; }
.run-summary dl { margin: 0; padding: 5px 18px 16px; }
.run-summary dl div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.run-summary dt { color: var(--muted); }
.run-summary dd { margin: 0; text-align: right; font-weight: 700; }
.run-summary .button { width: calc(100% - 36px); margin: 0 18px; }
.simulation-warning { margin: 0 18px 16px; padding: 12px; border: 1px solid #ead6a4; border-radius: 7px; background: var(--amber-soft); }
.simulation-warning strong { color: var(--amber); font-size: 11px; }
.simulation-warning p { margin: 5px 0 0; color: #73520f; font-size: 10px; line-height: 1.5; }
.progress-panel { padding-bottom: 8px; }
.progress-track { height: 6px; margin: 18px; overflow: hidden; border-radius: 99px; background: #e6ebef; }
.progress-track i { width: 0; height: 100%; display: block; background: var(--blue); transition: width .28s ease; }
.progress-stages { margin: 0; padding: 0 18px 10px; list-style: none; }
.progress-stages li { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.progress-stages li > span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font: 500 10px/1 "DM Mono", monospace; }
.progress-stages strong, .progress-stages small { display: block; }
.progress-stages strong { font-size: 11px; }
.progress-stages small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.progress-stages li.active > span { border-color: var(--blue); color: #fff; background: var(--blue); }
.progress-stages li.active small { color: var(--blue); }
.progress-stages li.complete > span { border-color: var(--mint); color: #fff; background: var(--mint); }
.progress-stages li.complete small { color: var(--mint); }
.completion-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 22px; border: 1px solid #a9dacb; border-radius: 10px; background: var(--mint-soft); }
.completion-card span { color: var(--mint); font: 500 9px/1 "DM Mono", monospace; letter-spacing: .1em; }
.completion-card h2 { margin-top: 7px; }
.completion-card p { margin: 7px 0 0; color: #3b6c5d; font-size: 11px; line-height: 1.5; }

@media (max-width: 980px) {
  .journey-layout { grid-template-columns: 210px minmax(0,1fr); }
  .journey-shell { padding: 34px 24px 60px; }
  .signin-layout, .workspace-grid, .upload-grid, .progress-layout { grid-template-columns: minmax(0,1fr); }
  .assurance-card { order: -1; }
}

@media (max-width: 700px) {
  .journey-header { height: 58px; padding: 0 16px; }
  .header-status b { display: none; }
  .journey-layout { display: block; min-height: calc(100vh - 58px); }
  .journey-nav { position: static; min-height: 0; padding: 10px 12px; overflow-x: auto; }
  .journey-nav > p, .nav-boundary { display: none; }
  .journey-nav ol { min-width: 650px; display: grid; grid-template-columns: repeat(6,1fr); }
  .journey-nav li { min-width: 0; grid-template-columns: 26px minmax(0,1fr); gap: 6px; padding: 8px; }
  .journey-nav li > span { width: 23px; height: 23px; }
  .journey-nav li strong { font-size: 9px; }
  .journey-nav li small { display: none; }
  .journey-shell { padding: 28px 16px 48px; }
  .step-heading.with-status { display: block; }
  .count-pill, .run-state { margin-top: 16px; }
  .control-grid { grid-template-columns: 1fr; }
  .control-card { min-height: 320px; }
  .form-row { grid-template-columns: 1fr; }
  .step-actions { flex-direction: column-reverse; }
  .step-actions .button { width: 100%; }
  .completion-card { align-items: stretch; flex-direction: column; }
  .completion-card .button { width: 100%; }
  .statement-panel-title { align-items: stretch; flex-direction: column; }
  .statement-panel-title .button { width: 100%; }
  .statement-table, .statement-table tbody { display: block; }
  .statement-table colgroup, .statement-table thead { display: none; }
  #statementRows { display: grid; gap: 10px; padding: 12px; }
  #statementRows tr { display: grid; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
  #statementRows td { display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
  #statementRows td:first-child { border-top: 0; }
  #statementRows td::before { content: attr(data-label); color: var(--muted); font: 500 9px/1.4 "DM Mono", monospace; letter-spacing: .05em; text-transform: uppercase; }
  #statementRows .hash-cell { white-space: normal; word-break: break-all; }
  #statementRows .empty-row { display: block; }
  #statementRows .empty-row td { display: block; border: 0; }
  #statementRows .empty-row td::before { content: none; }
}

@media (max-width: 380px) {
  .journey-shell { padding-left: 12px; padding-right: 12px; }
  h1 { font-size: 30px; }
  .form-card, .control-card, .upload-card { padding: 18px; }
  .panel-title { padding-left: 14px; padding-right: 14px; }
}

.run-shell { max-width: 1180px; margin: 0 auto; padding: 42px 28px 64px; }
.back-link { display: inline-flex; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 13px; }
.back-link:hover { color: var(--ink); }
.run-hero { margin-bottom: 18px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.progress-head strong { color: var(--ink); font-family: "DM Mono", monospace; }
.run-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 18px; margin-bottom: 18px; }
.panel-head { min-height: 72px; display: flex; align-items: center; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.panel-kicker { margin: 0 0 6px; color: var(--muted); font: 500 9px/1 "DM Mono", monospace; letter-spacing: .09em; }
.blocker-list { display: grid; gap: 10px; }
.run-grid .blocker-list { padding: 14px 16px 16px; }
.blocker-card { min-width: 0; max-width: 100%; padding: 14px 15px; border: 1px solid #f0c8c8; border-left: 4px solid var(--danger); border-radius: 10px; background: #fff8f8; }
.blocker-card strong { display: block; margin-bottom: 6px; font: 600 12px "DM Mono", monospace; color: #9b3030; overflow-wrap: anywhere; }
.blocker-card p { margin: 0; color: #633; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; }
.blocker-clear { padding: 14px; border-radius: 10px; background: var(--success-soft); color: #1f6b51; font-weight: 700; }
.run-shell .panel { min-width: 0; }
.run-shell .progress-stages { margin-top: 0; }
.progress-stages li.blocked > span { background: var(--danger-soft); color: var(--danger); border-color: #f0c8c8; }
.progress-stages li.blocked small { color: var(--danger); }

#safeguardingWorkspace { margin-top: 18px; display: grid; gap: 18px; }
.run-work-area { display: grid; gap: 18px; scroll-margin-top: 84px; }
#runOverview, #movements, #auditHistory { scroll-margin-top: 84px; }
.movement-panel { width: 100%; overflow: hidden; }
.movement-panel-title b { max-width: 360px; color: var(--ink); text-align: right; }
.movement-table-wrap { width: 100%; max-width: 100%; overflow: visible; }
.movement-table { width: 100%; min-width: 0; table-layout: fixed; }
.movement-table .movement-col-date { width: 9%; }
.movement-table .movement-col-account { width: 13%; }
.movement-table .movement-col-row { width: 7%; }
.movement-table .movement-col-description { width: 26%; }
.movement-table .movement-col-currency { width: 7%; }
.movement-table .movement-col-amount { width: 10%; }
.movement-table .movement-col-decision { width: 18%; }
.movement-table .movement-col-action { width: 10%; }
.movement-table th, .movement-table td { padding: 12px 11px; overflow-wrap: anywhere; }
.movement-table th { color: #536174; font-size: 9px; }
.movement-table td { color: #2f3f53; font-size: 11px; }
.movement-table th:nth-child(3), .movement-table td:nth-child(3),
.movement-table th:nth-child(5), .movement-table td:nth-child(5) { text-align: center; }
.movement-table th:nth-child(6), .movement-table td:nth-child(6) { text-align: right; }
.movement-table .movement-description-cell { color: #172033; font-size: 12px; line-height: 1.5; }
.movement-table .movement-amount-cell { white-space: nowrap; color: #172033; font-weight: 800; font-variant-numeric: tabular-nums; }
.movement-table .role-pill { max-width: 100%; white-space: normal; line-height: 1.35; }
.movement-edit-action { width: 100%; min-height: 44px; padding: 6px 9px; white-space: nowrap; border: 1px solid #bed0ef; border-radius: 7px; color: var(--blue); background: #fff; text-align: center; }
.movement-edit-action:hover { border-color: var(--blue); background: var(--blue-soft); }
#movementRows tr.selected-row { background: var(--blue-soft); }
.movement-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.movement-pagination[hidden] { display: none; }
.movement-page-controls, .movement-page-buttons { display: flex; align-items: center; gap: 6px; }
.compact-button { min-height: 38px; padding: 7px 12px; }
.movement-page-button { min-width: 38px; min-height: 38px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--navy); background: #fff; cursor: pointer; font-weight: 800; }
.movement-page-button[aria-current="page"] { color: #fff; border-color: var(--blue); background: var(--blue); }
.movement-action-status { min-height: 18px; margin: 0; padding: 0 18px 14px; color: #1f6b51; font-size: 11px; font-weight: 700; }

.decision-dialog { width: min(780px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 28px 80px rgba(15, 27, 45, .28); }
.decision-dialog::backdrop { background: rgba(15, 27, 45, .62); }
.decision-dialog-card { display: flex; max-height: calc(100vh - 34px); flex-direction: column; }
.decision-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px 17px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.decision-dialog-header span { display: block; margin-bottom: 5px; color: var(--muted); font: 500 9px/1 "DM Mono", monospace; letter-spacing: .09em; }
.decision-dialog-header h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.decision-dialog-body { display: grid; gap: 14px; padding: 20px 22px; overflow-y: auto; }
.decision-dialog-body label { display: grid; gap: 7px; color: #526174; font-size: 12px; font-weight: 700; }
.decision-source-summary { margin: 0 0 2px; padding: 12px 14px; border-radius: 8px; color: #455468; background: var(--blue-soft); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.decision-dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fff; }
.decision-dialog-actions .button { min-width: 130px; }
.account-removal-dialog, .account-edit-dialog { width: min(620px, calc(100vw - 32px)); }
.account-removal-warning, .account-edit-impact { padding: 13px 14px; border: 1px solid #f0c8c8; border-left: 4px solid var(--coral); border-radius: 8px; background: #fff8f8; }
.account-removal-warning strong, .account-edit-impact strong { display: block; margin-bottom: 5px; color: #8f2f2f; font-size: 12px; }
.account-removal-warning p, .account-edit-impact p { margin: 0; color: #633; font-size: 11px; line-height: 1.55; }
.account-removal-confirm { color: #fff; background: var(--coral); }
.account-edit-dialog :disabled { color: #718096; background: #f1f4f7; cursor: not-allowed; }
#calendarRows td div, #calendarRows td small { display: block; }
#calendarRows td small { color: var(--muted); }
.export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.export-actions[hidden] { display: none; }

.review-state { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: var(--amber); background: var(--amber-soft); font: 500 10px/1 "DM Mono", monospace; }
.review-state.submitted { color: var(--blue); background: var(--blue-soft); }
.review-state.approved { color: var(--mint); background: var(--mint-soft); }
.review-state.rejected, .review-state.stale { color: var(--coral); background: var(--coral-soft); }
.review-meta { margin: 12px 0 0; display: grid; gap: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.review-meta strong { color: var(--ink); }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.review-actions[hidden] { display: none; }
.review-actions .button[hidden] { display: none; }

@media (max-width: 760px) {
  .run-shell { padding: 26px 14px 48px; }
  .run-grid { grid-template-columns: minmax(0, 1fr); }
  .movement-panel-title { align-items: flex-start; flex-direction: column; }
  .movement-panel-title b { max-width: none; text-align: left; }
  .movement-table-wrap { padding: 12px; }
  .movement-table, .movement-table tbody { display: block; }
  .movement-table colgroup, .movement-table thead { display: none; }
  #movementRows { display: grid; gap: 10px; }
  #movementRows tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
  #movementRows tr.selected-row { border-color: #9ab4f5; }
  #movementRows td { display: grid; min-width: 0; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--line); grid-template-columns: 76px minmax(0, 1fr); gap: 8px; text-align: left; overflow-wrap: anywhere; }
  #movementRows td::before { content: attr(data-label); color: var(--muted); font: 500 8px/1.35 "DM Mono", monospace; letter-spacing: .05em; text-transform: uppercase; }
  #movementRows .movement-description-cell, #movementRows td:last-child { grid-column: 1 / -1; }
  #movementRows td:last-child { border-bottom: 0; }
  #movementRows .empty-row { display: block; }
  #movementRows .empty-row td { display: block; }
  #movementRows .empty-row td::before { content: none; }
  .movement-edit-action { width: auto; min-height: 44px; justify-self: start; }
  .movement-pagination { align-items: flex-start; flex-direction: column; }
  .movement-page-controls { width: 100%; justify-content: space-between; }
  .decision-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .decision-dialog-card { max-height: calc(100vh - 22px); }
  .decision-dialog-header, .decision-dialog-body, .decision-dialog-actions { padding-left: 15px; padding-right: 15px; }
  .decision-dialog-header h2 { font-size: 18px; }
  .decision-dialog-body .form-row { grid-template-columns: minmax(0, 1fr); }
  .decision-dialog-actions .button { min-width: 0; flex: 1; }
}
