:root {
  --navy: #282226;
  --blue: #972442;
  --pale: #f5edef;
  --line: #ded5d8;
  --text: #332d30;
  --muted: #71686c;
  --danger: #a61b1b;
  --white: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f7f9fb; color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--blue); }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px max(24px, calc((100vw - 1180px) / 2)); background: var(--white); color: var(--text); border-bottom: 1px solid var(--line); }
.topbar a { color: var(--blue); }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.brand img { display: block; width: 250px; max-width: 42vw; height: auto; }
.brand span { border-left: 1px solid var(--line); padding-left: 16px; color: var(--muted); font-size: 13px; font-weight: 750; letter-spacing: .12em; }
.user { display: flex; gap: 20px; align-items: center; }
.container { max-width: 1280px; margin: 0 auto; padding: 34px 24px 72px; }
.card { margin-bottom: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 3px 14px rgb(16 42 67 / 5%); }
.hero { max-width: 650px; margin: 80px auto; text-align: center; padding: 56px; }
h1, h2 { color: var(--navy); line-height: 1.2; }
h1 { margin: 4px 0 16px; font-size: clamp(30px, 4vw, 44px); }
h2 { font-size: 21px; margin-top: 0; }
.eyebrow { margin: 0; color: var(--blue); font-size: 13px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 20px; }
.page-heading h1 { font-size: clamp(28px, 3vw, 38px); }
.button { display: inline-block; border: 0; border-radius: 6px; padding: 11px 17px; background: var(--blue); color: var(--white); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button.secondary { background: var(--pale); color: var(--navy); }
.button.danger { background: var(--danger); }
.form-card label { display: block; margin-bottom: 20px; font-weight: 650; }
input, textarea, select { display: block; width: 100%; margin-top: 7px; border: 1px solid #bcccdc; border-radius: 6px; padding: 11px 12px; color: var(--text); font: inherit; }
textarea { resize: vertical; }
.form-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.client-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.client-choice-grid fieldset { height: 100%; }
fieldset { margin: 2px 0 24px; border: 1px solid var(--line); border-radius: 7px; padding: 18px; }
legend { padding: 0 8px; font-weight: 700; }
.form-card h2 { margin-top: 8px; padding-top: 4px; }
.form-card h3 { margin: 28px 0 10px; color: var(--navy); font-size: 17px; }
.form-card hr { margin: 34px 0 28px; border: 0; border-top: 1px solid var(--line); }
.documentation-section label { margin-bottom: 14px; }
.documentation-section h3 { margin: 20px 0 6px; }
.documentation-section .hint { margin: 0 0 12px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.checkbox, .checkbox-line { display: flex !important; gap: 9px; align-items: flex-start; margin: 0 !important; font-weight: 450 !important; }
.checkbox input { width: auto; margin: 0; }
.checkbox-line input { width: auto; margin: 4px 0 0; }
.radio-group { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.radio { display: flex !important; gap: 7px; align-items: center; margin: 0 !important; font-weight: 500 !important; white-space: nowrap; }
.radio input { width: auto; margin: 0; }
.question-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 14px 16px; background: #fbfcfd; }
.guidance-box { margin-bottom: 24px; border-left: 4px solid var(--blue); padding: 16px 20px; background: var(--pale); }
.guidance-box h3 { margin: 0 0 8px; }
.guidance-box ul { margin: 0; padding-left: 22px; }
.owner-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 10px; }
.owner-row label { margin: 0; }
.owner-remove { margin-bottom: 0; }
.conditional-section { margin-top: 18px; }
.company-documents-toggle { margin-top: 14px !important; margin-bottom: 8px !important; }
.company-documents-options { margin-top: 8px; border-left: 4px solid var(--line); padding: 12px 0 2px 16px; }
.company-documents-options .radio-group { margin-bottom: 12px; }
.company-documents-options label { margin-bottom: 12px; }
.aml-business-purpose { margin-top: -2px; }
.required-mark { color: var(--danger); }
[hidden] { display: none !important; }
.hint, small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.actions { display: flex; gap: 10px; }
.send-upload-panel { margin-top: 2px; }
.send-upload-note { max-width: 760px; margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.send-upload-note strong { color: var(--navy); }
.send-recipient-list { margin: 4px 0 0; padding-left: 18px; }
.send-recipient-list li { margin: 1px 0; overflow-wrap: anywhere; }
.action-stack { flex-wrap: wrap; margin-bottom: 16px; }
.dashboard-controls { display: grid; grid-template-columns: minmax(240px, 420px) minmax(0, 1fr); gap: 16px; align-items: end; margin-bottom: 16px; }
.search-box { color: var(--muted); font-size: 13px; font-weight: 750; }
.search-box input { margin-top: 6px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.filter-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; background: var(--white); color: var(--text); font-size: 14px; font-weight: 700; text-decoration: none; }
.filter-chip span { color: var(--muted); font-size: 12px; }
.filter-chip.active { border-color: var(--blue); background: var(--pale); color: var(--blue); }
.table-card { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.dashboard-table td { font-size: 14px; }
.case-cell { min-width: 145px; }
.case-link { display: inline-block; color: var(--navy); font-size: 15px; font-weight: 800; text-decoration: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; white-space: nowrap; }
.row-actions a { font-weight: 750; text-decoration: none; }
.status { display: inline-block; border-radius: 999px; padding: 5px 10px; background: var(--pale); font-size: 12px; font-weight: 800; white-space: nowrap; }
.status-draft { background: #f1edf0; color: #5d4d55; }
.status-sent { background: #e9eef7; color: #28466f; }
.status-completed { background: #e8f4fd; color: #0b4f71; }
.status-cancelled { background: #e6e8eb; color: #52606d; }
.status-error { background: #ffe3e3; color: #8a1515; }
.status-delivered { background: #eef2f6; color: #334155; }
.status-partial { background: #fff1cf; color: #7a4d00; }
.status-waiting { background: #e9eef7; color: #28466f; }
.status-missing { background: #f6e5e9; color: #7c1f36; }
.flash { margin-bottom: 20px; border-left: 4px solid var(--blue); padding: 14px 16px; background: #e8f4fd; }
.error-box { border-color: #f3b7b7; background: #fff8f8; }
.error-item { margin-top: 14px; border-top: 1px solid #f3b7b7; padding-top: 14px; }
.error-diagnostics { display: grid; gap: 6px; margin-top: 8px; }
.graph-diagnostics pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.summary-strip > div { border: 1px solid var(--line); border-radius: 8px; padding: 13px 14px; background: #fbfcfd; }
.summary-strip span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.summary-strip strong { color: var(--navy); font-size: 22px; line-height: 1; }
.compact-table { margin-top: 18px; font-size: 14px; }
.technical-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.technical-details summary { color: var(--blue); cursor: pointer; font-weight: 750; }
.muted-cell { color: var(--muted); }
.upload-panel { max-width: 760px; margin-left: auto; margin-right: auto; }
.upload-intro { max-width: 640px; color: var(--text); }
.upload-note { margin: 0 0 18px; color: var(--navy); font-weight: 650; }
.upload-help { margin: 10px 0 0; }
.upload-status { margin-top: 18px; }
.upload-line { margin: 8px 0; border-left: 4px solid var(--line); padding: 8px 12px; background: #fbfcfd; }
.upload-line.success { border-left-color: #17613a; background: #edf8f2; }
.upload-line.error { border-left-color: var(--danger); background: #fff8f8; }
.upload-categories { display: grid; gap: 14px; }
.upload-category { border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: #fbfcfd; }
.upload-category-header { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.upload-category h2 { margin-bottom: 8px; font-size: 18px; }
.upload-file-picker { display: block; margin-top: 12px; font-weight: 650; }
.upload-file-list { margin: 12px 0; padding: 0; list-style: none; }
.upload-file-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 9px 0; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; }
.button:disabled, .link-button:disabled, input:disabled { cursor: not-allowed; opacity: .55; }
.upload-submit { margin-top: 18px; justify-content: flex-end; }
.thank-you-panel { text-align: center; }
.thank-you-panel img { display: block; width: 280px; max-width: 72vw; height: auto; margin: 0 auto 28px; }
.access-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.access-actions > div { border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: #fbfcfd; }
.access-actions h3 { margin: 0 0 8px; color: var(--navy); font-size: 16px; }
.access-actions p { margin: 0 0 14px; color: var(--muted); }
.danger-zone { border-color: #e8b4b4; }
dl { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 10px 18px; margin: 0; }
dt { color: var(--muted); font-weight: 650; }
dd { margin: 0; overflow-wrap: anywhere; }
code { font-size: 12px; overflow-wrap: anywhere; }
.preserve { white-space: pre-wrap; }
.empty { padding: 48px; text-align: center; }
@media (max-width: 760px) {
  .form-grid, .detail-grid, .checkbox-grid, .owner-row, .client-choice-grid { grid-template-columns: 1fr; }
  .dashboard-controls, .summary-strip, .access-actions { grid-template-columns: 1fr; }
  .filter-tabs { justify-content: flex-start; }
  .question-row { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .container { padding: 28px 16px 56px; }
  .card { padding: 20px; }
  dl { grid-template-columns: 1fr; gap: 3px; }
  dd { margin-bottom: 10px; }
}
