* { box-sizing: border-box; }
:root {
  --brand: #5b0a0d;
  --brand-dark: #430608;
  --brand-soft: #f0e2df;
  --page: #f3f0ed;
  --surface: #fffdfb;
  --surface-soft: #f8f4f1;
  --border: #d9cfcb;
  --ink: #2e2324;
  --muted-ink: #6f6262;
}
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; background: var(--page); color: var(--ink); }
button, input, select, textarea { font: inherit; }
.page { width: min(1180px, 100%); margin: 0 auto; padding: 28px; min-height: 100vh; }
.header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 20px 0 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.app-header { align-items: center; }
.app-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.app-brand > span:last-child { min-width: 0; }
.app-brand strong, .app-brand small { display: block; }
.app-brand strong { font-size: 20px; line-height: 1.2; }
.app-brand small { margin-top: 3px; color: var(--muted-ink); font-size: 12px; font-weight: 700; }
.app-mark { display: grid; place-items: center; width: 56px; height: 48px; flex: 0 0 56px; border: 1px solid #e2d8d6; border-radius: 8px; background: #fff; overflow: hidden; }
.app-mark img { display: block; width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.app-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.app-install { white-space: nowrap; }
.badge { display: inline-block; background: var(--brand); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
h1 { margin: 10px 0 6px; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; }
.version-stamp { color: #667085; font-size: 12px; font-weight: 700; margin-top: 6px; }
h2 { margin: 0 0 12px; font-size: 21px; }
h3 { margin: 18px 0 10px; font-size: 16px; }
.muted { color: var(--muted-ink); margin: 4px 0; line-height: 1.45; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 22px; box-shadow: 0 14px 32px rgba(64,20,20,.06); margin-bottom: 18px; }
.public-intro { padding: 28px 0 34px; max-width: 820px; }
.public-intro h2 { font-size: 32px; line-height: 1.15; margin-bottom: 12px; }
.public-intro p { color: #475467; font-size: 17px; line-height: 1.55; }
.service-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.service-points div { border-top: 3px solid var(--brand); padding: 12px 4px 0; }
.service-points strong, .service-points span { display: block; }
.service-points strong { margin-bottom: 5px; color: #172033; }
.service-points span { color: #667085; font-size: 13px; line-height: 1.4; }
.quote-total { margin: 14px 0; padding: 14px; border-left: 4px solid var(--brand); background: var(--brand-soft); font-size: 18px; font-weight: 800; }
.quote-total span { display: inline-block; margin-top: 5px; color: #475467; font-size: 14px; font-weight: 700; }
.public-auth-grid.login-only { display: block; max-width: 560px; margin: 36px auto 0; }
.public-auth-grid.account-only { display: block; max-width: 760px; }
.auth-switch { border-top: 1px solid #e1e7ef; margin-top: 20px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #667085; font-weight: 600; }
.back-login { margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; }
.admin-heading { margin-bottom: 12px; }
.admin-review-card { width: 100%; }
.partner-workbench-card > h2 { margin-bottom: 6px; }
.partner-workbench-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid #e1e7ef; }
.partner-workbench-section h3 { margin-top: 0; }
.partner-workbench-section .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.partner-workbench-section .report-table { min-width: 1080px; table-layout: auto; }
.partner-workbench-section .report-table th { min-width: 92px; white-space: normal; line-height: 1.2; }
.partner-workbench-section .report-table th:first-child { min-width: 160px; }
.partner-workbench-section .partner-terminations-table { min-width: 0; }
.partner-workbench-section .partner-terminations-table th,
.partner-workbench-section .partner-terminations-table td { width: auto; }
.partner-section-heading { align-items: center; }
.partner-section-heading h2, .partner-section-heading p { margin-bottom: 0; }
.readonly-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border: 1px solid #cbd5e1; border-radius: 999px; background: #f8fafc; color: #475467; font-size: 12px; font-weight: 800; white-space: nowrap; }
.locked-annexure-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.locked-annexure-row strong, .locked-annexure-row span { display: block; }
.locked-annexure-row span { margin-top: 3px; color: #667085; font-size: 12px; }
.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 18px; }
.status-grid > div { min-width: 0; padding: 12px; border: 1px solid #e1e7ef; border-radius: 8px; background: #f8fafc; }
.status-grid span, .status-grid strong { display: block; overflow-wrap: anywhere; }
.status-grid span { margin-bottom: 4px; color: #667085; font-size: 12px; font-weight: 700; }
.status-grid strong { color: #172033; font-size: 15px; }
.add-client-card { margin: 12px 0 18px; }
.company-switcher { margin: 12px 0 18px; padding: 8px; background: #e9e1dd; border-radius: 8px; border: 1px solid var(--border); }
.company-queue-section + .company-queue-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid #d9dee7; }
.company-queue-section h3 { margin: 0 0 4px; }
.company-queue-section > .muted { margin: 0 0 10px; }
.company-picker { margin-bottom: 10px; }
.company-switcher-toolbar { margin: 0 0 8px; align-items: end; }
.company-switcher-toolbar label { flex: 1 1 360px; }
.company-search-input { position: relative; display: block; }
.company-search-input input { padding-right: 48px; }
.company-search-input input::-webkit-search-cancel-button { display: none; }
.company-search-clear { position: absolute; top: 50%; right: 6px; width: 38px; height: 38px; min-height: 0; padding: 0; transform: translateY(-50%); border: 0; border-radius: 50%; background: transparent; color: #5f6673; font-size: 28px; line-height: 1; }
.company-search-clear:hover, .company-search-clear:focus-visible { background: #eef1f5; color: #172033; }
.client-context-bar { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 12px; align-items: end; margin: 12px 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.client-context-bar label { margin: 0; }
.client-context-bar .muted { padding-bottom: 11px; white-space: nowrap; }
.settings-section { margin-top: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; }
.settings-section > .row { margin-bottom: 12px; }
.settings-section h3 { margin: 0 0 5px; }
.settings-section .notification-centre { margin: 0; box-shadow: none; }
.finance-section-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 16px; }
.finance-section-tabs button { width: 100%; }
.monthly-invoice-summary { border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; margin: 12px 0 16px; }
.invoice-summary-heading, .invoice-dashboard-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; }
.invoice-summary-heading { background: #f8fafc; border-bottom: 1px solid var(--border); }
.invoice-summary-heading span { color: #667085; font-size: 13px; font-weight: 700; }
.invoice-dashboard-row { min-height: 48px; border-bottom: 1px solid #e5e7eb; }
.invoice-dashboard-row:last-child { border-bottom: 0; }
.invoice-dashboard-row strong, .invoice-dashboard-row small { display: block; }
.invoice-dashboard-row small { margin-top: 2px; color: #667085; }
.invoice-dashboard-money { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-weight: 800; }
.invoice-status-not_invoiced { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
.invoice-status-invoiced { color: #344054; background: #f2f4f7; border-color: #d0d5dd; }
.invoice-status-part_paid { color: #175cd3; background: #eff8ff; border-color: #b2ddff; }
.invoice-status-paid { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.invoice-entry-panel > summary { font-size: 16px; }
.invoice-entry-panel .client-context-bar { margin-top: 14px; }
.invoice-entry-panel .invoice-panel { padding-top: 4px; }
.invoice-quick-help { font-size: 13px; margin-bottom: 14px; }
.invoice-quick-row { grid-template-columns: minmax(190px, 1fr) 165px 180px 80px; gap: 18px; padding: 16px; align-items: center; }
.invoice-quick-row label { margin: 0; font-size: 12px; }
.invoice-quick-row input { margin-top: 6px; width: 100%; min-width: 0; }
.invoice-quick-total { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; font-size: 12px; }
.invoice-quick-total span { color: var(--muted-ink); }
.invoice-quick-total strong { font-variant-numeric: tabular-nums; text-align: right; }
.invoice-save-message { display: block; min-height: 16px; margin-top: 5px; font-size: 11px; color: var(--muted-ink); }
.invoice-paid-button { min-width: 75px; }
.invoice-quick-row input:disabled { color: var(--muted-ink); background: #f8fafc; }
.invoice-form-grid input[readonly] { background: #f1f5f9; font-weight: 700; }
@media (max-width: 800px) {
  .invoice-dashboard-row.invoice-quick-row { grid-template-columns: minmax(0, 1fr) 90px; gap: 12px; }
  .invoice-quick-client { grid-column: 1 / -1; }
  .invoice-quick-amount { grid-column: 1; }
  .invoice-quick-total { grid-column: 1; grid-row: 3; }
  .invoice-paid-button { grid-column: 2; grid-row: 2 / 4; }
}
.company-tabs { display: flex; gap: 10px; margin: 0; padding: 0 0 6px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-gutter: stable; }
.company-tabs-empty { padding: 12px; margin: 0; }
.company-tab { position: relative; flex: 0 0 250px; min-height: 76px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 3px; padding-right: 104px; text-align: left; background: #fff; color: #172033; border: 1px solid #cbd5e1; scroll-snap-align: start; }
.company-tab span { font-weight: 800; line-height: 1.25; }
.company-tab small { color: #667085; font-weight: 600; line-height: 1.3; }
.company-tab .company-deadline-badge { position: absolute; top: 10px; right: 10px; max-width: 90px; padding: 4px 7px; border: 1px solid #b2ddff; border-radius: 6px; background: #eff8ff; color: #175cd3; font-size: 11px; line-height: 1.2; text-align: center; }
.company-tab .company-deadline-badge.due-today { border-color: #fedf89; background: #fffaeb; color: #b54708; }
.company-tab .company-deadline-badge.overdue { border-color: #fecdca; background: #fef3f2; color: #b42318; }
.company-tab .company-deadline-badge.submitted { border-color: #abefc3; background: #ecfdf3; color: #067647; }
.company-tab-note { display: inline-flex; margin-top: 3px; padding: 3px 7px; border-radius: 6px; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; font-size: 12px; font-weight: 700; }
.company-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.company-tab.active small { color: #f5e7e4; }
.company-tab.active .company-deadline-badge { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); }
.company-tab.active .company-tab-note { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.28); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.stat, .item { border: 1px solid #e1e7ef; border-radius: 8px; padding: 14px; background: #fff; margin-bottom: 12px; }
.stat { background: #f8fafc; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: #344054; }
input, select, textarea { border: 1px solid #cbd5e1; border-radius: 6px; padding: 11px 12px; font-size: 14px; background: #fff; width: 100%; color: #172033; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid rgba(91, 10, 13, .12); outline-offset: 0; }
input:disabled { border-color: #e5e7eb; background: #f2f4f7; color: #98a2b3; }
.field-error { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .14); }
button, .link-btn { min-height: 40px; border-radius: 6px; padding: 10px 14px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button.primary, .link-btn { background: var(--brand); color: #fff; border: 0; }
button.primary:hover, .link-btn:hover { background: var(--brand-dark); }
button.secondary { background: #fff; color: #172033; border: 1px solid #cbd5e1; }
button.secondary:hover { border-color: #b98f8b; background: var(--surface-soft); color: var(--brand); }
button.danger { background: #fff; color: #b42318; border: 1px solid #fecdca; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 16px; }
.actions.compact { margin: 0; align-items: center; }
.inline-stack { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; margin: 18px 0; padding: 6px; background: #e9e1dd; border-radius: 8px; }
.tab { background: #fff; border: 1px solid #cbd5e1; }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.report-input-list { display: grid; gap: 10px; margin: 12px 0; }
.report-input-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr); gap: 10px; align-items: end; border: 1px solid #e1e7ef; border-radius: 8px; padding: 12px; background: #f8fafc; }
.report-input-row label > .muted { display: block; margin-top: 6px; line-height: 1.4; font-weight: 400; }
.secondary-link { background: #fff; color: #172033; border: 1px solid #cbd5e1; }
.training-employee-picker { max-height: 520px; overflow: auto; border: 1px solid #e1e7ef; border-radius: 8px; padding: 10px; margin: 10px 0 14px; background: #f8fafc; }
.training-position-group { border-bottom: 1px solid #e1e7ef; padding: 10px 0; }
.training-position-group:last-child { border-bottom: 0; }
.training-employee-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 8px; padding: 8px 0; font-weight: 600; }
.training-employee-option input { width: auto; margin-top: 3px; }
.training-group-item .actions { margin-bottom: 0; }
.inline-upload { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; min-height: 40px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px 10px; background: #fff; font-size: 13px; }
.inline-upload input { max-width: 190px; padding: 0; border: 0; font-size: 12px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.notice { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 12px; margin-top: 12px; color: #9a3412; }
.success { background: #ecfdf3; border: 1px solid #abefc6; border-radius: 8px; padding: 12px; margin-top: 12px; color: #067647; }
.logo-preview, .logo-placeholder { border: 1px solid #dfe5ee; border-radius: 8px; min-height: 120px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; background: #f8fafc; overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 150px; object-fit: contain; padding: 12px; }
.logo-placeholder { color: #667085; font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 10px 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border: 1px solid #dfe5ee; padding: 10px; text-align: left; vertical-align: middle; }
th { background: #f8fafc; color: #344054; }
.report-section { border: 1px solid #dfe5ee; border-radius: 8px; margin: 12px 0; background: #fff; }
.report-section summary { cursor: pointer; font-weight: 800; padding: 12px 14px; color: var(--brand); }
.report-section .table-wrap { margin: 0; padding: 0 12px 12px; overflow-x: visible; }
.copy-table { margin: 0 12px 12px; }
.company-details-preview { border: 1px solid #dfe5ee; border-radius: 8px; padding: 14px; margin: 16px 0 18px; background: #f8fafc; }
.company-details-preview h3 { margin-top: 0; }
.report-archive-panel { border: 1px solid #dfe5ee; border-radius: 8px; padding: 14px; margin: 16px 0; background: #f8fafc; }
.report-archive-panel h3 { margin-top: 0; }
.report-archive-panel > summary { cursor: pointer; font-weight: 800; color: var(--brand); }
.report-archive-panel > summary .section-summary-note { margin-left: 8px; color: #667085; font-weight: 500; font-size: 14px; }
.locked-section-note { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: #e5e7eb; color: #4b5563; font-size: 12px; font-weight: 700; }
.report-archive-panel[open] > summary { margin-bottom: 12px; }

.report-year-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; scroll-snap-type: x proximity; }
.report-year-tab { flex: 0 0 150px; align-items: flex-start; flex-direction: column; gap: 3px; background: #fff; border: 1px solid #cbd5e1; color: #172033; scroll-snap-align: start; }
.report-year-tab span { font-weight: 800; }
.report-year-tab small { color: #667085; font-weight: 700; }
.report-year-tab.locked-year { background: #e5e7eb; border-color: #9ca3af; color: #374151; }
.report-year-tab.locked-year small { color: #4b5563; }
.report-year-tab.active, button.active-lite { background: var(--brand); border-color: var(--brand); color: #fff; }
.report-year-tab.active small { color: #f5e7e4; }
.report-year-tab.locked-year.active { background: #6b7280; border-color: #4b5563; color: #fff; }
.report-year-tab.locked-year.active small { color: #f3f4f6; }
.report-year-tab:disabled { cursor: default; color: #667085; background: var(--page); }
.annexure-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.annexure-template-card { border: 1px solid #e1e7ef; border-radius: 8px; padding: 12px; background: #fff; min-width: 0; }
.annexure-template-card strong,
.annexure-template-card span { display: block; overflow-wrap: anywhere; }
.annexure-template-card span { margin: 6px 0 10px; color: #667085; font-weight: 700; line-height: 1.35; }
.company-logo-copy { border: 1px solid #dfe5ee; border-radius: 8px; min-height: 120px; margin: 12px 0; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; color: #667085; font-weight: 700; }
.company-logo-copy img { max-width: 100%; max-height: 160px; object-fit: contain; padding: 12px; }
.company-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.company-detail { border: 1px solid #e1e7ef; border-radius: 6px; padding: 10px; background: #fff; min-width: 0; }
.company-detail strong { display: block; margin-bottom: 5px; color: #344054; font-size: 12px; }
.company-detail span { display: block; color: #172033; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.report-template-panel { border: 1px solid #ccd6e3; border-radius: 8px; background: #f8fafc; margin: 18px 0; padding: 14px; }
.report-template-panel h3 { margin-top: 0; }
.generated-report-workbench .report-control-bar h3 { margin: 0 0 6px; letter-spacing: 0; }
.report-download-hub { border: 1px solid #ccd6e3; border-radius: 8px; background: #fff; padding: 12px; margin: 12px 0; }
.report-download-hub h4 { margin: 0 0 6px; }
.report-template-frame { width: 100%; height: calc(100vh - 260px); min-height: 780px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.annexure-pdf-preview-shell { width: 100%; overflow: auto; border: 1px solid #cbd5e1; border-radius: 6px; background: #e5e7eb; }
.annexure-pdf-frame { display: block; width: 100%; min-width: 0; border: 0; border-radius: 0; }
.report-mobile-note { display: none; }
.advanced-admin-body { padding: 0 12px 12px; }
.annexure-text-panel > .actions,
.annexure-text-panel > p { margin-left: 12px; margin-right: 12px; }
.annexure-text-group { margin: 0 12px 12px; border: 1px solid #e1e7ef; border-radius: 8px; background: #f8fafc; }
.annexure-text-group summary { padding: 10px 12px; color: #344054; }
.annexure-text-section { margin: 0 10px 10px; padding: 12px; border: 1px solid #e1e7ef; border-radius: 8px; background: #fff; }
.annexure-text-section h4 { margin: 0 0 8px; }
.annexure-text-section textarea { min-height: 130px; line-height: 1.45; }
.annexure-ai-box { margin: 0 12px 14px; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; }
.annexure-ai-box h4 { margin: 0 0 6px; }
.status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; margin: 0 6px 8px 0; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid #cbd5e1; color: #344054; background: #f8fafc; }
.status-approved { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.status-locked { color: var(--brand); background: var(--brand-soft); border-color: #d6aaa5; }
.status-warning { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
.activity-summary { padding: 0 12px 12px; }
.activity-changes { margin: 4px 0 0; padding-left: 18px; }
.activity-changes li { margin: 2px 0; }
.report-table { table-layout: fixed; min-width: 0; }
.report-table th,
.report-table td { font-size: 12px; padding: 6px; line-height: 1.25; }
.report-table th:first-child,
.report-table td:first-child { width: 24%; }
.report-table th:not(:first-child),
.report-table td:not(:first-child) { width: 7.6%; }
.report-table th,
.report-table .report-label { user-select: none; }
.report-table .report-number { user-select: text; cursor: text; }
.report-section .previous-wfp-wrap { overflow-x: auto; }
.previous-wfp-table { min-width: 760px; }
.previous-wfp-table th:first-child,
.previous-wfp-table td:first-child { width: 150px; }
.report-table .previous-wfp-number,
.report-table .approved-goal-number { min-width: 44px; padding: 8px 6px; min-height: 34px; text-align: center; font-size: 14px; font-weight: 800; color: #111827; }
.banding-review-panel { background: #fff; }
.banding-drop-zone { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px; margin-top: 10px; background: #f8fafc; }
.banding-drop-zone h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.banding-range-label { margin-left: 2px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.banding-review-table { table-layout: auto; width: 100%; }
.banding-review-table th,
.banding-review-table td { width: auto; vertical-align: middle; }
.banding-review-table th:first-child,
.banding-review-table td:first-child { width: 20%; }
.banding-review-table tr[draggable="true"] { cursor: move; background: #fff; }
.banding-review-table select { min-width: 150px; }
.previous-wfp-number[readonly] { background: #f2f4f7; color: #344054; border-color: #d0d5dd; }
.previous-wfp-paste-label { margin-top: 12px; }
.previous-wfp-paste { min-height: 86px; resize: vertical; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.35; }
.previous-wfp-total-row td { background: #f8fafc; font-weight: 800; }
.report-section td { text-align: right; }
.report-section td:first-child { text-align: left; font-weight: 700; }
.report-section .activity-table td { vertical-align: top; text-align: left; }
.report-section .activity-table td:first-child { white-space: nowrap; font-weight: 400; }
@media (max-width: 900px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .page { padding: 0 12px 18px; }
  .app-header { position: sticky; top: 0; z-index: 30; margin: 0 -12px 12px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; background: rgba(243, 240, 237, .96); box-shadow: 0 1px 0 var(--border); backdrop-filter: blur(12px); border-bottom: 0; }
  .app-brand strong { font-size: 16px; }
  .app-brand small { display: none; }
  .app-mark { width: 48px; height: 40px; flex-basis: 48px; }
  .app-header-actions .version-stamp { display: none; }
  .grid2, .form-grid, .stat-grid, .status-grid, .tabs, .company-details-grid, .report-input-row { grid-template-columns: 1fr; }
  .annexure-template-grid { grid-template-columns: 1fr; }
  .row { align-items: flex-start; flex-direction: column; }
  .company-tabs { display: grid; overflow: visible; padding-bottom: 0; }
  .annexure-document-workspace { width: calc(100vw - 12px); margin-left: calc(50% - 50vw + 6px); margin-right: calc(50% - 50vw + 6px); border-left: 0; border-right: 0; border-radius: 0; }
  .annexure-document-workspace .annexure-online-view { margin-left: -10px; margin-right: -10px; }
  .annexure-document-workspace .annexure-pdf-preview-shell { border-left: 0; border-right: 0; border-radius: 0; }
  .annexure-document-workspace .report-template-frame { border: 0; border-radius: 0; }
  .report-template-frame { display: block; min-height: 700px; height: 82vh; }
  .report-mobile-note { display: block; }
  .company-tab { flex: none; width: 100%; min-height: 64px; }
  .service-points { grid-template-columns: 1fr; }
  .card { padding: 16px; box-shadow: 0 5px 18px rgba(64,20,20,.06); }
  input, select, textarea { min-height: 44px; font-size: 16px; }
  button, .link-btn { min-height: 44px; }
  .tabs { position: sticky; top: 62px; z-index: 25; display: flex; gap: 6px; overflow-x: auto; margin: 0 -12px 16px; padding: 8px 12px; border-radius: 0; scroll-snap-type: x mandatory; box-shadow: 0 1px 0 #ccd6e3; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; min-height: 42px; max-width: 190px; padding: 9px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; scroll-snap-align: start; }
  .admin-heading > .actions.compact { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-heading > .actions.compact > button { width: 100%; min-width: 0; min-height: 56px; padding: 9px 10px; line-height: 1.2; text-align: center; }
  .admin-section-tabs { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-section-tabs button { width: 100%; min-width: 0; min-height: 56px; padding: 9px 10px; line-height: 1.2; text-align: center; }
  .company-switcher-toolbar { width: 100%; gap: 6px; }
  .company-switcher-toolbar label { flex: 0 0 auto; width: 100%; }
  .company-switcher-toolbar .company-search-count { width: 100%; }
  .company-switcher-toolbar input { width: 100%; min-width: 0; }
  .client-context-bar { grid-template-columns: 1fr; gap: 6px; }
  .client-context-bar .muted { padding-bottom: 0; white-space: normal; }
  .locked-annexure-row { align-items: stretch; flex-direction: column; }
  .locked-annexure-row .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .locked-annexure-row .link-btn { width: 100%; }
  .invoice-summary-heading, .invoice-dashboard-row { grid-template-columns: 1fr; gap: 5px; }
  .invoice-dashboard-money { justify-content: space-between; }
  .table-wrap { width: calc(100vw - 56px); }
}

@media (display-mode: standalone) {
  .app-install { display: none !important; }
}

.annexure-document-workspace { border: 2px solid #c7d7ee; background: linear-gradient(180deg, #f8fbff 0%, #ffffff 180px); }
.annexure-file-status { display: inline-flex; width: fit-content; padding: .2rem .55rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .78rem; font-weight: 700; }


.annexure-template-card.active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(91, 10, 13, .12); }

.invoice-panel-compact { padding: 10px 14px; }
.invoice-compact-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.invoice-compact-heading h3 { margin: 0; }
.compact-invoice-grid { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(165px, .72fr) auto minmax(330px, auto); gap: 10px; align-items: end; }
.compact-invoice-grid > label:not(.checkbox-row) { margin: 0; }
.compact-invoice-grid input { min-height: 40px; }
.invoice-lock-toggle { align-self: center; white-space: nowrap; margin: 0; min-height: 40px; }
.invoice-compact-actions { flex-wrap: nowrap; margin: 0; }
.invoice-compact-actions .inline-upload { min-height: 40px; padding-block: 5px; }
.invoice-history { margin-top: 8px; border-top: 1px solid #dfe5ee; padding-top: 7px; }
.invoice-history summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #334155; }
.invoice-history .table-wrap { margin-top: 7px; }
.report-cycle-panel { margin: 16px 0; border: 1px solid #cbd5e1; border-radius: 10px; padding: 12px; background: #f8fafc; }
.report-cycle-panel > summary { cursor: pointer; font-weight: 800; color: #172033; }
.cycle-pipeline { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0 10px; }
.cycle-stage { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #64748b; font-size: 12px; font-weight: 700; }
.cycle-stage.complete { background: #dcfce7; border-color: #86efac; color: #166534; }
.cycle-stage.active { background: #173a5e; border-color: #173a5e; color: #fff; }
.shortcomings-workflow { margin-top: 14px; border-top: 1px solid #dbe3ec; padding-top: 10px; }
.shortcomings-workflow > summary { cursor: pointer; font-weight: 800; }
.shortcomings-workflow table input, .shortcomings-workflow table select { min-width: 130px; }
.notification-centre-button span { display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 999px; background: #b42318; color: #fff; font-size: 11px; }
.notification-centre { border: 2px solid #b8cbe2; background: #f8fbff; }
.notification-centre h2 { margin-bottom: 2px; }
.notification-centre details { margin: 10px 0; padding: 10px; border: 1px solid #d8e1ec; border-radius: 8px; background: #fff; }
.notification-centre summary { cursor: pointer; font-weight: 800; }
.notification-list { display: grid; gap: 8px; max-height: 440px; overflow: auto; }
.notification-item { display: flex; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #d8e1ec; border-radius: 8px; background: #fff; }
.notification-item.unread { border-left: 5px solid #173a5e; background: #eff6ff; }
.notification-item p { margin: 4px 0; }
.notification-company { margin-left: 8px; color: #52657b; font-size: 12px; font-weight: 700; }
@media (max-width: 1100px) {
  .compact-invoice-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .compact-invoice-grid { grid-template-columns: 1fr; }
  .invoice-compact-actions { flex-wrap: wrap; }
}

.report-workbench-clean { padding: 12px 14px 14px; }
.report-control-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 10px; }
.report-control-bar > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.annexure-workspace-heading { display: flex; justify-content: space-between; align-items: center; }
.annexure-workspace-heading h3, .annexure-workspace-heading p { margin: 0; }
.annexure-preview-tabs { margin: 10px 0; }
.annexure-g-cover { max-width: 820px; margin: 14px auto 18px; background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .2); }
.annexure-g-cover img { display: block; width: 100%; height: auto; }
.annexure-g-evidence-list { display: grid; gap: 10px; }
.annexure-g-document { border: 1px solid #d8e1ec; border-radius: 8px; padding: 10px; background: #fff; }
.annexure-g-document summary { cursor: pointer; color: #172033; }
.annexure-g-document summary span { display: grid; gap: 3px; }
.annexure-g-document summary small { color: #64748b; font-weight: 600; }
.annexure-g-document iframe { width: 100%; min-height: 620px; border: 1px solid #d8e1ec; background: #f8fafc; }
.annexure-lock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; align-items: stretch; }
.annexure-lock-card { border: 1px solid #d8e1ec; border-radius: 8px; padding: 8px; background: #fff; display: grid; gap: 6px; }
.annexure-lock-card.active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.annexure-lock-card button { width: 100%; }
.annexure-lock-card small { color: #64748b; font-size: 12px; }
@media (max-width: 800px) { .report-control-bar { align-items: flex-start; flex-direction: column; } }

/* Authenticated PDF.js document preview */
body:has(#pdf-preview) { margin: 0; background: #d1d5db; font-family: Arial, sans-serif; }
#pdf-preview { box-sizing: border-box; width: 100%; min-height: 100vh; padding: 16px; overflow: auto; }
.pdf-preview-status { margin: 32px auto; color: #475569; text-align: center; }
.pdf-page-shell { width: fit-content; max-width: 100%; margin: 0 auto 16px; background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .2); }
.pdf-page-canvas { display: block; max-width: 100%; height: auto !important; background: #fff; }

.business-finance { margin-top: 28px; padding-top: 24px; border-top: 2px solid #ded3d0; }
.business-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.business-heading h2, .business-heading h3, .business-heading p { margin: 0 0 5px; }
.business-heading > label { min-width: 160px; }
.business-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.business-totals > div { display: grid; gap: 7px; padding: 16px; border: 1px solid #d8e1ec; border-radius: 7px; background: #f7f9fc; }
.business-totals span { font-size: 12px; color: #52657b; }
.business-totals strong { font-size: 20px; }
.business-totals .business-available { background: #faf2f0; border-color: #dfc6c2; color: var(--brand); }
.business-section { margin: 20px 0; padding: 16px; border: 1px solid #d8e1ec; border-radius: 8px; background: #fff; }
.business-section > h3 { margin-top: 0; }
.business-expense { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto; align-items: start; gap: 16px; padding: 14px 0; border-top: 1px solid #e0e6ee; }
.business-expense small { display: block; margin: 4px 0; color: #52657b; }
.business-files { display: grid; gap: 5px; font-size: 12px; overflow-wrap: anywhere; }
.business-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; max-width: 210px; }
.business-row-actions button { padding: 6px 10px; }
.business-upload { position: relative; cursor: pointer; padding: 6px 10px; border: 1px solid #c3d2e6; border-radius: 5px; background: #fff; overflow: hidden; }
.business-upload:focus-within { outline: 2px solid #173a5e; }
.business-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.business-amount { white-space: nowrap; padding-top: 5px; }
.business-entry { padding: 16px; margin: 12px 0; border-radius: 7px; background: #f7f9fc; border: 1px solid #d8e1ec; }
.business-entry h4 { margin: 0 0 14px; }
.business-entry fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.business-entry .actions { margin-top: 14px; }
.business-entry small { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.business-payout-table th, .business-payout-table td { padding: 12px 10px; }
.business-payout-table th span { display: block; font-weight: normal; }
.business-payout-table td:not(:last-child) { white-space: nowrap; }
.business-payout-table button { white-space: nowrap; }
.business-overpaid { display: block; color: #9a3412; white-space: normal; }
.business-history { margin-top: 16px; }
.business-history summary { cursor: pointer; margin-bottom: 10px; }
.business-message { color: #166534; padding: 10px 0; }
.business-void { background: #fafafa; color: #6b7280; }
@media (max-width: 650px) {
  .business-heading { align-items: flex-start; flex-direction: column; }
  .business-totals { grid-template-columns: 1fr; }
  .business-expense { grid-template-columns: 1fr auto; }
  .business-row-actions { grid-column: 1 / -1; max-width: none; justify-content: flex-start; }
  .business-section { padding: 12px; }
}

.aa-plan-workflow-panel.is-locked {
  background: #f1f3f5;
  border-color: #c9ced4;
}

.aa-plan-workflow-panel.is-locked > :not(summary) {
  opacity: 0.72;
}

.aa-plan-workflow-panel.is-locked #unlockAaPlanCycle,
.aa-plan-workflow-panel.is-locked .aa-plan-feedback {
  opacity: 1;
}

.aa-plan-workflow-panel.is-locked input:disabled,
.aa-plan-workflow-panel.is-locked select:disabled {
  background: #e2e5e9;
  color: #59616b;
  border-color: #b8bec6;
}

.aa-plan-feedback {
  margin: 12px 0;
  font-weight: 700;
}
