:root {
  color-scheme: light;
  --navy: #102c43;
  --navy-deep: #0b2133;
  --teal: #087d7b;
  --teal-dark: #056260;
  --teal-pale: #e8f5f2;
  --ink: #1a3040;
  --muted: #566b7a;
  --border: #dfe7eb;
  --canvas: #f4f7f9;
  --white: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.55; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid #22a5a1; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; }
form { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: -100px; left: 16px; padding: 10px 16px; border-radius: 8px; color: var(--white); background: var(--navy); }
.skip-link:focus { top: 12px; }
.development-banner { display: flex; justify-content: center; align-items: center; gap: 9px; min-height: 31px; padding: 5px 16px; color: #624b17; background: #fff4d8; font-size: 11px; font-weight: 650; letter-spacing: .03em; }
.no-script-notice { padding: 14px max(22px, calc((100vw - 1440px) / 2)); border-bottom: 1px solid #dfc98e; background: #fff4d8; color: #624b17; font-size: 14px; line-height: 1.7; }
.no-script-notice strong { font-weight: 700; }
.status-dot, .small-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: currentColor; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 148px; max-width: 100%; height: auto; aspect-ratio: 503 / 234; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; font-size: 19px; font-weight: 750; letter-spacing: .11em; line-height: 1.2; }
.brand-name > span { font-size: 8px; font-weight: 500; letter-spacing: .23em; margin-top: 6px; opacity: .65; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 7px; font-weight: 650; line-height: 1.3; transition: background-color .15s, border-color .15s; text-decoration: none; white-space: nowrap; }
.button:hover { text-decoration: none; }
.button-primary { background: var(--teal); color: var(--white); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { background: var(--white); color: var(--ink); border-color: var(--border); }
.button-secondary:hover { background: #edf3f4; border-color: #bfcfd6; }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover { background: #edf2f5; color: var(--ink); }
.button-small { padding: 7px 12px; min-height: 34px; font-size: 12px; }
.button-full { width: 100%; justify-content: space-between; margin-top: 7px; min-height: 47px; }
.eyebrow { color: var(--teal); font-size: 10px; font-weight: 750; letter-spacing: .15em; line-height: 1.5; }
.muted { color: var(--muted); }
.identifier { font-family: Consolas, "Courier New", monospace; font-size: 12px; overflow-wrap: anywhere; }
.preserve-lines { white-space: pre-wrap; }

/* Sign in */
.login-layout { min-height: 100svh; display: grid; grid-template-columns: 46% 54%; }
.development-banner + .login-layout { min-height: calc(100svh - 31px); }
.login-intro { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 46px 12.5%; color: var(--white); background: var(--navy-deep); overflow: hidden; }
.login-intro::after { content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid #ffffff0a; border-radius: 50%; right: -230px; bottom: -160px; box-shadow: 0 0 0 52px #ffffff03, 0 0 0 105px #ffffff02; pointer-events: none; }
.brand-light { color: var(--white); }
.login-message { padding: 70px 0 90px; position: relative; z-index: 1; }
.login-message .eyebrow { color: #71c8c3; margin-bottom: 23px; font-size: 10px; }
.login-message h1 { font-size: clamp(30px, 3.2vw, 48px); font-weight: 560; line-height: 1.2; letter-spacing: -.035em; }
.login-message > p:not(.eyebrow) { color: #adc0cd; font-size: 15px; line-height: 1.8; margin-top: 26px; }
.intro-line { width: 42px; height: 3px; background: #48afa7; margin-top: 42px; }
.login-intro-footer { color: #8da6b8; font-size: 11px; }
.login-form-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 60px 32px; background: var(--white); position: relative; }
.login-card { max-width: 380px; width: 100%; }
.form-kicker { font-size: 10px; font-weight: 750; color: var(--teal); letter-spacing: .14em; }
.login-card h2 { font-size: 28px; font-weight: 650; letter-spacing: -.035em; margin-top: 11px; }
.form-description { color: var(--muted); margin-top: 11px; font-size: 13px; margin-bottom: 32px; }
.stack-form { display: flex; flex-direction: column; gap: 21px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 12px; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; min-height: 45px; border: 1px solid #cbd7de; border-radius: 6px; padding: 10px 12px; color: var(--ink); background: var(--white); }
.field input::placeholder { color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.field textarea { resize: vertical; }
.password-field { position: relative; }
.password-field input { padding-right: 72px; }
.password-toggle { position: absolute; right: 7px; top: 6px; min-height: 33px; padding: 4px 9px; background: transparent; color: var(--teal); border: 0; border-radius: 4px; font-size: 11px; font-weight: 650; }
.password-toggle:hover { background: var(--teal-pale); }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.6; }
.login-help { color: var(--muted); border-top: 1px solid var(--border); padding-top: 23px; margin-top: 29px; font-size: 12px; line-height: 1.8; }
.login-copyright { position: absolute; bottom: 32px; color: var(--muted); font-size: 10px; }
.notice { display: flex; flex-direction: column; gap: 4px; border: 1px solid #cedfe8; background: #f1f7fa; border-radius: 7px; padding: 12px 15px; font-size: 12px; margin-bottom: 22px; }
.notice-error { background: #fff4f2; border-color: #f1cdc7; color: #9b352a; }
.notice-title { font-weight: 700; }

/* Application shell */
.workspace { display: flex; min-height: 100svh; }
.development-banner + .workspace { min-height: calc(100svh - 31px); }
.sidebar { display: flex; flex-direction: column; flex: 0 0 225px; padding: 32px 22px 20px; background: var(--navy-deep); color: #b8c7d2; }
.sidebar .brand { color: var(--white); margin-left: 5px; }
.sidebar .brand-mark { width: 34px; height: 37px; font-size: 23px; }
.sidebar .brand-name { font-size: 16px; }
.sidebar .brand-name > span { font-size: 7px; }
.nav-label { font-size: 9px; letter-spacing: .14em; color: #7290a5; margin: 53px 12px 16px; font-weight: 650; }
.navigation { display: flex; flex-direction: column; gap: 7px; }
.nav-link { display: flex; gap: 12px; align-items: center; color: #a9bfce; padding: 12px 13px; border-radius: 6px; font-size: 12px; font-weight: 550; }
.nav-link:hover { text-decoration: none; background: #ffffff08; color: #e1f3f1; }
.nav-link.is-active { color: #d7f4ee; background: #16626068; box-shadow: inset 3px 0 #46b5a9; }
.nav-symbol { font-size: 19px; line-height: 1; width: 18px; text-align: center; }
.sidebar-footer { font-size: 9px; display: flex; align-items: center; gap: 8px; margin: auto 12px 0; padding-top: 40px; color: #7896a9; }
.sidebar-footer .small-dot { color: #3eb2a2; width: 5px; height: 5px; }
.workspace-main { flex: 1; min-width: 0; }
.topbar { min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--white); padding: 16px 42px; border-bottom: 1px solid var(--border); }
.topbar-context { color: var(--muted); font-size: 11px; }
.topbar-context > span { margin: 0 11px; color: #bfccd4; }
.account { display: flex; align-items: center; gap: 10px; }
.avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-pale); font-size: 11px; font-weight: 650; }
.account-name { font-size: 11px; font-weight: 650; max-width: 170px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.account form { border-left: 1px solid var(--border); padding-left: 8px; margin-left: 7px; }
.page-content { padding: 37px 42px 20px; max-width: 1600px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 29px; }
.page-heading h1 { font-size: 30px; font-weight: 650; letter-spacing: -.035em; margin-top: 5px; }
.page-subtitle { color: var(--muted); font-size: 12px; margin-top: 9px; }
.internal-badge { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 10px; color: var(--teal); background: var(--teal-pale); padding: 6px 10px; border: 1px solid #d5ebe6; border-radius: 20px; }
.internal-badge .small-dot { width: 5px; height: 5px; }
.panel { background: var(--white); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 3px 9px #142c3c03; }
.panel-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 25px; }
.panel-title-group { display: flex; align-items: center; gap: 12px; }
.panel-title-group h2 { font-size: 14px; font-weight: 650; }
.count-badge { color: var(--muted); background: #f1f5f7; border: 1px solid #e9eef1; border-radius: 4px; font-size: 9px; white-space: nowrap; padding: 3px 7px; }
.search-form { display: flex; align-items: center; border: 1px solid var(--border); background: #fbfcfd; border-radius: 6px; padding: 3px; width: 330px; gap: 3px; }
.search-symbol { font-size: 23px; color: #7b909e; padding: 0 6px 3px 9px; line-height: 1; }
.search-form input { width: 100%; min-width: 0; border: 0; padding: 6px 0; font-size: 11px; color: var(--ink); background: transparent; }
.search-form input::placeholder { color: var(--muted); }
.search-form .button { min-height: 29px; padding: 6px 12px; font-size: 10px; }
.search-summary { display: flex; justify-content: space-between; gap: 18px; padding: 11px 25px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.search-summary span { overflow-wrap: anywhere; }
.search-summary a { flex-shrink: 0; }
.table-scroll { overflow-x: auto; border-radius: 0 0 10px 10px; }
.customers-table { width: 100%; border-collapse: collapse; text-align: left; }
.customers-table th { color: var(--muted); font-size: 9px; letter-spacing: .03em; font-weight: 650; padding: 13px 20px; background: #f7f9fb; border-block: 1px solid var(--border); white-space: nowrap; }
.customers-table th:first-child, .customers-table td:first-child { padding-left: 25px; }
.customers-table th:last-child, .customers-table td:last-child { padding-right: 25px; }
.customers-table td { padding: 18px 20px; font-size: 11px; border-bottom: 1px solid #edf1f4; overflow-wrap: anywhere; }
.customers-table tbody tr:last-child td { border-bottom: 0; }
.customers-table tbody tr:hover { background: #fcfefe; }
.customer-link { display: flex; align-items: center; gap: 11px; min-width: 180px; color: var(--ink); font-weight: 650; }
.customer-monogram { display: grid; place-items: center; width: 32px; height: 34px; flex-shrink: 0; background: #edf4f5; color: #407e83; border: 1px solid #e3eef0; border-radius: 7px; font-size: 12px; font-weight: 650; }
.customers-table .identifier { color: var(--muted); font-size: 9px; max-width: 150px; }
.table-action { text-align: right; white-space: nowrap; }
.detail-link { display: inline-flex; align-items: center; gap: 13px; color: var(--teal); font-size: 10px; font-weight: 650; }
.customer-filter-form { display: grid; grid-template-columns: minmax(170px, 1fr) 140px 140px auto; align-items: end; gap: 14px; padding: 0 25px 23px; }
.customer-filter-form .field { gap: 6px; }
.customer-filter-form .field label { font-size: 10px; }
.customer-filter-form input, .customer-filter-form select { min-height: 40px; font-size: 11px; }
.customer-filter-form .button { min-height: 40px; font-size: 11px; gap: 12px; }
.customer-name-group { display: flex; flex-direction: column; gap: 4px; }
.customer-list-code { color: var(--muted); font-weight: 400; font-size: 9px; }
.canonical-customers-table .dynamic-value { min-width: 140px; max-width: 260px; }
.scope-badge { display: inline-block; color: #526b7a; font-size: 10px; white-space: nowrap; }
.record-status { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 9px; white-space: nowrap; }
.status-active { color: #066751; background: #e8f4ed; }
.status-passive { color: #625b50; background: #f2f0ec; }
.unit-context { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 15px; font-size: 11px; }
.unit-context > span { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--teal); }
.unit-context > a { font-size: 10px; }
.unit-context a > span { margin-left: 8px; }
.unit-picker { max-width: 900px; }
.unit-picker-heading { padding: 4px 0 24px; }
.unit-picker-heading h2 { font-weight: 650; font-size: 17px; }
.unit-picker-heading p { margin-top: 9px; color: var(--muted); font-size: 12px; }
.unit-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 23px; }
.unit-card { display: flex; flex-direction: column; padding: 29px; background: var(--white); border: 1px solid var(--border); border-radius: 11px; color: var(--ink); }
.unit-card:hover { border-color: #8dbbb6; background: #fcfefe; text-decoration: none; }
.unit-card-mark { display: grid; place-items: center; width: 49px; height: 52px; background: var(--teal-pale); color: var(--teal); border: 1px solid #d2e8e3; border-radius: 11px; font-size: 23px; font-weight: 650; margin-bottom: 28px; }
.unit-card h3 { font-size: 22px; font-weight: 650; }
.unit-card p { font-size: 12px; margin-top: 10px; color: var(--muted); }
.unit-card-action { display: flex; align-items: center; justify-content: space-between; color: var(--teal); font-size: 12px; font-weight: 650; border-top: 1px solid var(--border); padding-top: 20px; margin-top: 34px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 25px; border-top: 1px solid var(--border); }
.pagination p { color: var(--muted); font-size: 10px; }
.pagination nav { display: flex; justify-content: flex-end; gap: 8px; }
.pagination .button { gap: 10px; font-size: 10px; }
.empty-state { padding: 65px 25px 75px; text-align: center; border-top: 1px solid var(--border); }
.empty-symbol { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 20px; font-size: 27px; color: #6f9fa2; background: #edf5f5; border-radius: 14px; }
.empty-state h3 { font-size: 16px; font-weight: 650; }
.empty-state p { margin-top: 10px; font-size: 12px; color: var(--muted); }
.empty-state .button { margin-top: 22px; font-size: 12px; }
.page-footer { display: flex; gap: 8px; color: var(--muted); font-size: 9px; margin-top: 25px; padding-bottom: 5px; }

/* Customer detail */
.back-link { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 600; margin-bottom: 20px; }
.customer-overview { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; padding: 26px 29px; border: 1px solid #d4e4e6; border-radius: 10px; background: #edf5f5; }
.customer-heading { display: flex; align-items: center; gap: 19px; min-width: 0; }
.customer-monogram-large { background: var(--white); border-color: #d4e6e6; width: 58px; height: 62px; border-radius: 11px; font-size: 24px; }
.customer-heading h2 { font-size: 24px; font-weight: 650; letter-spacing: -.025em; margin-top: 4px; overflow-wrap: anywhere; }
.customer-heading .eyebrow { font-size: 9px; }
.customer-id { color: #526b7a; font-size: 10px; margin-top: 7px; overflow-wrap: anywhere; }
.customer-id .identifier { font-size: 10px; }
.view-badge { font-size: 10px; color: var(--teal); border: 1px solid #c8ddde; padding: 5px 11px; border-radius: 20px; white-space: nowrap; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.detail-panel { padding: 24px 26px; }
.panel-section-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 25px; }
.panel-section-heading h2 { font-size: 14px; font-weight: 650; }
.section-number { display: grid; place-items: center; font-size: 9px; width: 26px; height: 26px; flex-shrink: 0; background: #f0f5f7; color: #7a96a5; border-radius: 6px; }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 116px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid #edf1f3; }
.detail-list > div:first-child { padding-top: 0; }
.detail-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 11px; }
.detail-list dd { margin: 0; font-size: 11px; font-weight: 550; overflow-wrap: anywhere; }
.detail-list dd.identifier { font-weight: 400; font-size: 10px; }

/* Administration */
.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 235px; gap: 26px; align-items: start; }
.user-form-panel { padding: 27px 29px; }
.user-form-panel .panel-section-heading { border-bottom: 1px solid var(--border); padding-bottom: 23px; }
.panel-section-heading p { color: var(--muted); font-size: 11px; margin-top: 5px; }
.user-form { gap: 25px; }
.permissions-input { font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.7; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.option-fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
.option-fieldset legend { font-size: 12px; font-weight: 650; padding: 0; }
.option-fieldset > .field-hint { margin: 6px 0 12px; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.checkbox-option { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 6px; padding: 11px 12px; font-size: 11px; cursor: pointer; overflow-wrap: anywhere; }
.checkbox-option:hover { border-color: #8fbcb8; background: #f7fcfb; }
.checkbox-option:has(input:checked) { border-color: #83b4ae; background: #edf8f4; }
.checkbox-option input { margin: 0; width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--teal); }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 21px; border-top: 1px solid var(--border); }
.form-actions p { font-size: 10px; color: var(--muted); max-width: 230px; }
.form-actions .button { font-size: 12px; }
.admin-note { padding: 4px 0; }
.note-mark { display: grid; place-items: center; height: 28px; width: 28px; border: 1px solid #d3e4e5; background: #eaf4f4; border-radius: 50%; font-size: 14px; font-family: Georgia, serif; color: var(--teal); margin-bottom: 16px; }
.admin-note h2 { font-size: 14px; font-weight: 650; }
.admin-note p { font-size: 11px; color: var(--muted); line-height: 1.8; margin-top: 12px; }
.admin-note ul { margin: 17px 0; padding-left: 16px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.admin-note li { margin-bottom: 11px; padding-left: 2px; }
.admin-note .note-foot { border-top: 1px solid var(--border); padding-top: 17px; font-size: 10px; }
.error-page { display: grid; place-items: center; min-height: 100svh; padding: 30px; }
.error-page .development-banner { position: absolute; left: 0; right: 0; top: 0; }
.error-card { width: min(100%, 480px); padding: 44px; background: var(--white); border: 1px solid var(--border); border-radius: 13px; }
.error-code { font-size: 60px; font-weight: 650; color: #d7e5e9; letter-spacing: -.06em; margin-top: 35px; }
.error-card h1 { font-size: 25px; font-weight: 650; }
.error-card > p:not(.error-code) { color: var(--muted); font-size: 13px; margin-top: 14px; }
.error-card > .button { margin-top: 28px; font-size: 12px; }

@media (min-width: 1600px) {
  .page-content { padding-top: 47px; }
  .customers-table td { padding-top: 22px; padding-bottom: 22px; }
}
@media (max-width: 1180px) {
  .sidebar { flex-basis: 195px; padding-inline: 15px; }
  .topbar { padding-inline: 28px; }
  .page-content { padding-inline: 28px; }
  .panel-toolbar { gap: 16px; }
  .search-form { width: 100%; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-note { padding: 0 4px; max-width: 600px; }
  .admin-note ul { display: flex; gap: 28px; flex-wrap: wrap; }
  .admin-note li { max-width: 210px; }
}
@media (max-width: 850px) {
  .sidebar { flex-basis: 175px; padding-inline: 10px; }
  .sidebar .brand { margin-left: 9px; gap: 8px; }
  .sidebar .brand-name { font-size: 14px; }
  .sidebar .brand-name > span { font-size: 6px; }
  .sidebar .brand-mark { width: 29px; height: 32px; font-size: 21px; border-radius: 8px 8px 8px 2px; }
  .nav-link { font-size: 11px; gap: 9px; }
  .topbar { padding-inline: 22px; }
  .topbar-context { display: none; }
  .account { margin-left: auto; }
  .page-content { padding: 27px 22px 15px; }
  .page-heading h1 { font-size: 27px; }
  .detail-grid { grid-template-columns: 1fr; gap: 17px; }
  .panel-toolbar { padding: 19px; }
  .customer-filter-form { grid-template-columns: 1fr 1fr; padding: 0 19px 20px; }
  .customer-filter-form .filter-query { grid-column: 1 / -1; }
  .customer-filter-form .button { grid-column: 1 / -1; }
  .login-intro { padding: 35px 10%; }
  .login-message h1 { font-size: 31px; }
  .login-message > p:not(.eyebrow) { font-size: 13px; }
  .login-card h2 { font-size: 24px; }
}
@media (max-width: 650px) {
  .login-layout { display: block; }
  .login-intro { padding: 25px; }
  .login-intro .brand-mark { width: 30px; height: 33px; font-size: 21px; }
  .login-intro .brand-name { font-size: 15px; }
  .login-intro .brand-name > span { font-size: 6px; }
  .login-message { padding: 32px 0 8px; }
  .login-message .eyebrow { font-size: 8px; margin-bottom: 12px; }
  .login-message h1 { font-size: 29px; }
  .login-message > p:not(.eyebrow), .intro-line, .login-intro-footer { display: none; }
  .login-form-panel { min-height: 510px; padding: 35px 25px 75px; justify-content: flex-start; }
  .login-card { max-width: 440px; }
  .login-card h2 { font-size: 24px; }
  .form-description { margin-bottom: 26px; }
  .login-copyright { bottom: 24px; }
  .workspace { display: block; }
  .sidebar { padding: 18px 20px 0; display: block; }
  .sidebar .brand { margin-left: 0; }
  .sidebar .brand-name { font-size: 15px; }
  .sidebar .brand-name > span { font-size: 6px; }
  .nav-label, .sidebar-footer { display: none; }
  .navigation { flex-direction: row; gap: 13px; margin-top: 17px; overflow-x: auto; }
  .nav-link { padding: 12px 3px 14px; border-radius: 0; white-space: nowrap; font-size: 11px; }
  .nav-link.is-active { background: none; box-shadow: inset 0 -2px #46b5a9; }
  .nav-symbol { font-size: 17px; }
  .topbar { min-height: 58px; padding: 10px 16px; }
  .account { width: 100%; }
  .account-name { flex: 1; max-width: none; }
  .account form { margin-left: auto; border: 0; }
  .page-content { padding: 25px 16px 12px; }
  .page-heading { gap: 12px; margin-bottom: 23px; align-items: flex-start; }
  .page-heading h1 { font-size: 27px; }
  .page-subtitle { font-size: 11px; line-height: 1.75; max-width: 290px; }
  .page-heading .eyebrow { font-size: 8px; }
  .internal-badge { font-size: 8px; padding: 5px 7px; gap: 5px; margin-top: 20px; }
  .panel-toolbar { padding: 17px; gap: 16px; }
  .customer-filter-form { padding-inline: 17px; gap: 12px; }
  .customer-filter-form input, .customer-filter-form select { font-size: 12px; }
  .panel-title-group { gap: 8px; }
  .panel-title-group h2 { font-size: 13px; }
  .count-badge { font-size: 8px; }
  .search-form { min-height: 40px; }
  .search-form input { font-size: 12px; }
  .customers-table { min-width: 740px; }
  .customers-table th:first-child, .customers-table td:first-child { padding-left: 17px; }
  .customers-table th:last-child, .customers-table td:last-child { padding-right: 17px; }
  .customers-table td { padding-block: 16px; }
  .search-summary { padding-inline: 17px; font-size: 10px; }
  .pagination { padding: 15px 17px; flex-wrap: wrap; }
  .pagination nav { margin-left: auto; }
  .customer-overview { padding: 20px 17px; gap: 10px; align-items: flex-start; }
  .customer-heading { gap: 12px; align-items: flex-start; }
  .customer-monogram-large { width: 41px; height: 45px; font-size: 18px; }
  .customer-heading h2 { font-size: 20px; }
  .customer-heading .eyebrow { font-size: 8px; }
  .customer-id { font-size: 9px; }
  .customer-id .identifier { font-size: 9px; }
  .view-badge { display: none; }
  .detail-panel { padding: 21px 19px; }
  .detail-list > div { grid-template-columns: 100px 1fr; gap: 12px; }
  .unit-card-grid { grid-template-columns: 1fr; gap: 16px; }
  .unit-card { padding: 24px; }
  .unit-card-mark { margin-bottom: 20px; }
  .unit-card-action { margin-top: 26px; }
  .form-grid, .checkbox-grid { grid-template-columns: 1fr; }
  .user-form-panel { padding: 22px 19px; }
  .form-actions { align-items: stretch; flex-direction: column; gap: 15px; }
  .form-actions p { max-width: none; }
  .admin-note ul { display: block; }
  .admin-note li { max-width: none; }
  .error-page { padding: 20px; }
  .error-card { padding: 30px 26px; }
  .error-card h1 { font-size: 23px; }
  .page-footer { flex-wrap: wrap; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* v0.5.3: responsive application layout; all content remains server-rendered. */
:root { --navy: #142e41; --navy-deep: #102638; --teal: #087c77; --teal-dark: #05635f; --teal-pale: #eaf5f1; --ink: #233b4c; --muted: #536b79; --border: #dfe7eb; --canvas: #f5f7f9; }
body { font-size: 14px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
.development-banner { position: sticky; top: 0; z-index: 30; min-height: 36px; padding: 7px 16px; font-size: 12px; }
.brand { gap: 10px; min-height: 44px; }
.brand-mark { width: 35px; height: 39px; border-radius: 9px 9px 9px 2px; font-size: 26px; }
.brand-name { font-size: 17px; letter-spacing: .1em; }
.brand-name > span { font-size: 9px; letter-spacing: .26em; margin-top: 5px; }
.button { min-height: 44px; font-size: 14px; padding: 10px 17px; border-radius: 6px; }
.button-small { min-height: 44px; font-size: 12px; padding: 9px 12px; }
.eyebrow { font-size: 11px; letter-spacing: .12em; }
.identifier { font-size: 12px; }
.workspace, .development-banner + .workspace { display: block; min-height: calc(100svh - 36px); }
.app-header { min-height: 79px; display: flex; align-items: stretch; justify-content: flex-start; gap: 24px; padding: 0 30px; background: #fff; border-bottom: 1px solid var(--border); }
.app-header > .brand { flex: 0 0 179px; align-self: center; }
.primary-nav { display: flex; align-items: stretch; flex: 1; gap: 3px; }
.primary-nav > a, .primary-nav > button { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 0; background: none; padding: 0 15px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.primary-nav > a:hover, .primary-nav > button:hover { background: #f5f9f8; color: var(--teal); text-decoration: none; }
.primary-nav > a.is-active { color: var(--teal); }
.primary-nav > a.is-active::after { content: ""; position: absolute; bottom: -1px; left: 14px; right: 14px; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal); }
.account { gap: 9px; align-self: center; flex-shrink: 0; }
.account-name { font-size: 12px; max-width: 135px; white-space: nowrap; }
.avatar { width: 30px; height: 30px; font-size: 12px; }
.account form { padding-left: 10px; margin-left: 3px; }
.account .button { font-size: 11px; padding-inline: 3px; white-space: normal; max-width: 105px; text-align: left; }
.menu-toggle, .mobile-context, .submenu-toggle { display: none; }
.app-layout { display: grid; grid-template-columns: 233px minmax(0, 1fr); min-height: calc(100svh - 115px); }
.context-sidebar { display: flex; flex-direction: column; flex-basis: auto; padding: 31px 18px 24px; background: #fff; color: var(--ink); border-right: 1px solid var(--border); }
.sidebar-heading { display: flex; align-items: center; gap: 11px; padding: 0 12px 25px; border-bottom: 1px solid #edf1f3; }
.sidebar-module-symbol { display: grid; place-items: center; width: 34px; height: 37px; border-radius: 8px; background: #edf4f6; color: #587584; font-size: 15px; font-weight: 650; }
.sidebar-heading .nav-label { font-size: 9px; letter-spacing: .12em; margin: 0 0 4px; color: var(--muted); }
.sidebar-heading h2 { font-size: 15px; font-weight: 650; }
.navigation { display: flex; flex-direction: column; gap: 5px; margin: 0; padding-top: 23px; }
.nav-link { position: relative; display: block; min-height: 44px; padding: 12px 13px 12px 28px; border-radius: 5px; color: var(--muted); font-size: 13px; font-weight: 550; line-height: 1.5; }
.nav-link::before { content: ""; position: absolute; left: 14px; top: 21px; width: 4px; height: 4px; border-radius: 50%; background: #9daeb8; }
.nav-link:hover { background: #f6faf9; color: var(--teal); text-decoration: none; }
.nav-link.is-active { background: var(--teal-pale); color: var(--teal); box-shadow: none; font-weight: 650; }
.nav-link.is-active::before { background: var(--teal); }
.sidebar-footer { display: flex; align-items: center; margin: auto 12px 0; padding-top: 60px; color: var(--muted); font-size: 11px; }
.workspace-main { min-width: 0; }
.page-content { padding: 27px 36px 20px; max-width: 1900px; min-width: 0; outline: none; }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 12px; min-height: 24px; margin-bottom: 29px; }
.breadcrumb > span:nth-child(2) { color: #899daa; }
.selected-unit { margin-left: auto; color: var(--teal); background: #eaf5f1; border: 1px solid #d4e7de; border-radius: 4px; padding: 3px 8px; font-size: 11px; white-space: nowrap; }
.page-heading { margin-bottom: 27px; gap: 22px; align-items: center; }
.page-heading h1 { font-size: 32px; letter-spacing: -.04em; margin-top: 6px; }
.page-heading .eyebrow { font-size: 10px; }
.page-subtitle { font-size: 14px; margin-top: 9px; }
.internal-badge { font-size: 12px; padding: 6px 10px; border-radius: 5px; }
.panel { border-radius: 9px; box-shadow: 0 3px 8px #233b4c03; }
.panel-toolbar { padding: 24px 25px 21px; }
.panel-title-group h2 { font-size: 16px; }
.count-badge { font-size: 12px; color: #516b7a; padding: 3px 7px; }
.unit-context { font-size: 13px; margin-bottom: 15px; }
.unit-context > a { font-size: 12px; min-height: 32px; display: inline-flex; align-items: center; gap: 10px; }
.customer-filter-form { grid-template-columns: minmax(220px, 1fr) 155px 155px auto; padding: 0 25px 23px; gap: 14px; }
.field label, .customer-filter-form .field label { font-size: 12px; }
.field input, .field select, .field textarea { min-height: 44px; font-size: 14px; padding: 10px 12px; }
.field input::placeholder { color: #5a707e; }
.customer-filter-form .filter-query { grid-column: auto; }
.customer-filter-form input, .customer-filter-form select { font-size: 14px; min-height: 44px; }
.customer-filter-form .button { min-height: 44px; font-size: 13px; grid-column: auto; }
.search-summary { font-size: 12px; padding: 12px 25px; align-items: center; }
.search-summary > a { display: inline-flex; align-items: center; min-height: 32px; }
.table-scroll { border-radius: 0 0 9px 9px; }
.customers-table { min-width: 800px; }
.customers-table th { font-size: 12px; padding: 13px 18px; color: #536c7b; }
.customers-table td { font-size: 13px; padding: 20px 18px; }
.customer-link { min-width: 220px; font-size: 14px; gap: 11px; }
.customer-monogram { width: 35px; height: 38px; font-size: 14px; border-radius: 7px; }
.customer-list-code, .customers-table .identifier { font-size: 11px; color: var(--muted); }
.canonical-customers-table .dynamic-value { min-width: 140px; max-width: 260px; }
.scope-badge { font-size: 12px; color: #4b6575; }
.record-status { font-size: 12px; padding: 3px 7px; }
.status-active { color: #2f7358; background: #eef7f0; }
.status-passive { color: #786a5a; background: #f4f0ea; }
.detail-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.pagination { padding: 16px 25px; }
.pagination p { font-size: 12px; }
.pagination .button { min-height: 44px; font-size: 12px; }
.empty-state { padding: 55px 25px 65px; }
.empty-state h3 { font-size: 17px; }
.empty-state p { font-size: 14px; line-height: 1.8; }
.empty-state .button { font-size: 13px; }
.page-footer { font-size: 11px; margin-top: 25px; line-height: 1.8; }
.module-placeholder { display: flex; align-items: flex-start; gap: 12px; border: 1px solid #dce5ea; background: #f1f5f7; padding: 15px 18px; margin-top: 24px; border-radius: 7px; }
.module-placeholder-symbol { display: grid; place-items: center; width: 23px; height: 23px; flex-shrink: 0; margin-top: 1px; border: 1px solid #aabfc9; border-radius: 50%; color: #567787; font-family: Georgia, serif; font-size: 14px; }
.module-placeholder h2 { color: #4d6878; font-size: 13px; font-weight: 650; }
.module-placeholder p { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 3px; }
.unit-picker { max-width: 950px; }
.unit-picker-heading h2 { font-size: 19px; }
.unit-picker-heading p { font-size: 14px; line-height: 1.8; }
.unit-card { padding: 29px; }
.unit-card h3 { font-size: 24px; }
.unit-card p, .unit-card-action { font-size: 14px; }
.unit-card-action { min-height: 44px; padding-top: 20px; }
.back-link { min-height: 44px; font-size: 13px; margin-bottom: 19px; }
.customer-overview { padding: 27px 29px; border-radius: 9px; }
.customer-monogram-large { width: 60px; height: 65px; font-size: 26px; }
.customer-heading h2 { font-size: 28px; }
.customer-heading .eyebrow { font-size: 12px; }
.customer-id { font-size: 13px; color: #486b6e; }
.view-badge { font-size: 12px; }
.detail-grid { gap: 23px; align-items: start; }
.detail-panel { padding: 25px 27px; }
.panel-section-heading h2 { font-size: 16px; }
.section-number { font-size: 11px; width: 28px; height: 29px; }
.detail-list > div { grid-template-columns: 135px minmax(0, 1fr); gap: 18px; padding: 15px 0; }
.detail-list dt { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.detail-list dd { font-size: 14px; line-height: 1.7; font-weight: 400; }
.detail-list dd.identifier { font-size: 12px; }
.admin-layout { grid-template-columns: minmax(0, 1fr) 250px; }
.user-form-panel { padding: 28px 30px; }
.panel-section-heading p { font-size: 13px; line-height: 1.8; }
.option-fieldset legend { font-size: 14px; }
.field-hint { font-size: 12px; }
.checkbox-option { min-height: 44px; font-size: 13px; padding: 12px; }
.form-actions p { font-size: 12px; line-height: 1.8; }
.form-actions .button { font-size: 14px; }
.admin-note h2 { font-size: 16px; }
.admin-note p, .admin-note ul, .admin-note .note-foot { font-size: 13px; line-height: 1.8; }
.permissions-input { font-size: 13px; }
.notice { font-size: 14px; line-height: 1.8; padding: 13px 16px; }
.client-feedback:empty { display: none; }
.app-status:empty { display: none; }
.app-status:not(:empty) { color: var(--teal); background: var(--teal-pale); border: 1px solid #d5e7df; padding: 10px 14px; border-radius: 6px; margin-bottom: 18px; font-size: 13px; }
.client-error-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.client-error-actions:empty { display: none; }
[data-app-shell][aria-busy="true"] .customer-filter-form { opacity: .7; }
.login-layout { min-height: 100svh; }
.development-banner + .login-shell .login-layout { min-height: calc(100svh - 36px); }
.login-intro { padding: 48px 12%; }
.login-message .eyebrow { font-size: 11px; }
.login-message h1 { font-size: clamp(35px, 3.6vw, 55px); font-weight: 550; line-height: 1.16; letter-spacing: -.045em; }
.login-message > p:not(.eyebrow) { font-size: 15px; line-height: 1.9; }
.login-intro-footer { font-size: 12px; color: #adc2ce; }
.login-card { max-width: 390px; }
.form-kicker { font-size: 11px; }
.login-card h2 { font-size: 29px; }
.form-description { font-size: 14px; line-height: 1.8; }
.login-help { font-size: 13px; }
.login-copyright { font-size: 12px; }
.password-toggle { top: 1px; right: 3px; min-height: 42px; min-width: 60px; font-size: 12px; }
.error-shell { width: min(100%, 540px); }
.error-card { width: 100%; padding: 40px; }
.error-card > p:not(.error-code) { font-size: 14px; line-height: 1.8; }
.error-card > .button { font-size: 14px; }
.recovery-shell { width: min(calc(100% - 32px), 48rem); margin: 40px auto; padding: 20px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.recovery-shell .page-content { padding: 20px; }

/* Read-only orders: the same workspace, with independent quantity and tick data. */
.orders-table { min-width: 1040px; }
.orders-table td { vertical-align: middle; }
.order-code-link { display: flex; flex-direction: column; gap: 6px; min-height: 44px; justify-content: center; min-width: 135px; overflow-wrap: anywhere; }
.order-code-link strong { font-size: 14px; font-weight: 650; color: var(--navy); }
.order-code-link > span { font-size: 12px; color: var(--muted); }
.order-customer-name { display: block; max-width: 240px; min-width: 110px; overflow-wrap: anywhere; font-weight: 550; line-height: 1.65; }
.order-quantity, .order-money { font-variant-numeric: tabular-nums; }
.order-money { min-width: 145px; max-width: 205px; overflow-wrap: anywhere; }
.quantity-inline { display: grid; grid-template-columns: repeat(3, minmax(38px, 1fr)); gap: 12px; min-width: 165px; margin: 0; }
.quantity-inline > div { min-width: 0; }
.quantity-inline dt { font-size: 11px; color: var(--muted); margin-bottom: 5px; font-weight: 400; }
.quantity-inline dd { font-size: 13px; margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.order-stage { display: block; margin-top: 6px; max-width: 160px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.order-status-active { background: #eef7f0; color: #2f7358; }
.order-status-closed { background: #edf1f5; color: #526477; }
.order-status-cancelled { background: #fbeded; color: #a04747; }
.order-status-legacy { background: #f5f0e8; color: #806a4e; }
.order-status-review { background: #fbf3e7; color: #8c632d; }
.order-list-context { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0 25px 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.order-list-context p { margin: 0; }
.order-list-context > a { min-height: 32px; display: inline-flex; align-items: center; }
.readonly-caption { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin: 18px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.readonly-caption .view-badge { flex-shrink: 0; }
.order-overview { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.order-overview .customer-heading { min-width: 0; flex: 1 1 300px; }
.order-overview .customer-heading > div { min-width: 0; }
.order-overview h2 { overflow-wrap: anywhere; }
.order-customer-heading { margin: 9px 0 0; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.order-customer-heading > a { display: inline-flex; align-items: center; min-height: 44px; }
.overview-badges { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.order-quantity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.order-quantity-card { padding: 21px 23px; min-width: 0; }
.order-quantity-card h3 { font-size: 12px; font-weight: 500; color: var(--muted); margin: 0 0 10px; }
.order-quantity-card p { font-size: 25px; font-weight: 600; color: var(--navy); margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.order-quantity-card p .muted { font-size: 14px; font-weight: 400; }
.order-detail-grid { margin-top: 0; }
.order-detail-grid .detail-list dd, .order-detail-grid .detail-list dd > a { overflow-wrap: anywhere; min-width: 0; }
.order-detail-grid .detail-list dd > a { display: inline-flex; align-items: center; min-height: 44px; }
.order-price { font-size: 18px !important; font-weight: 600 !important; }
.order-total-row dt, .order-total-row dd { font-weight: 650 !important; }
.order-total-row dd { font-size: 18px; }
.field-review { display: block; margin-top: 6px; color: #8c632d; font-size: 12px; line-height: 1.7; }
.panel-description { margin: 4px 0 15px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.tick-list .tick-state { display: inline-flex; align-items: center; border-radius: 4px; background: #f0f3f5; padding: 3px 8px; color: #5f727e; font-size: 12px; }
.tick-list .tick-yes { color: #2f7358; background: #eef7f0; }
.order-optional-panel > p { font-size: 14px; line-height: 1.8; }
.customer-orders-action { margin: 18px 0 0; }
.customer-orders-action > .button { min-height: 44px; font-size: 13px; }

@media (max-width: 1050px) {
  .order-quantity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .orders-table { min-width: 0; }
  .orders-table .order-code-cell { display: block; }
  .order-code-link { min-width: 0; width: 100%; }
  .order-code-link strong { font-size: 16px; }
  .order-code-link > span { font-size: 12px; }
  .order-customer-name { min-width: 0; max-width: none; text-align: right; flex: 1 1 58%; }
  .orders-table td.order-money { max-width: none; min-width: 0; flex-wrap: wrap; }
  .order-money .field-review { width: 100%; text-align: right; margin-top: 0; }
  .quantity-inline { min-width: 0; gap: 13px; flex: 1 1 58%; }
  .quantity-inline dt { font-size: 11px; }
  .quantity-inline dd { font-size: 13px; }
  .order-list-context { padding: 0 17px 17px; }
  .order-list-context > a { min-height: 44px; }
  .order-overview { gap: 14px; }
  .order-overview .customer-heading { flex-basis: 100%; }
  .order-overview .overview-badges { margin-left: 55px; }
  .order-quantity-grid { gap: 11px; margin: 17px 0; }
  .order-quantity-card { padding: 17px 15px; }
  .order-quantity-card h3 { font-size: 12px; }
  .order-quantity-card p { font-size: 23px; }
  .order-customer-heading { font-size: 14px; }
  .readonly-caption { font-size: 12px; }
  .order-detail-grid .detail-list > div { grid-template-columns: 108px minmax(0, 1fr); }
}

@media (min-width: 1600px) {
  .page-content { padding: 35px 48px 24px; }
  .app-header { padding-inline: 35px; gap: 30px; }
  .primary-nav > a, .primary-nav > button { padding-inline: 21px; }
  .customers-table td { padding-block: 22px; }
}
@media (max-width: 1250px) {
  .app-header { padding-inline: 23px; gap: 14px; }
  .app-header > .brand { flex-basis: 165px; }
  .primary-nav { gap: 0; }
  .primary-nav > a, .primary-nav > button { padding-inline: 11px; font-size: 12px; }
  .account-name { max-width: 95px; }
  .account .avatar { display: none; }
  .app-layout { grid-template-columns: 213px minmax(0, 1fr); }
  .context-sidebar { padding-inline: 13px; }
  .page-content { padding-inline: 26px; }
  .customer-filter-form { grid-template-columns: minmax(170px, 1fr) 135px 135px auto; gap: 11px; }
  .detail-list > div { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-note { max-width: 700px; }
}
@media (max-width: 1050px) {
  .customer-filter-form { grid-template-columns: 1fr 1fr auto; }
  .customer-filter-form .filter-query { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-list > div { grid-template-columns: 160px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app-header { min-height: 78px; flex-wrap: wrap; align-items: center; padding: 15px 22px; gap: 0; }
  .app-header > .brand { flex: 1; align-self: auto; }
  .brand-mark { width: 31px; height: 35px; font-size: 23px; }
  .brand-name { font-size: 15px; }
  .brand-name > span { font-size: 8px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: var(--muted); font-size: 13px; }
  .menu-lines { position: relative; display: inline-block; width: 13px; height: 9px; border-block: 1px solid currentColor; }
  .menu-lines::after { content: ""; position: absolute; left: 0; top: 3px; width: 13px; height: 1px; background: currentColor; }
  .account { width: 100%; gap: 10px; justify-content: flex-end; order: 4; padding-top: 10px; margin-top: 12px; border-top: 1px solid #edf1f3; }
  .account-name { max-width: none; flex: 1; font-size: 12px; }
  .account .avatar { display: grid; }
  .account .button { max-width: none; font-size: 12px; padding-inline: 4px; }
  .account form { border: 0; padding: 0; margin: 0; }
  .primary-nav { display: flex; flex-wrap: wrap; order: 3; flex: 0 0 100%; gap: 7px; padding-top: 15px; margin-top: 12px; border-top: 1px solid var(--border); }
  .primary-nav > a, .primary-nav > button { min-height: 44px; flex: 1 0 28%; border-radius: 5px; background: #f3f7f8; padding: 9px 12px; font-size: 13px; }
  .primary-nav > a.is-active { background: var(--teal-pale); }
  .primary-nav > a.is-active::after { display: none; }
  .mobile-context { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-bottom: 1px solid var(--border); padding: 6px 22px; font-size: 12px; color: var(--muted); }
  .mobile-context > span > span { margin-inline: 6px; }
  .submenu-toggle { display: inline-flex; align-items: center; justify-content: flex-end; gap: 11px; min-height: 44px; flex-shrink: 0; background: none; border: 0; color: var(--teal); font-size: 13px; padding: 8px 0 8px 10px; }
  .app-layout { display: block; min-height: auto; }
  .context-sidebar { display: block; border-right: 0; border-bottom: 1px solid var(--border); background: #fbfdfd; padding: 12px 22px 15px; }
  .sidebar-heading, .sidebar-footer { display: none; }
  .navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 0; margin: 0; }
  .nav-link { font-size: 12px; padding: 12px 13px 12px 27px; white-space: normal; }
  .nav-link.is-active { background: var(--teal-pale); box-shadow: none; }
  .page-content { padding: 23px 22px 20px; }
  .breadcrumb { margin-bottom: 23px; }
  .customer-filter-form { grid-template-columns: minmax(160px, 1fr) 145px 145px auto; }
  .customer-filter-form .filter-query { grid-column: auto; }
  .customer-filter-form .button { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-list > div { grid-template-columns: 100px minmax(0, 1fr); }
  .login-intro { padding: 36px 10%; }
  .login-message h1 { font-size: 36px; }
}
@media (max-width: 720px) {
  .customer-filter-form { grid-template-columns: 1fr 1fr; }
  .customer-filter-form .filter-query, .customer-filter-form .button { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-list > div { grid-template-columns: 150px minmax(0, 1fr); }
  .page-heading h1 { font-size: 30px; }
  .login-layout { grid-template-columns: 43% 57%; }
}
@media (max-width: 650px) {
  .workspace { display: block; }
  .login-layout { display: block; }
  .login-intro { padding: 26px 24px 30px; }
  .login-intro .brand-mark { width: 31px; height: 35px; }
  .login-intro .brand-name { font-size: 15px; }
  .login-intro .brand-name > span { font-size: 8px; }
  .login-message { padding: 33px 0 0; }
  .login-message .eyebrow { margin-bottom: 13px; font-size: 10px; }
  .login-message h1 { font-size: 34px; }
  .login-message > p:not(.eyebrow), .intro-line, .login-intro-footer { display: none; }
  .login-form-panel { padding: 35px 24px 80px; min-height: 540px; }
  .login-card { max-width: 440px; }
  .login-card h2 { font-size: 27px; }
  .form-description { font-size: 14px; margin-bottom: 26px; }
  .login-copyright { bottom: 24px; font-size: 11px; }
  .app-header { padding: 13px 16px; }
  .brand-name { font-size: 15px; }
  .account-name { font-size: 12px; }
  .account .button { min-height: 44px; font-size: 11px; }
  .mobile-context { padding-inline: 16px; font-size: 12px; }
  .context-sidebar { padding-inline: 16px; }
  .page-content { padding: 22px 15px 18px; }
  .breadcrumb { gap: 7px; font-size: 11px; }
  .selected-unit { font-size: 10px; padding: 3px 6px; }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 22px; }
  .page-heading .eyebrow { font-size: 10px; }
  .page-heading h1 { font-size: 29px; }
  .page-subtitle { font-size: 13px; line-height: 1.8; max-width: 260px; }
  .internal-badge { margin-top: 22px; font-size: 10px; padding: 5px 7px; }
  .panel-toolbar { padding: 21px 17px 19px; }
  .panel-title-group { flex-wrap: wrap; gap: 9px; }
  .panel-title-group h2 { font-size: 16px; }
  .count-badge { font-size: 11px; }
  .unit-context { font-size: 12px; align-items: center; }
  .unit-context > a { font-size: 12px; min-height: 44px; }
  .customer-filter-form { padding: 0 17px 20px; gap: 13px 10px; }
  .customer-filter-form .field label { font-size: 12px; }
  .customer-filter-form input, .customer-filter-form select { font-size: 14px; min-height: 44px; }
  .search-summary { padding: 11px 17px; font-size: 12px; gap: 13px; }
  .search-summary > a { min-height: 44px; text-align: right; }
  .table-scroll { padding: 13px; overflow: visible; background: #f4f7f9; border-top: 1px solid var(--border); }
  .customers-table, .canonical-customers-table { display: block; min-width: 0; }
  .customers-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .customers-table tbody { display: grid; gap: 13px; }
  .customers-table tr { display: flex; flex-direction: column; border: 1px solid #dfe8ec; background: #fff; border-radius: 7px; overflow: hidden; }
  .customers-table td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; border: 0; padding: 12px 15px; font-size: 13px; }
  .customers-table td[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--muted); flex: 0 1 42%; overflow-wrap: anywhere; }
  .customers-table td[data-label] { min-width: 0; max-width: none; }
  .customers-table td:first-child { padding: 17px 15px 15px; border-bottom: 1px solid #edf1f3; }
  .customers-table td:last-child { padding: 11px 15px 15px; }
  .customer-link { min-width: 0; width: 100%; min-height: 44px; align-items: flex-start; font-size: 14px; }
  .customer-name-group { min-width: 0; overflow-wrap: anywhere; }
  .customer-monogram { width: 35px; height: 39px; margin-top: 3px; }
  .customer-list-code { font-size: 11px; }
  .canonical-customers-table .dynamic-value { min-width: 0; max-width: none; overflow-wrap: anywhere; text-align: right; }
  .canonical-customers-table .dynamic-value::before { text-align: left; }
  .scope-badge, .record-status { font-size: 12px; }
  .table-action .detail-link { display: flex; justify-content: center; width: 100%; min-height: 44px; border: 1px solid #dcece5; border-radius: 5px; background: #f1f8f5; font-size: 13px; }
  .pagination { padding: 15px 17px; flex-wrap: wrap; }
  .pagination p { font-size: 12px; }
  .pagination nav { margin-left: auto; }
  .pagination .button { min-height: 44px; font-size: 12px; }
  .unit-card-grid { grid-template-columns: 1fr; gap: 16px; }
  .unit-card { padding: 24px; }
  .unit-card h3 { font-size: 23px; }
  .unit-card p { font-size: 14px; }
  .unit-card-action { font-size: 14px; margin-top: 26px; }
  .customer-overview { padding: 21px 17px; }
  .customer-heading { gap: 12px; }
  .customer-monogram-large { width: 43px; height: 48px; font-size: 21px; }
  .customer-heading h2 { font-size: 24px; }
  .customer-heading .eyebrow { font-size: 11px; }
  .customer-id { font-size: 12px; }
  .detail-panel { padding: 23px 20px; }
  .detail-list > div { grid-template-columns: 110px minmax(0, 1fr); padding-block: 14px; gap: 12px; }
  .detail-list dt { font-size: 12px; }
  .detail-list dd { font-size: 13px; }
  .detail-list dd.identifier { font-size: 12px; }
  .form-grid, .checkbox-grid { grid-template-columns: 1fr; }
  .user-form-panel { padding: 23px 20px; }
  .panel-section-heading h2 { font-size: 16px; }
  .panel-section-heading p { font-size: 13px; }
  .form-actions { flex-direction: column; align-items: stretch; gap: 15px; }
  .form-actions p { max-width: none; font-size: 12px; }
  .admin-note ul { display: block; }
  .admin-note li { max-width: none; }
  .module-placeholder { padding: 14px; gap: 10px; }
  .module-placeholder h2 { font-size: 13px; }
  .module-placeholder p { font-size: 12px; }
  .page-footer { font-size: 11px; }
  .error-card { padding: 30px 24px; }
  .error-card h1 { font-size: 25px; }
}

/* Original Dorlion Metal PNG: intrinsic proportions, no crop or recoloring. */
.brand { min-width: 0; }
.brand-logo { flex: 0 1 auto; }
.brand-light { width: fit-content; max-width: 100%; padding: 10px 14px; border-radius: 9px; background: #fff; }
.brand-light .brand-logo { width: 216px; }
.error-card .brand { max-width: 100%; margin-bottom: 24px; }
.status-brand { display: inline-flex; width: min(232px, 100%); max-width: 100%; padding: 12px 16px; border-radius: 9px; background: #fff; }
.status-brand .brand-logo { width: 200px; }
@media (max-width: 900px) {
  .app-header > .brand { min-width: 0; }
  .app-header .brand-logo { width: 136px; }
}
@media (max-width: 650px) {
  .app-header .brand-logo { width: 120px; }
  .brand-light { padding: 8px 12px; }
  .brand-light .brand-logo { width: 184px; }
}
