.ops-shortcuts { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin-bottom:32px; }
.ops-shortcuts .button { min-height:76px; justify-content:flex-start; font-size:16px; }
:root {
  color-scheme: light;
  --surface: #ffffff;
  --surface-alt: #f7f7f8;
  --ink: #151515;
  --muted: #686868;
  --line: #dddddf;
  --line-strong: #b8b8bc;
  --accent: #002fa7;
  --accent-soft: #e9efff;
  --danger: #c1121f;
  --danger-soft: #fff0f1;
  --success: #166534;
  --success-soft: #edf8f0;
  --warning: #8a4b08;
  --warning-soft: #fff7e7;
  --max: 1440px;
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
body { margin: 0; background: var(--surface); color: var(--ink); font-size: 14px; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, select, input, textarea { border-radius: 2px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(0, 47, 167, .24); outline-offset: 2px; }
.permission-list { display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 12px; align-items: center; min-width: 0; }
.permission-check { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; font-size: 12px; }
.permission-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.text-action { border: 0; background: transparent; color: var(--accent); padding: 6px 0 0; cursor: pointer; font-weight: 700; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { border-right: 1px solid var(--line); padding: 24px 18px; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; height: 100vh; background: var(--surface); }
.brand { padding: 0 8px 24px; border-bottom: 1px solid var(--ink); }
.brand-mark { width: 30px; height: 30px; background: var(--accent); margin-bottom: 14px; position: relative; }
.brand-mark::after { content: ""; position: absolute; width: 12px; height: 12px; background: white; right: 0; bottom: 0; }
.brand strong { display: block; font-size: 17px; line-height: 1.25; }
.brand span { color: var(--muted); font-size: 12px; display: block; margin-top: 5px; }
.nav { padding-top: 18px; display: grid; gap: 16px; min-height: 0; overflow-y: auto; }
.nav-section { display: grid; gap: 5px; }
.nav-section-label { padding: 0 10px 5px; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1; }
.nav-section-items { display: grid; gap: 4px; }
.nav button { min-height: 40px; border: 0; background: transparent; text-align: left; padding: 0 10px; color: var(--muted); display: flex; align-items: center; gap: 11px; }
.nav button:hover { background: var(--surface-alt); color: var(--ink); }
.nav button.active { color: var(--accent); background: var(--accent-soft); font-weight: 700; border-left: 3px solid var(--accent); padding-left: 7px; }
.nav svg, .icon-button svg, .button svg { width: 17px; height: 17px; stroke-width: 1.8; flex: none; }
.side-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.5; }

.main { min-width: 0; }
.topbar { height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; background: rgba(255,255,255,.96); z-index: 10; }
.topbar-title { font-weight: 700; }
.role-switch { display: flex; align-items: center; gap: 10px; }
.role-switch label { font-size: 12px; color: var(--muted); }
.role-switch select { height: 36px; border: 1px solid var(--line-strong); background: white; padding: 0 30px 0 10px; }
.content { max-width: var(--max); padding: 32px; }
.page-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 28px; }
.page-head h1 { font-size: 30px; line-height: 1.08; margin: 0; font-weight: 700; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 700px; }

.button { min-height: 38px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ink); background: white; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.button:hover { background: var(--surface-alt); }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: #002580; }
.button.danger { color: var(--danger); border-color: var(--danger); }
.button.ghost { border-color: transparent; color: var(--muted); }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: white; padding: 0; }
.account-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-delete { color: var(--danger); border-color: var(--danger); cursor: pointer; }
.account-modal { width: min(720px, 100%); }
.account-modal .permission-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.account-modal .permission-check { white-space: normal; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 28px; }
.metric { min-height: 112px; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { display: block; font-size: 30px; margin-top: 20px; font-variant-numeric: tabular-nums; color: var(--accent); }

.workflow-track { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 28px; border: 1px solid var(--line); }
.workflow-step { min-height: 68px; padding: 13px 15px; border-right: 1px solid var(--line); position: relative; }
.workflow-step:last-child { border-right: 0; }
.workflow-step span { display: block; color: var(--accent); font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.workflow-step strong { font-size: 13px; }

.panel { border: 1px solid var(--line); background: var(--surface); }
.panel-head { min-height: 56px; border-bottom: 1px solid var(--line); padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-body { padding: 18px; }
.filter-panel-head { min-height: 72px; padding-top: 12px; padding-bottom: 12px; align-items: flex-start; flex-wrap: wrap; }
.filter-panel-head > h2 { min-height: 36px; min-width: 0; max-width: 100%; display: flex; align-items: center; white-space: normal; overflow-wrap: anywhere; }
.filters { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.filters input, .filters select { height: 36px; min-width: 150px; border: 1px solid var(--line); background: white; padding: 0 10px; }
.filters .filter-query { min-width: 230px; }
.filters input[type="date"] { min-width: 138px; }
.filter-clear { min-height: 36px; height: 36px; padding: 0 10px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th { height: 44px; padding: 0 12px; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 11px; text-align: left; font-weight: 700; white-space: nowrap; }
td { min-height: 52px; padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--surface-alt); }
.ledger-row-clickable { cursor: pointer; }
.ledger-row-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { min-height: 240px; display: grid; place-items: center; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.empty strong { color: var(--ink); display: block; margin-bottom: 6px; }
.link-button { border: 0; padding: 0; background: none; color: var(--accent); font-weight: 700; text-align: left; }
.table-action { min-height: 34px; padding: 0 12px; }
.application-table { table-layout: fixed; min-width: 1280px; }
.application-table-reviewed { min-width: 1420px; }
.application-table td { overflow-wrap: anywhere; }
.application-number-column { width: 120px; }
.application-applicant-column { width: 90px; }
.application-amount-column { width: 90px; }
.application-description-column { width: 26%; }
.application-progress-column { width: 140px; }
.application-result-column { width: 150px; }
.application-time-column { width: 130px; }
.application-action-column { width: 116px; }
.application-content-preview, .description-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.application-content-preview { margin-bottom: 4px; }
.application-table .description-cell { max-width: none; }
.application-description-text, .description-preview { white-space: pre-wrap; line-height: 1.6; }
.application-description summary { cursor: pointer; list-style: none; }
.application-description summary::-webkit-details-marker { display: none; }
.application-description summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.description-expand, .description-collapse { color: var(--accent); font-weight: 700; font-size: 12px; line-height: 24px; }
.description-collapse, .application-description[open] .description-expand, .application-description[open] .description-preview { display: none; }
.application-description[open] .description-collapse { display: inline; }
.application-table th:last-child,
.application-table td:last-child { position: sticky; right: 0; z-index: 1; min-width: 90px; background: var(--surface); box-shadow: -1px 0 0 var(--line); }
.application-table th:last-child { z-index: 2; }
.application-table tbody tr:hover td:last-child { background: var(--surface-alt); }
.select-column { width: 42px; min-width: 42px; text-align: center; }
.select-column input { width: 17px; height: 17px; accent-color: var(--accent); }
.status { display: inline-flex; min-height: 25px; align-items: center; padding: 0 8px; font-size: 11px; font-weight: 700; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; }
.status.pending { color: var(--warning); background: var(--warning-soft); }
.status.approved { color: var(--success); background: var(--success-soft); }
.status.rejected { color: var(--danger); background: var(--danger-soft); }
.status.failed, .status.partially_failed { color: var(--danger); background: var(--danger-soft); }
.status.exported { color: var(--accent); background: var(--accent-soft); }
.status.generated { color: var(--success); background: var(--success-soft); }
.status.partially_paid { color: var(--warning); background: var(--warning-soft); }
.status.paid { color: var(--success); background: var(--success-soft); }
.status.voided, .status.cancelled { color: var(--muted); background: var(--surface-alt); }
.status.processing { color: var(--accent); background: var(--accent-soft); }
.status.awaiting_submission { color: var(--warning); background: var(--warning-soft); }
.description-cell { max-width: 260px; white-space: normal; overflow-wrap: anywhere; }

.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs button { height: 44px; border: 0; border-bottom: 3px solid transparent; background: white; padding: 0 18px; color: var(--muted); white-space: nowrap; }
.tabs button.active { color: var(--accent); border-color: var(--accent); font-weight: 700; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.form-section { border: 1px solid var(--line); margin-bottom: 18px; }
.form-section-head { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 14px; }
.form-section-head span { color: var(--accent); font-size: 11px; font-weight: 700; }
.form-section-head h2 { font-size: 15px; margin: 0; }
.form-grid { padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px 18px; }
#application-fields, #external-recipient-fields, [data-installment] { display: contents; }
[data-installment][hidden] { display: none; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 700; }
.field small { color: var(--muted); line-height: 1.4; }
.field input, .field select, .field textarea { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); padding: 9px 10px; background: white; }
.field .permission-check input { width: 16px; height: 16px; min-height: 16px; padding: 0; flex: 0 0 16px; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.detail-system > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-card { flex: 1; min-height: 62px; border: 1px solid var(--line); padding: 10px; display: flex; gap: 9px; align-items: flex-start; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { width: auto; min-height: 0; margin-top: 2px; }
.radio-card strong { display: block; font-size: 13px; }
.radio-card small { display: block; margin-top: 3px; }
.form-aside { position: sticky; top: 96px; border-top: 4px solid var(--accent); background: var(--surface-alt); padding: 18px; }
.form-aside h2 { font-size: 15px; margin: 0 0 14px; }
.summary-list { display: grid; gap: 12px; margin: 0; }
.summary-list div { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.summary-list dt { font-size: 11px; color: var(--muted); }
.summary-list dd { margin: 4px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.errors { background: var(--danger-soft); color: var(--danger); padding: 12px; border-left: 3px solid var(--danger); margin-bottom: 16px; line-height: 1.6; }
.submit-modes { display: inline-flex; border: 1px solid var(--line-strong); margin-bottom: 24px; }
.submit-modes button { min-height: 40px; border: 0; border-right: 1px solid var(--line-strong); background: white; padding: 0 18px; color: var(--muted); }
.submit-modes button:last-child { border-right: 0; }
.submit-modes button.active { background: var(--accent); color: white; font-weight: 700; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.upload-zone { min-height: 210px; border: 1px dashed var(--line-strong); background: var(--surface-alt); display: grid; place-items: center; text-align: center; padding: 28px; }
.upload-zone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone input { display: none; }
.upload-zone h2 { margin: 12px 0 6px; font-size: 17px; }
.upload-zone p { margin: 0 0 18px; color: var(--muted); }
.upload-preview { margin-top: 18px; }
.upload-result { margin-top: 16px; padding: 14px; background: var(--success-soft); color: var(--success); border-left: 3px solid var(--success); }
.preview-ok { color: var(--success); font-weight: 700; }
.preview-error { color: var(--danger); font-weight: 700; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.detail-grid > * { min-width: 0; }
.detail-section { border-top: 1px solid var(--line); padding: 20px 0; }
.detail-section:first-child { border-top: 0; padding-top: 0; }
.detail-section h2 { margin: 0 0 16px; font-size: 15px; }
.definition-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 24px; }
.definition-grid div { min-width: 0; }
.definition-grid dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.definition-grid dd { margin: 0; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-link { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.detail-link:hover { color: #002580; }
.workflow-history { display: grid; }
.workflow-history-item { display: grid; grid-template-columns: 12px 1fr; gap: 10px; min-width: 0; }
.workflow-history-item > span { position: relative; border-left: 1px solid var(--line-strong); margin-left: 5px; }
.workflow-history-item > span::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); left: -4px; top: 5px; }
.workflow-history-item:last-child > span { border-left-color: transparent; }
.workflow-history-item > div { padding-bottom: 18px; min-width: 0; }
.workflow-history-item strong { display: block; font-size: 13px; }
.workflow-history-item small { display: block; color: var(--muted); margin-top: 4px; }
.workflow-history-item p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.finance-preview { border: 1px solid var(--accent); background: var(--accent-soft); padding: 18px; }
.finance-preview h2 { font-size: 14px; margin: 0 0 14px; color: var(--accent); }
.review-box { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.review-box textarea { width: 100%; min-height: 90px; border: 1px solid var(--line-strong); padding: 10px; margin: 8px 0 10px; }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal.grouped-application-modal { width: min(1240px, 100%); }
.grouped-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.grouped-detail-head h2 { margin: 0; }
.grouped-detail-head span { color: var(--muted); font-size: 12px; }
.grouped-payment-detail .table-wrap { max-height: 520px; }
.grouped-payment-detail table { min-width: 760px; }
.grouped-payment-detail th { position: sticky; top: 0; z-index: 1; background: var(--surface-alt); }
.grouped-payment-detail td { vertical-align: top; }
.grouped-review-box { position: sticky; top: 72px; }
.finance-row-actions, .finance-group-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.finance-group-toolbar { margin-bottom: 16px; }
.finance-group-toolbar > span { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.finance-group-row > td:last-child { min-width: 200px; }
.finance-batch-details { max-height: 540px; overflow: auto; }
.payment-correction-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.review-waiting { margin: 10px 0; border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.kol-score-card { border: 1px solid var(--line); border-top: 4px solid var(--accent); background: var(--surface-alt); margin: 12px 0 18px; padding: 14px; }
.kol-score-card.historical { border-top-color: var(--line-strong); color: var(--muted); }
.kol-score-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.kol-score-head > div { display: grid; gap: 3px; }
.kol-score-head strong { color: var(--ink); font-size: 14px; }
.kol-score-head span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.kol-score-result { min-width: 130px; text-align: right; }
.kol-score-result strong { color: var(--accent); font-size: 19px; font-variant-numeric: tabular-nums; }
.kol-score-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 14px 0; }
.kol-score-fields label,
.kol-tier-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.kol-score-fields select,
.kol-tier-fields select { width: 100%; min-height: 42px; border: 1px solid var(--line-strong); background: #fff; padding: 8px; color: var(--ink); }
.kol-tier-fields { display: grid; grid-template-columns: minmax(0, 160px) minmax(0,1fr); gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.kol-tier-fields textarea { min-height: 64px; margin: 0; background: #fff; }
.kol-score-summary { display: grid; gap: 0; margin: 0; }
.kol-score-summary div { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kol-score-summary dt { color: var(--muted); font-size: 11px; }
.kol-score-summary dd { margin: 0; font-size: 12px; font-weight: 700; }
.kol-score-reason { display: grid; gap: 4px; margin-top: 12px; padding-left: 10px; border-left: 3px solid var(--accent); font-size: 12px; }
.payment-submit-form { display: grid; gap: 10px; }
.payment-submit-form label { display: grid; gap: 6px; }
.payment-submit-form input, .payment-submit-form select, .payment-submit-form textarea { width: 100%; border: 1px solid var(--line); padding: 10px 12px; background: #fff; }
.payment-node-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.payment-node { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.payment-node > div { display: grid; gap: 4px; }
.payment-node > div:last-child { text-align: right; }
.payment-node small { color: var(--muted); }
.attachment-list { display: grid; gap: 8px; margin-top: 8px; }
.attachment-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 58px; padding: 7px; border: 1px solid var(--line); color: inherit; text-decoration: none; }
.attachment-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.attachment-item img, .attachment-file { width: 48px; height: 42px; border: 1px solid var(--line); background: var(--surface-alt); object-fit: cover; }
.attachment-file { display: grid; place-items: center; color: var(--muted); font-size: 10px; font-weight: 700; }
.attachment-item span:last-child { display: grid; gap: 3px; min-width: 0; }
.attachment-item strong { overflow-wrap: anywhere; }
.attachment-item small { color: var(--muted); }
.payment-proof { display: grid; gap: 6px; margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface-alt); }
.external-payment-correction { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); background: var(--surface-alt); }
#payment-external-recipient-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.checkbox-row input { width: auto; }
.payment-node[data-detail] { cursor: pointer; }
.payment-node[data-detail]:hover { background: var(--surface-alt); }
.subject-history h2 { margin: 0 0 12px; font-size: 15px; }
.subject-history-empty { margin: 0; color: var(--muted); font-size: 13px; }
#subject-history:empty { display: none; }
#subject-history .subject-history { border: 1px solid var(--line); background: var(--surface-alt); padding: 14px 16px; }
.payment-node.continuation-selected { background: #eef4ff; box-shadow: inset 3px 0 0 var(--accent); padding-inline: 12px; }
.payment-node [data-continue-payment] { justify-self: end; margin-top: 6px; }
.continuation-note { display: grid; gap: 6px; margin-top: 12px; padding: 12px; border: 1px solid #9db6ec; background: #eef4ff; }
.continuation-note span { color: var(--muted); font-size: 13px; }
.continuation-note .button { justify-self: start; margin-top: 4px; }

.selection-bar { position: sticky; bottom: 14px; background: var(--ink); color: white; min-height: 64px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; z-index: 5; }
.selection-bar strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.selection-bar .button { border-color: white; background: white; color: var(--ink); }
.review-selection-bar > div { display: flex; align-items: center; gap: 12px; }
.review-selection-bar span { color: #d7d7db; font-size: 12px; }
.review-selection-bar .button.danger { color: var(--danger); }
.pagination { min-height: 60px; padding: 10px 16px; display: flex; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid var(--line); }
.pagination span { color: var(--muted); font-size: 12px; }
.pagination .button { min-width: 38px; min-height: 34px; padding: 0 10px; }
.bulk-review-modal { width: min(620px, 100%); }
.bulk-review-modal p { margin-top: 0; color: var(--muted); line-height: 1.6; }
.bulk-review-modal label { display: grid; gap: 8px; }
.bulk-review-modal textarea { min-height: 120px; border: 1px solid var(--line-strong); padding: 12px; resize: vertical; }
.batch-meta { display: flex; align-items: center; gap: 10px; }
.batch-items-row > td { padding: 0; background: var(--surface-alt); }
.batch-payment-list { display: grid; gap: 0; padding: 12px 18px 16px 42px; }
.batch-payment-list > strong { margin-bottom: 8px; font-size: 12px; }
.batch-payment-list > div { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.batch-payment-list > div > span { display: grid; gap: 3px; }
.batch-payment-list small { color: var(--muted); }
.payment-confirmation-modal { width: min(680px, 100%); }
.payment-confirmation-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px; background: var(--surface-alt); }
.payment-confirmation-form .form-grid { padding-bottom: 4px; }
#payment-confirmation-error:empty { display: none; }
#payment-confirmation-error .errors { margin-bottom: 0; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 380px; background: var(--ink); color: white; padding: 13px 16px; z-index: 100; opacity: 0; transform: translateY(10px); pointer-events: none; transition: 180ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.login-page { min-height: 100vh; display: grid; place-items: center; background: #f2f3f5; padding: 32px; }
.login-shell { width: min(1000px, 100%); min-height: 620px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 24px 64px rgba(17, 24, 39, .1); }
.login-identity { min-width: 0; display: flex; flex-direction: column; padding: 44px 48px 42px; background: var(--accent); color: white; position: relative; overflow: hidden; }
.login-identity::after { content: ""; width: 148px; height: 148px; position: absolute; right: -1px; bottom: -1px; border-top: 1px solid rgba(255, 255, 255, .18); border-left: 1px solid rgba(255, 255, 255, .18); }
.login-brand { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.login-brand .brand-mark { width: 34px; height: 34px; margin: 0; background: white; }
.login-brand .brand-mark::after { width: 13px; height: 13px; background: var(--accent); }
.login-brand strong { display: block; font-size: 17px; line-height: 1.2; }
.login-brand span { display: block; margin-top: 4px; color: rgba(255, 255, 255, .68); font-size: 10px; }
.login-identity-copy { margin: auto 0; position: relative; z-index: 1; }
.login-identity-copy > span { display: block; color: rgba(255, 255, 255, .65); font-size: 10px; font-weight: 700; }
.login-identity-copy h1 { max-width: 420px; margin: 15px 0 13px; font-size: 44px; line-height: 1.15; font-weight: 700; }
.login-identity-copy p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 17px; }
.login-access-note { width: fit-content; display: flex; align-items: center; gap: 11px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .28); position: relative; z-index: 1; }
.login-access-note > span { width: 8px; height: 8px; flex: none; background: #9fe3ad; border-radius: 50%; }
.login-access-note strong, .login-access-note small { display: block; }
.login-access-note strong { font-size: 11px; }
.login-access-note small { margin-top: 3px; color: rgba(255, 255, 255, .62); font-size: 10px; }
.login-panel { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 54px 52px; background: white; }
.login-panel-head { margin-bottom: 31px; }
.login-panel-head > span { color: var(--accent); font-size: 10px; font-weight: 700; }
.login-panel-head h2 { margin: 10px 0 8px; font-size: 30px; line-height: 1.2; }
.login-panel-head p { margin: 0; color: var(--muted); line-height: 1.6; }
.login-panel form { display: grid; gap: 19px; }
.login-panel .field { gap: 8px; }
.login-panel .field label { font-size: 12px; }
.login-panel .field input { min-height: 48px; padding: 11px 13px; border-color: #a8a8ad; background: white; }
.login-panel .field input::placeholder { color: #95959b; }
.login-panel input:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 0; border-color: var(--accent); }
.password-input { position: relative; }
.password-input input { padding-right: 62px; }
.password-toggle { width: 50px; height: 34px; position: absolute; top: 7px; right: 7px; border: 0; border-left: 1px solid var(--line); background: white; color: var(--accent); font-size: 11px; font-weight: 700; }
.password-toggle:hover { background: var(--accent-soft); }
.login-error:empty, #password-error:empty { display: none; }
.login-error .errors, #password-error .errors { margin: 0; }
.login-submit { width: 100%; min-height: 48px; margin-top: 2px; font-size: 14px; }
.login-spinner { width: 14px; height: 14px; display: none; border: 2px solid rgba(255, 255, 255, .45); border-top-color: white; border-radius: 50%; animation: login-spin .7s linear infinite; }
.login-submit.loading .login-spinner { display: inline-block; }
.login-help { display: grid; gap: 4px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.55; }
.login-help strong { font-size: 12px; }
.login-help span { color: var(--muted); }
.password-panel { justify-content: center; }
.password-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.password-actions .button { margin-top: 0; }
@keyframes login-spin { to { transform: rotate(360deg); } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.38); z-index: 30; display: grid; place-items: center; padding: 24px; }
.modal { width: min(980px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: white; border: 1px solid var(--ink); }
.modal-head { min-height: 64px; border-bottom: 1px solid var(--line); padding: 0 20px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: white; z-index: 2; }
.modal-head h1 { font-size: 19px; margin: 0; }
.modal-body { padding: 22px; }

@media (max-width: 980px) {
  .login-page { padding: 22px; }
  .login-shell { min-height: 590px; grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr); }
  .login-identity { padding: 36px 34px; }
  .login-identity-copy h1 { font-size: 36px; }
  .login-panel { padding: 44px 36px; }
  .shell { grid-template-columns: 72px minmax(0,1fr); }
  .sidebar { padding: 18px 10px; }
  .brand { padding: 0 6px 18px; }
  .brand strong, .brand span, .nav button span, .nav-section-label, .side-foot { display: none; }
  .nav button { justify-content: center; padding: 0; }
  .nav button.active { padding: 0; border-left: 0; border-bottom: 3px solid var(--accent); }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-layout, .detail-grid, .upload-layout { grid-template-columns: 1fr; }
  .detail-grid > aside:has(.own-payment-navigation) { order: -1; }
  .form-aside { position: static; }
}

@media (max-width: 680px) {
  .login-page { display: block; padding: 0; background: white; }
  .login-shell { width: 100%; min-height: 100vh; grid-template-columns: 1fr; border: 0; box-shadow: none; }
  .login-identity { min-height: 210px; padding: 25px 22px 27px; }
  .login-identity::after { width: 86px; height: 86px; }
  .login-brand .brand-mark { width: 30px; height: 30px; }
  .login-brand .brand-mark::after { width: 11px; height: 11px; }
  .login-identity-copy { margin: 34px 0 0; }
  .login-identity-copy > span { font-size: 9px; }
  .login-identity-copy h1 { margin: 8px 0 7px; font-size: 29px; }
  .login-identity-copy p { font-size: 13px; }
  .login-access-note { display: none; }
  .login-panel { justify-content: flex-start; padding: 32px 22px 38px; }
  .login-panel-head { margin-bottom: 25px; }
  .login-panel-head h2 { font-size: 26px; }
  .login-panel form { gap: 17px; }
  .password-actions { grid-template-columns: 1fr; }
  .password-actions .button { width: 100%; }
  .shell { display: block; padding-bottom: 70px; }
  .sidebar { position: fixed; z-index: 20; bottom: 0; top: auto; width: 100%; height: 64px; min-height: 0; border: 0; border-top: 1px solid var(--line); padding: 6px; }
  .brand, .side-foot { display: none; }
  .nav { padding: 0; display: flex; height: 100%; gap: 2px; overflow-x: auto; overflow-y: hidden; }
  .nav-section, .nav-section-items { display: contents; }
  .nav button { min-height: 50px; flex: 0 0 76px; }
  .nav button span { display: block; font-size: 10px; }
  .nav button { flex-direction: column; gap: 2px; }
  .topbar { padding: 0 16px; height: 62px; }
  .topbar-title { display: none; }
  .role-switch { width: 100%; justify-content: space-between; }
  .content { padding: 22px 16px; }
  .page-head { align-items: flex-start; margin-bottom: 20px; }
  .page-head h1 { font-size: 25px; }
  .page-head p { font-size: 13px; }
  .page-head .button span { display: none; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { min-height: 90px; padding: 13px; }
  .metric strong { margin-top: 13px; font-size: 24px; }
  .workflow-track { grid-template-columns: repeat(5, minmax(88px, 1fr)); overflow-x: auto; }
  .workflow-step { padding: 11px 9px; }
  .workflow-step strong { font-size: 12px; white-space: nowrap; }
  .form-grid, .definition-grid, .payment-confirmation-summary, #payment-external-recipient-fields { grid-template-columns: 1fr; }
  .batch-payment-list { padding: 10px 12px 14px; }
  .batch-payment-list > div { align-items: flex-start; flex-direction: column; padding: 10px 0; }
  .batch-payment-list .button { width: 100%; }
  .attachment-item { grid-template-columns: 42px minmax(0, 1fr); }
  .attachment-item img, .attachment-file { width: 42px; height: 38px; }
  .kol-score-fields, .kol-tier-fields { grid-template-columns: 1fr; }
  .kol-score-head { display: grid; }
  .kol-score-result { min-width: 0; text-align: left; }
  .kol-score-summary div { grid-template-columns: 1fr; gap: 3px; }
  .radio-row { flex-direction: column; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-left: 0; border-right: 0; border-bottom: 0; }
  .modal-body { padding: 18px 16px; }
  .account-modal .permission-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selection-bar { bottom: 74px; }
  .review-selection-bar, .review-selection-bar > div { align-items: stretch; flex-direction: column; }
  .review-selection-bar .button { flex: 1; }
  .pagination { justify-content: flex-start; overflow-x: auto; }
  .filter-panel-head { display: grid; gap: 10px; }
  .filter-panel-head > h2 { min-height: 24px; }
  .filters { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .filters input, .filters select { width: 100%; min-width: 0; }
  .filters .filter-query, .filters .filter-clear { grid-column: 1 / -1; min-width: 0; }
}

@media (max-width: 720px) {
  .login-shell { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.feedback-layout { display: grid; grid-template-columns: minmax(320px, .75fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.feedback-form { margin: 0; }
.feedback-history { min-width: 0; }
.feedback-item { padding: 18px 20px; border-top: 1px solid var(--line); }
.feedback-item:first-of-type { border-top: 0; }
.feedback-item-head > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feedback-item-head small { color: var(--muted); }
.feedback-item p { margin: 14px 0; line-height: 1.7; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .feedback-layout { grid-template-columns: 1fr; }
}
.share-details { display: block; min-width: 0; }
.share-details small { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Primary navigation selects a business module; its actions live above the page. */
.shell { grid-template-columns: 208px minmax(0,1fr); }
.sidebar { padding: 0 12px 16px; }
.brand { height: 56px; display: flex; align-items: center; padding: 0 10px; border-bottom: 1px solid var(--line); color: #002fa7; }
.ops-primary-nav { display: flex; flex-direction: column; flex: 1; gap: 24px; padding-top: 16px; }
.nav-utility { display: grid; gap: 4px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.topbar { height: 56px; }
.ops-secondary-nav { display: flex; gap: 8px; overflow-x: auto; padding: 0 32px; border-bottom: 1px solid var(--line); background: #fff; }
.ops-secondary-nav button { flex: 0 0 auto; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 15px 10px; color: var(--muted); }
.ops-secondary-nav button.active { color: #002fa7; border-bottom-color: #002fa7; font-weight: 700; }
@media(max-width:980px) and (min-width:641px) {
  .shell { grid-template-columns: 76px minmax(0,1fr); }
  .brand strong { display: block; font-size: 13px; }
  .ops-primary-nav button { justify-content:center; }
}
@media(max-width:640px) {
  .shell { display:block; }
  .sidebar { padding: 6px; }
  .brand { display:none; }
  .ops-primary-nav { flex-direction:row; gap: 2px; padding:0; }
  .ops-primary-nav .nav-section-items,.nav-utility { display:contents; }
  .ops-secondary-nav { padding:0 12px; }
}
