@font-face { font-family: "Manrope"; src: url("assets/manrope-latin.woff2") format("woff2"); font-style: normal; font-weight: 400 800; font-display: swap; }

:root {
  --ink: #071d2b;
  --ink-soft: #173447;
  --navy: #0c3b5a;
  --teal: #079477;
  --teal-dark: #08745f;
  --mint: #e9f7f3;
  --amber: #e9a23b;
  --amber-soft: #fff4df;
  --red: #c5554d;
  --red-soft: #fff0ed;
  --blue-soft: #e9f3f9;
  --text: #102b3c;
  --muted: #607383;
  --border: #dce6eb;
  --surface: #fff;
  --background: #f5f6f8;
  --shadow-sm: 0 1px 2px rgba(7, 29, 43, .04), 0 8px 24px rgba(7, 29, 43, .04);
  --shadow-md: 0 18px 50px rgba(7, 29, 43, .10);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--background); font-family: "Manrope", ui-sans-serif, sans-serif; -webkit-font-smoothing: antialiased; }
body, input, select, textarea, button { font: inherit; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
button, .button { min-height: 44px; }
button { padding: 10px 18px; color: var(--ink-soft); background: var(--surface); border: 1px solid #cad9e0; border-radius: 10px; font-weight: 700; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; }
button:hover, .button:hover { border-color: #99b3c0; background: #f8fafb; transform: translateY(-1px); }
button:disabled { cursor: default; opacity: .5; transform: none; }
button.primary, .button.primary { color: #fff; background: var(--navy); border-color: var(--navy); box-shadow: none; }
button.primary:hover, .button.primary:hover { color: #fff; background: #082f49; border-color: #082f49; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; color: var(--ink-soft); background: var(--surface); border: 1px solid #cad9e0; border-radius: 10px; font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.icon-button, .button.icon-only { width: 44px; padding-inline: 0; }
.full-button { width: 100%; margin-top: 6px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(0, 169, 135, .35); outline-offset: 3px; }
.skip-link { position: fixed; top: 12px; left: -9999px; z-index: 100; padding: 12px 16px; color: #fff; background: var(--ink); border-radius: 8px; }
.skip-link:focus { left: 12px; }

.app-shell { min-height: 100svh; }
.app-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; padding: 13px max(24px, calc((100vw - 1400px) / 2)); background: rgba(255, 255, 255, .92); border-bottom: 1px solid rgba(210, 224, 231, .85); box-shadow: 0 1px 8px rgba(7, 29, 43, .03); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; color: var(--ink); text-decoration: none; }
.brand img { width: 43px; height: 43px; object-fit: contain; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 23px; line-height: 1; letter-spacing: -.8px; }
.brand-copy small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.header-actions form { margin: 0; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 9px 11px; color: #4c6575; border-radius: 9px; font-size: 13px; font-weight: 700; text-decoration: none; }
.nav-link:hover { color: var(--ink); background: #eef4f6; }
.nav-link span { color: var(--teal-dark); font-size: 17px; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 150px; min-height: 36px; padding: 7px 11px; overflow: hidden; color: #496273; background: #f2f6f8; border: 1px solid #e1e9ed; border-radius: 99px; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.user-chip span { color: var(--teal); font-size: 8px; }
.header-primary { margin-left: 4px; }
.content { width: min(1400px, 100%); margin: auto; padding: 38px 28px 60px; }

.eyebrow { display: inline-block; margin-bottom: 8px; color: #72818c; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { color: var(--ink); }
h1 { margin: 0 0 8px; font-size: clamp(29px, 3vw, 38px); font-weight: 700; letter-spacing: -1.15px; line-height: 1.15; }
h2 { margin: 0 0 7px; font-size: 21px; font-weight: 700; letter-spacing: -.45px; }
h3 { margin: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-heading p, .panel-intro { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.sync-status { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 11px; color: #607888; background: rgba(255, 255, 255, .75); border: 1px solid var(--border); border-radius: 99px; font-size: 11px; white-space: nowrap; }
.sync-status a { padding: 4px 5px; font-weight: 750; }
.local-dot { width: 8px; height: 8px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 4px rgba(0, 169, 135, .12); }

.period-form { margin-bottom: 22px; }
.dashboard-filters { margin: 0 0 16px; }
.period-panel { display: flex; align-items: end; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.period-title { display: grid; gap: 3px; min-width: 190px; margin-right: auto; align-self: center; color: var(--ink); }
.period-title span { font-size: 14px; font-weight: 750; }
.period-title small { color: #7a8e99; font-size: 11px; }
.period-panel label { width: 175px; margin: 0; color: #526b7a; font-size: 11px; }
.period-panel input, .period-panel select { min-height: 42px; margin-top: 5px; color: var(--ink-soft); background: #f8fafb; border-color: #d6e1e6; }
.period-panel .button { color: #415f70; background: #f4f7f9; border-color: #d6e1e6; }
.period-panel .button:hover { color: var(--ink); background: #eaf1f4; }
.period-submit { min-height: 42px; }
.period-navigation { display: flex; gap: 7px; }
label { display: block; margin-top: 18px; color: #4d6574; font-size: 13px; font-weight: 750; }
input, select, textarea { display: block; width: 100%; min-width: 0; min-height: 46px; margin-top: 7px; padding: 11px 13px; color: var(--ink-soft); background: #fff; border: 1px solid #cad9e0; border-radius: 10px; font-size: 14px; transition: border-color .15s ease, box-shadow .15s ease; }
textarea { min-height: 100px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #9eb6c2; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(0, 169, 135, .12); }
.filter-card { padding: 14px 16px 10px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.simple-filters { display: grid; grid-template-columns: minmax(0, 1fr) 280px auto; align-items: end; gap: 12px; }
.simple-filters label { margin: 0; }
.search-field { position: relative; }
.search-field::after { position: absolute; right: 13px; bottom: 13px; color: #8ca0aa; font-size: 16px; content: "⌕"; pointer-events: none; }
.search-field input { padding-right: 40px; }
.filter-submit { min-width: 105px; }
.extra-filters { margin: 12px 0 0; border-top: 1px solid #e8eef1; }
.extra-filters > summary { display: flex; align-items: center; gap: 8px; width: fit-content; padding: 12px 2px 5px; color: #4f6b7b; font-size: 12px; font-weight: 750; cursor: pointer; }
.extra-filters > summary span { color: #90a0a9; font-size: 10px; font-weight: 600; }
.extra-filter-fields { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); align-items: end; gap: 12px; padding: 13px 0 8px; }
.extra-filter-fields label { margin: 0; }
.quick-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.quick-filters a { padding: 5px 8px; color: #4e6c7d; background: #eef4f6; border-radius: 99px; font-size: 10px; font-weight: 750; text-decoration: none; }
.quick-filters a:hover { color: var(--teal-dark); background: var(--mint); }
.filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 10px; margin: 4px 0 0; border-top: 1px solid #edf1f3; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metrics article { position: relative; min-width: 0; padding: 20px 22px; overflow: hidden; background: #fff; border: 1px solid var(--border); border-top: 3px solid #8aa0ad; border-radius: 12px; }
.metrics article::after { display: none; }
.metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.metric-heading span { color: #617787; font-size: 13px; font-weight: 750; }
.metrics strong { display: block; margin-top: 12px; overflow-wrap: anywhere; color: var(--ink); font-size: clamp(26px, 3vw, 37px); font-variant-numeric: tabular-nums; font-weight: 790; letter-spacing: -1.2px; line-height: 1.1; }
.metric-period { display: block; margin-top: 9px; color: #7d909c; font-size: 11px; }
.metrics .expected { border-top-color: #4c7894; }
.metrics .collected { border-top-color: var(--teal); }
.metrics .collected strong { color: var(--teal-dark); }
.metrics .outstanding { border-top-color: var(--amber); }
.metrics .outstanding strong { color: #a86715; }
.summary-caption { margin: 10px 2px 36px; color: #7b8e99; font-size: 11px; line-height: 1.6; }

.client-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.client-section-heading .eyebrow { margin-bottom: 6px; }
.client-section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.view-switch { display: flex; gap: 4px; padding: 4px; background: #eaf0f3; border-radius: 12px; }
.view-switch .button { min-height: 36px; padding: 7px 11px; color: #647986; background: transparent; border-color: transparent; font-size: 12px; }
.view-switch .button:hover, .view-switch .button.active { color: var(--ink); background: #fff; border-color: #dce5e9; box-shadow: 0 2px 7px rgba(7,29,43,.07); transform: none; }
.status-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.status-filter { position: relative; padding: 12px 15px; color: #627887; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-size: 11px; font-weight: 700; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.status-filter:hover { border-color: #a9bbc4; }
.status-filter::after { position: absolute; top: 13px; right: 13px; width: 7px; height: 7px; background: currentColor; border-radius: 50%; content: ""; opacity: .75; }
.status-count { display: block; margin-bottom: 2px; color: var(--ink); font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.status-filter.active { border-color: var(--ink-soft); box-shadow: inset 0 -3px 0 var(--ink-soft); }
.status-filter.unpaid { color: var(--red); }
.status-filter.partial, .status-filter.overdue { color: #ae711f; }
.status-filter.paid, .status-filter.credit { color: var(--teal-dark); }
.status-filter.unpaid.active { background: #fff8f6; border-color: #eab8b2; box-shadow: inset 0 -3px 0 var(--red); }
.status-filter.partial.active, .status-filter.overdue.active { background: #fffbf1; border-color: #ecd49c; box-shadow: inset 0 -3px 0 var(--amber); }
.status-filter.paid.active, .status-filter.credit.active { background: #f3fcf9; border-color: #a9dece; box-shadow: inset 0 -3px 0 var(--teal); }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 14px; color: #718590; font-size: 12px; }
.results-heading a { font-weight: 750; }

.customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.customer-card { position: relative; min-width: 0; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s ease; }
.customer-card:hover { border-color: #b8c9d1; }
.customer-card.paid, .customer-card.credit { border-top: 3px solid var(--teal); padding-top: 18px; }
.customer-card.partial { border-top: 3px solid var(--amber); padding-top: 18px; }
.customer-card.unpaid { border-top: 3px solid #d77a70; padding-top: 18px; }
.customer-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #69808e; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.customer-card-top b { padding: 5px 8px; color: #4b6677; background: #edf3f5; border-radius: 7px; font-size: 10px; }
.customer-card h3 { min-height: 45px; margin: 14px 0 12px; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.client-name { color: var(--ink); text-decoration: none; }
.client-name:hover { color: var(--teal-dark); text-decoration: underline; }
.payment-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.payment-badge.unpaid { color: #a7423a; background: var(--red-soft); }
.payment-badge.partial, .payment-badge.overdue { color: #956016; background: var(--amber-soft); }
.payment-badge.paid, .payment-badge.credit { color: #087861; background: var(--mint); }
.card-breakdown { display: grid; gap: 8px; margin: 19px 0 0; color: #708591; font-size: 12px; }
.card-breakdown span { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-breakdown b { color: #324e5f; font-size: 13px; font-variant-numeric: tabular-nums; }
.card-breakdown .day-amount { padding-top: 8px; margin-top: 1px; color: var(--teal-dark); border-top: 1px solid #edf1f3; }
.card-result { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 45px; padding-top: 14px; margin: 14px 0; color: #8d681f; border-top: 1px solid #e8eef1; font-size: 12px; }
.card-result strong { color: #9b661c; font-size: 21px; font-variant-numeric: tabular-nums; font-weight: 790; letter-spacing: -.5px; }
.payment-complete { color: var(--teal-dark); font-size: 14px; font-weight: 800; }
.card-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.card-actions .button:first-child { min-width: 0; }
.edit-action { color: #4f6877; background: #f7f9fa; }
.row-actions { display: flex; gap: 7px; }
.review-note { display: block; padding: 8px 10px; margin-top: 10px; color: #916821; background: var(--amber-soft); border-radius: 8px; font-size: 10px; line-height: 1.5; }
.table-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 14px 16px; color: #607785; background: #f2f6f8; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
td { padding: 17px 16px; border-top: 1px solid #e8eef1; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
td:first-child { min-width: 240px; max-width: 370px; white-space: normal; }
td strong { display: block; line-height: 1.5; }
td small { display: block; margin-top: 5px; color: #7c8f9a; font-size: 11px; }
tbody tr:hover { background: #f8fbfc; }
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; color: #6d818d; font-size: 12px; }
.pagination { display: flex; gap: 8px; }
.empty { grid-column: 1 / -1; padding: 50px 20px; text-align: center; background: #fff; border: 1px dashed #cbd9df; border-radius: var(--radius); }
.empty.compact { padding: 30px 16px; }
.empty h3 { font-size: 18px; }
.empty p { margin: 7px 0 0; color: var(--muted); }

.form-panel { width: min(690px, 100%); padding: 32px; margin: 10px auto; background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); }
.form-panel.wide { width: min(1050px, 100%); }
.form-panel h1 { font-size: 30px; overflow-wrap: anywhere; }
.form-panel > p, .form-panel form > p { line-height: 1.6; }
.form-panel form > p { margin: 0; }
.form-panel .help { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.form-panel input[type="checkbox"] { display: inline; width: auto; min-height: 0; margin: 0 7px 0 0; accent-color: var(--teal); }
.panel-intro { margin-bottom: 24px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.form-actions .primary { min-width: 150px; }
.errorlist { padding: 11px 15px; color: #9c3f38; background: var(--red-soft); border-radius: 9px; font-size: 12px; }
.review-box { padding: 14px 16px; margin: 18px 0; color: #8b611c; background: var(--amber-soft); border: 1px solid #efddb9; border-radius: 11px; font-size: 12px; line-height: 1.6; }
.review-box p { margin-bottom: 0; }
.notice { display: flex; align-items: center; gap: 10px; padding: 13px 16px; margin-bottom: 18px; border: 1px solid transparent; border-radius: 11px; font-size: 13px; line-height: 1.5; }
.notice.success { color: #076c57; background: var(--mint); border-color: #bce8da; }
.notice.error, .inline-error { color: #983f38; background: var(--red-soft); border-color: #edc3bf; }

.back-link { display: inline-flex; margin: 0 0 16px 4px; color: #567080; font-size: 12px; font-weight: 750; text-decoration: none; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); align-items: start; gap: 18px; }
.detail-grid .form-panel { width: 100%; margin: 0; }
.account-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.account-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.due-date { display: flex; justify-content: space-between; padding: 10px 12px; margin: 18px 0 0; color: #607684; background: #f2f6f8; border-radius: 9px; font-size: 12px; }
.payment-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 15px 0 28px; overflow: hidden; background: #dfe8ec; border: 1px solid #dfe8ec; border-radius: 12px; }
.payment-summary > div { padding: 16px 13px; background: #f7fafb; }
.payment-summary small { display: block; color: #6a808d; font-size: 10px; }
.payment-summary strong { display: block; margin-top: 7px; color: var(--ink); font-size: 19px; font-variant-numeric: tabular-nums; }
.payment-summary > div:last-child strong { color: #a56817; }
.section-heading { padding-top: 2px; margin: 0 0 5px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.edit-record { width: 100%; margin-top: 13px; color: #617785; background: transparent; border-color: transparent; }
.history-item { padding: 18px 0; border-bottom: 1px solid #e7edf0; }
.history-item:first-of-type { padding-top: 10px; }
.history-amount { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.history-amount strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.history-item p { margin: 8px 0; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; line-height: 1.5; }
.history-item small { color: #80929c; font-size: 10px; }
.history-item.voided { padding: 14px; margin: 12px 0; background: #f8f1ef; border: 0; border-radius: 10px; }
.history-item.voided strong { text-decoration: line-through; }
.void-label { color: var(--red) !important; font-weight: 750; }
.payment-type { padding: 5px 7px; color: #627887; background: #edf2f4; border-radius: 99px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.payment-type.early { color: #08755f; background: var(--mint); }
.payment-type.surcharge { color: #936118; background: var(--amber-soft); }
.danger-subtle { min-height: 34px; padding: 6px 10px; margin-top: 10px; color: #a34b44; border-color: #ecc9c5; font-size: 11px; }
.contract-letters { margin-top: 28px; }
.contract-letters h2 { margin-bottom: 10px; font-size: 17px; }
.letter-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 3px; color: #526d7d; border-bottom: 1px solid #e9eef1; font-size: 12px; text-decoration: none; }
.letter-link strong { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.export-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 25px 0 16px; }
.export-card { display: grid; gap: 5px; min-height: 145px; padding: 17px; color: var(--ink-soft); background: #f7fafb; border: 1px solid var(--border); border-radius: 13px; text-decoration: none; }
.export-card:hover { border-color: #a9c3ce; box-shadow: var(--shadow-sm); }
.export-card strong { align-self: end; font-size: 13px; }
.export-card small { color: #718692; font-size: 10px; line-height: 1.4; }
.export-card.primary-export { color: #fff; background: var(--ink); border-color: var(--ink); }
.export-card.primary-export small { color: #aebfc8; }
.export-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--teal-dark); background: var(--mint); border-radius: 9px; font-size: 20px; }
.info-box { padding: 13px 15px; color: #567080 !important; background: #eef5f8; border-radius: 10px; }
.import-step { display: flex; align-items: center; gap: 12px; padding-top: 22px; margin-top: 22px; border-top: 1px solid #e5ecef; }
.import-step > span { display: grid; flex: 0 0 auto; width: 32px; height: 32px; place-items: center; color: #fff; background: var(--teal-dark); border-radius: 50%; font-size: 12px; font-weight: 800; }
.import-step h2 { margin: 0; font-size: 17px; }
.import-step p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.error-panel { text-align: center; }
.error-symbol { display: grid; width: 60px; height: 60px; margin: 0 auto 18px; place-items: center; color: #a6463f; background: var(--red-soft); border-radius: 50%; font-size: 28px; font-weight: 800; }

.login-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); align-items: center; gap: clamp(40px, 8vw, 110px); min-height: calc(100svh - 160px); padding: 35px max(0px, 4vw); }
.login-intro { max-width: 650px; }
.login-intro h1 { font-size: clamp(42px, 6vw, 72px); letter-spacing: -3.2px; line-height: 1.02; }
.login-intro h1 span { color: var(--teal-dark); }
.login-intro > p { max-width: 550px; margin: 22px 0 30px; color: #58717f; font-size: 17px; line-height: 1.7; }
.login-benefits { display: flex; flex-wrap: wrap; gap: 10px 18px; color: #435f6f; font-size: 12px; font-weight: 700; }
.login-benefits span::before { margin-right: 7px; color: var(--teal); content: "✓"; }
.login-card { margin: 0; padding: 34px; box-shadow: var(--shadow-md); }
.login-mark { display: grid; width: 58px; height: 58px; margin-bottom: 22px; place-items: center; background: #eefaf6; border-radius: 15px; }
.login-mark img { width: 50px; height: 50px; }
.login-card h2 { margin-bottom: 6px; font-size: 29px; }
.login-card > p { margin-top: 0; color: var(--muted); font-size: 13px; }
.login-submit { width: 100%; margin-top: 21px; }
.secure-note { display: block; margin-top: 19px; color: #8a9aa3; font-size: 10px; text-align: center; }

.payment-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; overflow: visible; background: transparent; border: 0; border-radius: 14px; }
.payment-dialog::backdrop { background: rgba(8, 23, 34, .42); }
.payment-dialog-shell { position: relative; max-height: calc(100svh - 32px); overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: 0 24px 70px rgba(4,21,32,.24); }
.payment-modal-body { padding: 24px; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; width: 34px; min-height: 34px; padding: 0; place-items: center; color: #637986; background: transparent; border: 0; border-radius: 8px; font-size: 22px; line-height: 1; }
.payment-modal-header { display: grid; padding-right: 40px; }
.payment-modal-header .eyebrow { margin-bottom: 5px; }
.payment-modal-header h2 { margin-bottom: 13px; overflow-wrap: anywhere; font-size: 22px; }
.payment-modal-header > strong { overflow-wrap: anywhere; color: var(--ink); font-size: 14px; }
.payment-modal-header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.modal-balance { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin: 16px 0 18px; color: #687c88; background: #f4f6f7; border-radius: 8px; font-size: 11px; }
.modal-balance strong { color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
.modal-payment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.modal-payment-form > p { margin: 0; }
.modal-payment-form > p:first-of-type { grid-column: 1 / -1; }
.modal-payment-form > p:first-of-type input { min-height: 52px; font-size: 19px; font-weight: 700; }
.modal-optional { grid-column: 1 / -1; margin-top: 14px; border-top: 1px solid #e7ecef; }
.modal-optional > summary { padding: 13px 1px 7px; color: #546d7b; font-size: 11px; font-weight: 700; cursor: pointer; }
.modal-optional-fields { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.modal-optional-fields p { margin: 0; }
.modal-optional-fields p:last-child { grid-column: 1 / -1; }
.modal-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 8px; padding-top: 16px; margin-top: 14px; border-top: 1px solid #e7ecef; }
.modal-actions button { min-width: 120px; }
.modal-loading { display: grid; min-height: 260px; place-items: center; align-content: center; gap: 12px; color: #708591; font-size: 12px; }
.modal-loading span { width: 32px; height: 32px; border: 3px solid #dce8ec; border-top-color: var(--teal); border-radius: 50%; animation: modal-spin .7s linear infinite; }
.modal-error { padding: 11px 13px; margin: 0 0 14px; color: #983f38; background: var(--red-soft); border-radius: 9px; font-size: 12px; }
@keyframes modal-spin { to { transform: rotate(360deg); } }

.rotation-toggle { display: flex; align-items: center; gap: 7px; margin: 0; color: #657b88; font-size: 11px; }
.rotation-toggle input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--teal); }
.presentation .dashboard-filters, .presentation .period-form, .presentation .summary-caption, .presentation .client-section-heading p { display: none; }
.presentation .view-switch { display: flex; }
.presentation .view-switch a:not(#presentation-toggle) { display: none; }
.presentation .page-heading { margin-bottom: 17px; }
.presentation .metrics { margin-bottom: 20px; }
.presentation .metrics article { padding: 17px 21px; }
.presentation .customer-card { padding: 17px; }
body:has(.presentation) .app-header nav { display: none; }

@media (max-width: 1100px) {
  .app-header { padding-inline: 22px; }
  .nav-link { display: none; }
  .content { padding-inline: 22px; }
  .period-title { display: none; }
  .customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .extra-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .login-shell { gap: 45px; padding-inline: 0; }
  .export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .app-header { position: static; flex-wrap: wrap; gap: 11px; padding: 12px 16px; }
  .brand img { width: 38px; height: 38px; }
  .brand-copy strong { font-size: 21px; }
  .header-actions { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .user-chip { max-width: 110px; }
  .header-primary { margin-left: auto; white-space: nowrap; }
  .content { padding: 28px 16px 42px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .sync-status { max-width: 100%; white-space: normal; }
  .period-panel { flex-wrap: wrap; padding: 16px; }
  .period-panel label { flex: 1 1 180px; width: auto; }
  .period-navigation { flex: 1 1 100%; }
  .period-navigation .button:not(.icon-only) { flex: 1; }
  .simple-filters { grid-template-columns: 1fr; }
  .filter-card { padding: 14px; }
  .extra-filter-fields { grid-template-columns: 1fr; }
  .filter-actions { flex-wrap: wrap; }
  .metrics { gap: 10px; }
  .metrics article { padding: 17px; }
  .metrics strong { font-size: 25px; }
  .status-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-section-heading { align-items: flex-start; flex-direction: column; }
  .view-switch { max-width: 100%; overflow-x: auto; }
  .customer-grid { grid-template-columns: 1fr; }
  .results-heading { align-items: flex-start; flex-direction: column; }
  .form-panel { padding: 24px 20px; }
  .login-shell { display: block; min-height: auto; padding: 16px 0; }
  .login-intro { margin-bottom: 32px; }
  .login-intro h1 { font-size: 43px; letter-spacing: -2.2px; }
  .login-intro > p { font-size: 15px; }
  .login-card { padding: 27px 22px; }
  .payment-modal-body { padding: 25px 20px; }
}

@media (max-width: 480px) {
  .brand-copy small { display: none; }
  .header-primary { padding-inline: 11px; font-size: 12px; }
  .user-chip { display: none; }
  .page-heading h1 { font-size: 31px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .metric-heading { grid-column: 1 / -1; }
  .metrics strong { margin-top: 10px; font-size: 29px; }
  .metric-period { max-width: 85px; text-align: right; }
  .status-filter { padding: 13px; }
  .status-count { font-size: 24px; }
  .customer-card { padding: 18px; }
  .list-footer { align-items: flex-start; flex-direction: column; }
  .pagination { width: 100%; }
  .pagination .button { flex: 1; }
  .payment-summary { grid-template-columns: 1fr; }
  .payment-summary > div { display: flex; align-items: center; justify-content: space-between; }
  .payment-summary strong { margin: 0; }
  .account-heading { flex-direction: column; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .export-grid { grid-template-columns: 1fr; }
  .export-card { min-height: 116px; }
  .login-intro h1 { font-size: 37px; }
  .login-benefits { display: grid; }
  .payment-dialog { width: calc(100vw - 20px); max-height: calc(100svh - 20px); }
  .payment-dialog-shell { max-height: calc(100svh - 20px); }
  .modal-payment-form { grid-template-columns: 1fr; }
  .modal-payment-form p { grid-column: 1 / -1; }
  .modal-optional-fields { grid-template-columns: 1fr; }
  .modal-actions button { flex: 1; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
