:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ink: #132231;
  --navy: #0d2438;
  --navy-soft: #17344a;
  --jade: #1f7564;
  --jade-dark: #15594d;
  --jade-soft: #e9f3f0;
  --gold: #c8953f;
  --muted: #657381;
  --line: #dde5ea;
  --surface: #ffffff;
  --canvas: #f3f6f8;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { width: 100%; min-width: 0; max-width: 100%; overflow-x: hidden; scroll-padding-bottom: 132px; background: var(--canvas); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { width: 100%; min-width: 0; max-width: 100%; min-height: 100vh; margin: 0; overflow-x: hidden; overscroll-behavior-x: none; background: radial-gradient(circle at 80% 0, #edf4f3 0, transparent 26%), var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a.button, [role="button"] { touch-action: manipulation; }
button:not(:disabled), a.button, [role="button"] { transition: transform .09s ease, filter .09s ease, box-shadow .12s ease, background-color .12s ease; }
button:not(:disabled):active, a.button:active, [role="button"]:active { filter: brightness(.97); transform: translateY(1px) scale(.985); }
button:disabled, .interaction-processing { cursor: wait; opacity: .68; }
.interaction-processing { pointer-events: none; }
a { color: inherit; text-decoration: none; }

.initial-privacy-gate { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; overflow: auto; padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom)); background: radial-gradient(circle at 80% 0, #1a4b50 0, transparent 38%), linear-gradient(145deg, #0b2133, #123d43); }
.initial-privacy-card { width: min(500px, 100%); padding: 30px; border: 1px solid rgba(255, 255, 255, .72); border-radius: 24px; background: rgba(255, 255, 255, .98); box-shadow: 0 30px 90px rgba(3, 17, 27, .34); }
.initial-privacy-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; }
.initial-privacy-brand strong { color: var(--navy); font-size: 18px; }
.initial-privacy-eyebrow { color: var(--jade); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.initial-privacy-card h1 { margin: 9px 0 12px; color: var(--ink); font-size: clamp(26px, 7vw, 34px); letter-spacing: -.045em; }
.initial-privacy-card > p { margin: 0; color: #56676f; line-height: 1.8; }
.initial-privacy-points { display: grid; gap: 8px; margin: 20px 0; padding: 15px 17px; border-radius: 15px; background: #eef6f3; color: #275b50; font-size: 14px; }
.initial-privacy-points span::before { margin-right: 8px; color: var(--jade); content: "✓"; font-weight: 900; }
.initial-use-disclaimer { margin: 0 0 17px; padding: 12px 14px; border: 1px solid #d7e1dc; border-radius: 13px; background: #f8faf9; color: #647169; }
.initial-use-disclaimer strong { display: block; margin-bottom: 5px; color: #394b43; font-size: 13px; }
.initial-use-disclaimer p { margin: 0; font-size: 12px; line-height: 1.65; }
.initial-privacy-card .initial-privacy-note { color: #758188; font-size: 13px; }
.initial-privacy-note a { color: var(--jade-dark); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.initial-privacy-actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; margin-top: 24px; }
.initial-privacy-declined { text-align: center; }
.initial-privacy-declined .initial-privacy-actions { grid-template-columns: 1fr; }

@media (max-width: 520px) {
  .initial-privacy-gate { align-items: end; padding: 0; }
  .initial-privacy-card { padding: 25px 20px calc(22px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 24px 24px 0 0; }
  .initial-privacy-brand { margin-bottom: 23px; }
  .initial-privacy-actions { grid-template-columns: 1fr; }
  .initial-privacy-actions .button { min-height: 50px; }
}

.app-shell { width: 100%; min-width: 0; max-width: 100%; min-height: 100vh; padding-left: 236px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; width: 236px; flex-direction: column; overflow-y: auto; padding: 24px 16px 18px; background: linear-gradient(180deg, var(--navy) 0%, #0a1d2d 100%); color: #fff; box-shadow: 12px 0 40px rgba(9, 29, 45, .08); overscroll-behavior: contain; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: inline-grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #15364a, #176b5e); color: #fff; box-shadow: 0 8px 22px rgba(13, 36, 56, .24); }
.brand-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.nav-list { display: grid; gap: 5px; margin-top: 32px; }
.nav-list a { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 0 13px; border-radius: 11px; color: #bfcbd4; transition: .18s ease; }
.nav-list svg, .bottom-nav svg, .mobile-header .icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.nav-list a:hover { background: rgba(255, 255, 255, .09); }
.nav-list a.active { background: rgba(255, 255, 255, .11); color: #fff; box-shadow: inset 3px 0 0 #59b39f; font-weight: 650; }
.secondary-nav-actions { display: grid; gap: 6px; margin: 18px 10px 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .16); }
.secondary-nav-actions button { display: flex; width: 100%; min-height: 42px; align-items: center; gap: 11px; padding: 7px 11px; border: 1px solid rgba(105, 194, 174, .2); border-radius: 12px; background: rgba(255, 255, 255, .07); color: #d6e5df; text-align: left; cursor: pointer; }
.secondary-nav-actions button:first-child { color: #83d0be; }
.secondary-nav-actions .logout-nav-button { border-color: rgba(240, 181, 170, .15); color: #f0b5aa; }
.secondary-nav-icon { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .08); font-size: 12px; font-weight: 800; }
.tenant-card { display: grid; gap: 5px; margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.tenant-card span { color: #b8cdbf; font-size: 12px; }
.tenant-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-button { width: max-content; padding: 4px 0; border: 0; background: none; color: #69c2ae; cursor: pointer; }
.account-sync { display: flex; align-items: center; gap: 7px; margin-top: 7px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); }
.account-sync i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #69c2ae; box-shadow: 0 0 0 4px rgba(105, 194, 174, .12); }
.tenant-card .account-sync span { color: #c4d5ce; }
.logout-nav-button { color: #f0b5aa; }
.mobile-header, .bottom-nav, .menu-backdrop { display: none; }
.bottom-nav .customer-bottom-item { display: none; }
.main-content { width: min(1240px, 100%); min-width: 0; max-width: 100%; margin: 0 auto; padding: 34px; outline: 0; }
.site-compliance { width: min(1240px, calc(100% - 32px)); margin: 0 auto 22px; padding: 10px 16px; color: #7b8983; font-size: 12px; text-align: center; }
.site-compliance a { color: #58716a; text-decoration: none; }
.site-compliance a:hover { text-decoration: underline; }
html[data-native-shell="true"] .site-compliance { display: none; }

.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-header h1 { margin: 0; color: var(--ink); font-size: clamp(25px, 3vw, 31px); letter-spacing: -.035em; }
.page-header p { margin: 6px 0 0; color: var(--muted); }
.page-header-actions { display: flex; align-items: center; gap: 9px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 7px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; font-weight: 650; white-space: nowrap; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.button:active { transform: translateY(1px); }
.button.primary { border-color: var(--jade); background: var(--jade); color: #fff; box-shadow: 0 8px 18px rgba(31, 117, 100, .16); }
.button.primary:hover { background: var(--jade-dark); }
.button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button.secondary:hover { background: #f7f9fa; }
.icon-button { display: inline-grid; width: 40px; height: 40px; place-items: center; border: 1px solid #d6e1d9; border-radius: 10px; background: #fff; color: #26352c; cursor: pointer; }
.icon-button.danger { color: #a93a32; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metrics.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 780px; }
.metric, .panel, .entity-card, .confirm-sheet { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 10px 30px rgba(13, 36, 56, .045); }
.metric { position: relative; overflow: hidden; padding: 20px; }
.metric::after { position: absolute; inset: 0 auto auto 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--jade), transparent 70%); content: ""; opacity: .7; }
.metric span { color: var(--muted); }
.metric strong { display: block; margin-top: 8px; font-size: clamp(22px, 3vw, 28px); letter-spacing: -.03em; }
.metric small { display: block; margin-top: 6px; color: var(--jade); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .7fr); gap: 16px; }
.panel { padding: 20px; }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.panel-heading h2, .section-heading h2 { margin: 0; font-size: 18px; }
.panel-heading a, .table-link { border: 0; background: none; color: var(--jade); cursor: pointer; font-weight: 600; }
.section-heading { margin-top: 24px; }
.section-heading p { margin: 4px 0 0; color: #748178; font-size: 13px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; border-bottom: 1px solid #e9eef1; text-align: left; white-space: nowrap; }
th { color: #71808c; font-size: 12px; font-weight: 650; letter-spacing: .02em; }
td small { display: block; margin-top: 3px; color: #7b877f; }
tbody tr:last-child td { border-bottom: 0; }
.money { text-align: right; font-variant-numeric: tabular-nums; }
.money.important { color: #a43d32; font-weight: 700; }
.status { display: inline-flex; padding: 4px 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.status.warning { background: #fff4dd; color: #8b611c; }
.status.success { background: #e6f4ef; color: #176653; }
.status.info { background: #e8f1fb; color: #295d8a; }
.status.neutral { background: #eef1ef; color: #5d6861; }
.status.danger { background: #fde9e6; color: #923f36; }
.task-list { display: grid; }
.task-list button, .task-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 2px; border: 0; border-bottom: 1px solid #e7ede9; background: none; color: inherit; cursor: pointer; text-align: left; }
.task-list button:last-child, .task-list a:last-child { border-bottom: 0; }
.task-list span, .task-list strong, .task-list small { display: block; }
.task-list small { margin-top: 4px; color: #718078; }
.task-list b { font-size: 24px; color: #6b786f; }
.quiet { color: #78847c; }

input, select, textarea { width: 100%; min-height: 50px; padding: 11px 13px; border: 1px solid #ccd7de; border-radius: 12px; outline: 0; background: #fff; color: var(--ink); caret-color: var(--jade); }
input::placeholder, textarea::placeholder { color: #9aa5ad; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(31, 117, 100, .12); }
input[type="number"] { appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
label { display: grid; gap: 7px; color: #526158; font-size: 14px; }
.field-with-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.field-action { min-width: 74px; border: 1px solid #bed5ca; border-radius: 12px; background: var(--jade-soft); color: var(--jade-dark); cursor: pointer; font-weight: 700; }
.field-action:disabled { cursor: not-allowed; opacity: .5; }
.line-items { display: grid; gap: 9px; }
.line-item { display: grid; grid-template-columns: minmax(180px, 1.5fr) 90px 80px 110px 110px 40px; gap: 8px; align-items: end; padding: 12px 0; border-bottom: 1px solid #e5ece7; }
.line-item .line-amount { padding-bottom: 9px; text-align: right; }
.line-item .line-amount span, .line-item .line-amount strong { display: block; }
.line-item .line-amount span { margin-bottom: 7px; color: #6c796f; font-size: 13px; }
.line-item input[readonly] { background: #f3f7f5; color: var(--jade-dark); font-weight: 700; }
.measurement-editor { display: flex; grid-column: 1 / -1; align-items: center; gap: 10px; padding: 2px 0 3px; }
.measurement-editor .per-measure-field { width: 160px; flex: 0 0 160px; }
.measurement-editor .per-measure-field input { min-height: 42px; }
.measurement-editor button { min-height: 38px; padding: 0 13px; border: 1px solid #b9d7ca; border-radius: 10px; background: #edf7f2; color: var(--jade-dark); cursor: pointer; font-weight: 700; }
.measurement-editor small { color: #78857d; }
.full-field { margin-top: 16px; }
.order-form { display: grid; min-width: 0; gap: 14px; }
.order-section { min-width: 0; padding: 20px; border: 1px solid rgba(209, 220, 214, .78); border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgba(13, 36, 56, .035); }
.quick-pick-block { margin: 0; padding-bottom: 20px; border-bottom: 0; }
.quick-pick-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.quick-pick-heading h2, .quick-pick-heading p { margin: 0; }
.quick-pick-heading h2 { font-size: 17px; }
.quick-pick-heading p { margin-top: 4px; color: #738078; font-size: 13px; }
.quick-add { min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--jade-soft); color: var(--jade-dark); cursor: pointer; font-weight: 650; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-chip { min-height: 42px; padding: 0 15px; border: 1px solid #d8e1db; border-radius: 999px; background: #f9fbfa; color: #34453b; cursor: pointer; }
.quick-chip.selected { border-color: var(--jade); background: var(--jade); color: #fff; }
.order-customer-fields { margin-top: 16px; }
.product-pick-block { margin-top: 0; }
.order-product-fields { margin-top: 16px; }
.quick-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.quick-products button { display: grid; min-height: 90px; gap: 4px; padding: 13px; border: 1px solid transparent; border-radius: 16px; background: #f5f8f6; color: #17221b; cursor: pointer; text-align: left; }
.quick-products button:hover { border-color: #7ea18b; background: #f7faf8; }
.quick-products strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.quick-products span { overflow: hidden; color: #76827a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quick-products b { color: var(--jade); font-size: 13px; }
.inline-empty { width: 100%; margin: 0; padding: 16px; border: 1px dashed #ccd8de; border-radius: 12px; color: #78858e; text-align: center; }
.compact-empty { padding: 24px 14px; border: 1px dashed #ccd8d0; border-radius: 13px; color: #6f7d74; text-align: center; }
.selected-products-section .section-heading { margin-top: 0; }
.note-order-section { padding-block: 17px; }
.order-footer { display: flex; align-items: end; justify-content: flex-end; gap: 24px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.draft-state { margin-right: auto; padding-bottom: 10px; color: #708079; }
.order-footer span, .order-footer strong { display: block; }
.order-footer span { color: #6c796f; }
.order-footer strong { margin-top: 4px; font-size: 24px; }

.toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 180px; gap: 12px; margin-bottom: 14px; }
.order-history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.order-history-card { display: grid; width: 100%; min-width: 0; gap: 12px; padding: 17px; border: 1px solid #dbe4df; border-radius: 17px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; text-decoration: none; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.order-history-card:hover { border-color: #8fb7a8; box-shadow: 0 9px 24px rgba(13, 36, 56, .06); transform: translateY(-1px); }
.order-history-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.order-history-date { display: grid; gap: 2px; }
.order-history-date strong { font-size: 20px; line-height: 1.15; }
.order-history-date > span { color: #41554a; font-size: 15px; font-weight: 700; }
.order-history-date small { color: #87918b; font-size: 11px; font-weight: 500; }
.order-history-customer { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 11px; border-top: 1px solid #edf1ee; }
.order-history-customer strong { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.order-history-customer small { flex: 0 0 auto; color: var(--muted); }
.order-history-progress { min-height: 39px; color: #66756c; font-size: 13px; line-height: 1.5; }
.order-history-footer { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 8px; padding-top: 11px; border-top: 1px solid #edf1ee; }
.order-history-footer > span { color: var(--muted); font-size: 12px; }
.order-history-footer strong { font-size: 18px; }
.order-history-footer em { color: var(--jade-dark); font-size: 13px; font-style: normal; font-weight: 800; }
.cards-list { display: grid; gap: 12px; }
.manager-search-bar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid #dbe4df; border-radius: 17px; background: #fff; }
.manager-search-bar label { display: grid; width: min(100%, 560px); gap: 6px; color: var(--muted); font-size: 12px; }
.manager-search-bar input, .ledger-customer-search input { min-height: 46px; padding: 0 14px; border: 1px solid #cad8d1; border-radius: 12px; background: #f8fbf9; color: var(--ink); font: inherit; outline: 0; }
.manager-search-bar input:focus, .ledger-customer-search input:focus { border-color: var(--jade); background: #fff; box-shadow: 0 0 0 3px rgba(24, 128, 105, .1); }
.manager-search-bar > small { flex: 0 0 auto; padding-bottom: 13px; color: var(--muted); }
.manager-list-more { width: 100%; min-height: 48px; border: 1px solid #bad4c9; border-radius: 14px; background: #eef7f3; color: var(--jade-dark); cursor: pointer; font-weight: 800; }
.panel > .manager-list-more { margin-top: 12px; }
.manager-list-empty { display: grid; gap: 5px; padding: 28px 16px; border: 1px dashed #cad8d1; border-radius: 14px; color: var(--muted); text-align: center; }
.manager-list-empty strong { color: var(--ink); }
.entity-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 17px; }
.avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: var(--jade-soft); color: var(--jade-dark); font-size: 18px; font-weight: 700; }
.entity-main { min-width: 0; }
.entity-main h2 { margin: 0; font-size: 17px; }
.entity-main p, .entity-main small { overflow: hidden; margin: 5px 0 0; color: #6e7a72; text-overflow: ellipsis; white-space: nowrap; }
.entity-meta { text-align: right; }
.entity-meta span, .entity-meta strong { display: block; }
.entity-meta span { color: #758178; font-size: 13px; }
.entity-meta strong { margin-top: 5px; }
.entity-edit { margin-top: 8px; }
.money-due { color: #a43d32; }
.customer-card .entity-meta { min-width: 142px; }
.customer-card-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px 12px; margin-top: 9px; }
.customer-card-actions .danger-link { margin: 0; font-size: 13px; }
.customer-address-list { display: grid; gap: 6px; margin-top: 10px; }
.customer-address-list button { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #dce7e0; border-radius: 10px; background: #f8fbf9; color: #42534a; cursor: pointer; text-align: left; }
.customer-address-list b { flex: 0 0 auto; color: var(--jade-dark); font-size: 12px; }
.customer-address-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-layout { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.5fr); gap: 16px; align-items: start; }
.sync-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 15px 17px; border: 1px solid #cfe2d9; border-radius: 15px; background: linear-gradient(120deg, #edf7f3, #f9fbfc); }
.sync-notice strong, .sync-notice span { display: block; }
.sync-notice strong { color: var(--jade-dark); }
.sync-notice span, .sync-notice small { margin-top: 4px; color: #64746b; }
.sync-notice small { max-width: 310px; text-align: right; }
.tenant-list { display: grid; gap: 8px; }
.tenant-option { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid #dce5df; border-radius: 12px; background: #fff; color: #26352c; cursor: pointer; text-align: left; }
.tenant-option span, .tenant-option strong, .tenant-option small { display: block; }
.tenant-option small { margin-top: 4px; color: #748078; }
.tenant-option b { color: #447357; font-size: 13px; }
.tenant-option.selected { border-color: #86b5aa; background: var(--jade-soft); }
.settings-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.button.danger-outline { border-color: #d7a6a2; background: #fff; color: #9b322c; }
.button.danger-outline:hover { background: #fff4f3; }
.danger-note { margin: 0 0 16px; padding: 12px; border-radius: 10px; background: #fff0ef; color: #8e312b; }
.danger-link { margin-top: 14px; padding: 0; border: 0; background: transparent; color: #a23b34; cursor: pointer; }
.sub-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sub-form-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.sub-form-title span { color: #7d8981; font-size: 12px; }
.optional-fields { margin-top: 16px; padding: 12px 14px; border: 1px solid #e0e8e3; border-radius: 12px; background: #fafcfb; }
.optional-fields summary { cursor: pointer; color: #516158; font-weight: 650; }
.optional-fields .form-grid { margin-top: 13px; }
.onboarding { display: grid; width: min(980px, 100%); min-height: 570px; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); overflow: hidden; margin: max(4vh, 22px) auto 0; border: 1px solid rgba(13, 36, 56, .06); border-radius: 26px; background: #fff; box-shadow: 0 28px 80px rgba(13, 36, 56, .1); }
.onboarding-main { display: flex; align-items: flex-start; justify-content: center; flex-direction: column; padding: clamp(36px, 6vw, 72px); background: linear-gradient(145deg, #0c2438 0%, #123b4e 58%, #185848 130%); color: #fff; }
.onboarding-main .brand-mark { width: 48px; height: 48px; margin: 22px 0; }
.eyebrow { color: #81c9b8; font-size: 13px; font-weight: 700; letter-spacing: .16em; }
.onboarding h1 { margin: 0; font-size: clamp(38px, 5.2vw, 58px); line-height: 1.12; letter-spacing: -.055em; }
.onboarding-main > p { max-width: 470px; margin: 20px 0 28px; color: #c6d3dc; font-size: 17px; line-height: 1.8; }
.onboarding-cta { min-height: 52px; padding-inline: 22px; background: #fff; color: var(--navy); box-shadow: 0 12px 28px rgba(0, 0, 0, .18); }
.onboarding-cta:hover { background: #edf5f3; }
.onboarding-main > small { margin-top: 16px; color: #97aebd; }
.onboarding-identity-back { align-self: flex-start; margin-bottom: 18px; color: #c7d9e2; font-size: 13px; font-weight: 750; text-decoration: none; }
.onboarding-features { display: flex; justify-content: center; flex-direction: column; gap: 6px; padding: 34px; background: #f9fbfc; }
.onboarding-features article { padding: 22px; border-bottom: 1px solid var(--line); }
.onboarding-features article:last-child { border-bottom: 0; }
.onboarding-features span { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.onboarding-features strong { display: block; margin-top: 7px; color: var(--ink); font-size: 18px; }
.onboarding-features p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; }
.factory-home { display: grid; width: min(980px, 100%); gap: 14px; margin: 0 auto; }
.factory-home-hero { display: flex; min-height: 174px; align-items: flex-end; justify-content: space-between; gap: 20px; overflow: hidden; padding: 28px; border-radius: 24px; background: linear-gradient(145deg, #0c2438 0%, #123b4e 58%, #185848 130%); color: #fff; box-shadow: 0 18px 42px rgba(13, 36, 56, .14); }
.factory-home-hero > div { display: grid; min-width: 0; gap: 7px; }
.factory-home-hero span { color: #9bc9bf; font-size: 13px; font-weight: 800; }
.factory-home-hero strong { overflow: hidden; font-size: clamp(30px, 5vw, 44px); line-height: 1.08; letter-spacing: -.04em; text-overflow: ellipsis; }
.factory-home-hero small { color: #bed1d5; }
.factory-home-primary { flex: 0 0 auto; min-width: 110px; min-height: 52px; border-color: #fff; background: #fff; color: var(--navy); font-size: 17px; box-shadow: 0 10px 24px rgba(0, 0, 0, .16); }
.factory-home-metrics { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .04); }
.factory-home-metrics article { min-width: 0; padding: 19px 21px; border-right: 1px solid #e5ebe7; }
.factory-home-metrics article:last-child { border-right: 0; }
.factory-home-metrics span, .factory-home-metrics strong, .factory-home-metrics small { display: block; }
.factory-home-metrics span { color: var(--muted); font-size: 12px; }
.factory-home-metrics strong { overflow: hidden; margin-top: 7px; font-size: 23px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.factory-home-metrics small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.factory-home-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; }
.factory-home-shortcuts a { position: relative; display: grid; min-width: 0; gap: 5px; min-height: 94px; align-content: center; padding: 17px 38px 17px 19px; border-right: 1px solid #e5ebe7; }
.factory-home-shortcuts a:last-child { border-right: 0; }
.factory-home-shortcuts strong { font-size: 16px; }
.factory-home-shortcuts small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.factory-home-shortcuts b { position: absolute; right: 16px; top: 50%; color: var(--jade); font-size: 23px; transform: translateY(-50%); }
.factory-home-recent { overflow: hidden; border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .04); }
.factory-home-recent > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 20px 21px 15px; }
.factory-home-recent > header span { color: var(--jade-dark); font-size: 11px; font-weight: 800; }
.factory-home-recent > header h2 { margin: 4px 0 0; font-size: 19px; }
.factory-home-recent > header a { color: var(--jade-dark); font-size: 13px; font-weight: 750; }
.factory-home-order { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; min-height: 68px; margin-inline: 20px; padding: 11px 1px; border-top: 1px solid #e8eeea; }
.factory-home-order span { display: block; min-width: 0; }
.factory-home-order > span:first-child strong, .factory-home-order > span:first-child small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.factory-home-order > span:first-child small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.factory-home-order > span:nth-child(2) { text-align: right; }
.factory-home-order > span:nth-child(2) > strong { display: block; margin-bottom: 4px; }
.factory-home-order .status { font-size: 10px; }
.factory-home-order > b { color: #91a09a; font-size: 22px; }
.factory-home-empty { display: grid; gap: 5px; padding: 5px 21px 24px; color: var(--muted); }
.factory-home-empty strong { color: var(--ink); }
.auth-entry { width: min(680px, 100%); margin: max(4vh, 24px) auto 0; padding: clamp(24px, 5vw, 44px); border: 1px solid #dfe7e2; border-radius: 28px; background: #fff; box-shadow: 0 26px 70px rgba(13, 36, 56, .1); }
.auth-entry > header { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 850; }
.auth-entry > header .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.auth-entry-hero { margin: 30px 0 22px; padding: clamp(25px, 5vw, 40px); border-radius: 24px; background: linear-gradient(145deg, #0d293d, #155348); color: #fff; }
.auth-entry-hero > span { color: #93d4c5; font-size: 13px; font-weight: 800; }
.auth-entry-hero h1 { margin: 16px 0 13px; font-size: clamp(38px, 7vw, 56px); line-height: 1.08; letter-spacing: -.05em; }
.auth-entry-hero p { margin: 0; color: rgba(255, 255, 255, .74); line-height: 1.7; }
.auth-entry-actions { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; }
.auth-entry-actions .button { min-height: 56px; font-size: 17px; }
.auth-entry-note { display: grid; gap: 5px; margin-top: 18px; padding: 15px 16px; border-radius: 14px; background: #f3f7f5; }
.auth-entry-note strong { font-size: 14px; }
.auth-entry-note span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.login-entry { width: min(640px, 100%); margin: 0 auto; }
.login-entry-hero { margin: 14px 0; padding: 26px; border-radius: 22px; background: linear-gradient(145deg, #0d293d, #155348); color: #fff; }
.login-entry-hero > span { color: #93d4c5; font-size: 13px; font-weight: 800; }
.login-entry-hero h1 { margin: 10px 0 8px; font-size: 32px; letter-spacing: -.04em; }
.login-entry-hero p { margin: 0; color: rgba(255, 255, 255, .72); line-height: 1.6; }
.login-empty { padding: 22px; border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .045); }
.account-login-form { margin-bottom: 14px; }
.login-empty { display: grid; gap: 7px; text-align: center; }
.login-empty span, .login-sms-note { color: var(--muted); }
.login-register-link { width: 100%; margin-top: 12px; }
.login-sms-note { display: block; margin-top: 12px; padding-inline: 16px; font-size: 12px; line-height: 1.55; text-align: center; }
.auth-back { display: inline-grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #eef4f1; color: var(--jade-dark); font-size: 26px; }
.role-entry { width: min(880px, 100%); margin: max(5vh, 28px) auto 0; padding: clamp(26px, 5vw, 54px); border: 1px solid #dfe7e2; border-radius: 28px; background: #fff; box-shadow: 0 26px 70px rgba(13, 36, 56, .1); }
.role-entry > header { display: flex; align-items: center; gap: 11px; color: var(--ink); font-size: 18px; font-weight: 850; }
.role-entry > header .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.role-entry-intro { margin: 38px 0 30px; }
.role-entry-intro > span, .customer-login-hero > span, .client-link-login > span, .client-first-entry > span { color: var(--jade-dark); font-size: 13px; font-weight: 800; }
.role-entry-intro h1 { margin: 9px 0 12px; color: var(--ink); font-size: clamp(34px, 5vw, 52px); line-height: 1.12; letter-spacing: -.045em; }
.role-entry-intro p { margin: 0; color: var(--muted); line-height: 1.7; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.role-option { position: relative; overflow: hidden; min-height: 215px; padding: 26px; border: 1px solid #dbe5e0; border-radius: 22px; color: var(--ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.role-option:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(13, 36, 56, .09); }
.role-option.factory { border: 0; background: linear-gradient(145deg, #0d293d, #155348); color: #fff; }
.role-option.customer { background: linear-gradient(145deg, #eef8f4, #fff); }
.role-option > span { color: #91d1c2; font-size: 13px; font-weight: 800; }
.role-option.customer > span { color: var(--jade-dark); }
.role-option h2 { margin: 21px 0 8px; font-size: 25px; }
.role-option p { margin: 0; color: inherit; opacity: .74; }
.role-option b { position: absolute; right: 24px; bottom: 23px; font-size: 14px; }
.role-entry > small { display: block; margin-top: 22px; color: var(--muted); text-align: center; }
.customer-login-page { width: min(640px, 100%); margin: 0 auto; }
.identity-page-bar { position: sticky; z-index: 20; top: 8px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 10px; padding: 8px; border: 1px solid rgba(213, 222, 218, .82); border-radius: 17px; background: rgba(255, 255, 255, .95); box-shadow: 0 8px 24px rgba(13, 36, 56, .06); backdrop-filter: blur(14px); }
.identity-page-bar.account-bar { grid-template-columns: 42px minmax(0, 1fr) 42px; }
.identity-page-bar > div { display: flex; align-items: center; justify-content: center; gap: 9px; }
.identity-page-bar .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
.identity-page-bar strong, .identity-page-bar small { display: block; }
.identity-page-bar small { color: var(--muted); font-size: 11px; }
.customer-login-hero { margin: 14px 0 12px; padding: 26px 23px; border-radius: 22px; background: linear-gradient(145deg, #0d293d, #155348); color: #fff; box-shadow: 0 18px 42px rgba(13, 36, 56, .15); }
.customer-login-hero > span { color: #91d1c2; }
.customer-login-hero h1 { margin: 8px 0 8px; font-size: 31px; letter-spacing: -.035em; }
.customer-login-hero p { margin: 0; color: #c4d7d3; line-height: 1.65; }
.customer-dashboard-hero { display: grid; grid-template-columns: minmax(0, 1fr) 132px; overflow: hidden; margin: 14px 0 12px; border-radius: 23px; background: linear-gradient(145deg, #0d293d, #155348); color: #fff; box-shadow: 0 18px 42px rgba(13, 36, 56, .15); }
.customer-dashboard-hero > div { padding: 27px 24px; }
.customer-dashboard-hero > div > span { color: #91d1c2; font-size: 12px; font-weight: 850; letter-spacing: .06em; }
.customer-dashboard-hero h1 { margin: 10px 0 10px; font-size: clamp(30px, 8vw, 40px); line-height: 1.08; letter-spacing: -.045em; }
.customer-dashboard-hero p { max-width: 360px; margin: 0; color: #c4d7d3; font-size: 13px; line-height: 1.65; }
.customer-dashboard-hero .button { min-height: 44px; margin-top: 20px; border-color: #fff; background: #fff; color: var(--navy); }
.customer-dashboard-hero aside { display: grid; align-content: center; justify-items: center; padding: 18px 12px; border-left: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.055); text-align: center; }
.customer-dashboard-hero aside span, .customer-dashboard-hero aside strong, .customer-dashboard-hero aside small { display: block; }
.customer-dashboard-hero aside span { color: #b8d2cc; font-size: 11px; }
.customer-dashboard-hero aside strong { margin: 8px 0 5px; color: #ffd685; font-size: 40px; line-height: 1; }
.customer-dashboard-hero aside small { color: #c4d7d3; font-size: 11px; }
.customer-home-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin-bottom: 12px; border: 1px solid #dfe7e2; border-radius: 21px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .045); }
.customer-home-shortcuts a { position: relative; display: grid; min-width: 0; align-content: start; gap: 7px; min-height: 138px; padding: 19px 17px; border-right: 1px solid #e7eeea; }
.customer-home-shortcuts a:last-child { border-right: 0; }
.customer-home-shortcuts span { color: var(--gold); font-size: 11px; font-weight: 850; letter-spacing: .08em; }
.customer-home-shortcuts strong { font-size: 16px; }
.customer-home-shortcuts small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.customer-home-shortcuts b { position: absolute; right: 14px; bottom: 13px; color: var(--jade); font-size: 20px; }
.customer-balance-hero > small { display: block; margin-top: 20px; color: #b7d0ca; font-size: 13px; }
.customer-balance-hero h1 { margin: 6px 0 7px; font-size: clamp(38px, 10vw, 48px); line-height: 1.08; letter-spacing: -.045em; }
.customer-balance-hero p { font-size: 14px; }
.customer-purpose-search { position: relative; overflow: hidden; margin: 14px 0 12px; padding: 22px; border: 1px solid #d9e4de; border-radius: 21px; background: #fff; box-shadow: 0 12px 32px rgba(13, 36, 56, .06); }
.customer-purpose-search::before { position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--jade), #58a894); content: ''; }
.customer-purpose-search > span { color: var(--jade-dark); font-size: 12px; font-weight: 850; letter-spacing: .04em; }
.customer-purpose-search h1 { margin: 6px 0 17px; font-size: clamp(25px, 6.8vw, 32px); letter-spacing: -.035em; }
.customer-purpose-search form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.customer-purpose-search label { min-width: 0; }
.customer-purpose-search label input { min-height: 52px; background: #f8faf9; font-size: 17px; font-weight: 700; }
.customer-purpose-search .button { min-height: 52px; padding-inline: 19px; }
.customer-pending-reminder { overflow: hidden; margin: 14px 0 12px; border: 1px solid #efc979; border-radius: 21px; background: #fffaf0; box-shadow: 0 12px 30px rgba(139, 88, 12, .08); }
.customer-pending-reminder > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; background: linear-gradient(120deg, #fff2d5, #fffaf0); }
.customer-pending-reminder > header span, .customer-pending-reminder > header h2 { display: block; }
.customer-pending-reminder > header span { color: #9a5e05; font-size: 12px; font-weight: 850; }
.customer-pending-reminder > header h2 { margin: 4px 0 0; color: #6f4305; font-size: 23px; }
.customer-pending-reminder > header > b { padding: 7px 10px; border-radius: 9px; background: #b77818; color: #fff; font-size: 12px; }
.customer-pending-order { display: grid; grid-template-columns: minmax(0, 1fr) auto 10px; align-items: center; gap: 10px; min-height: 70px; padding: 12px 20px; border-top: 1px solid #f0dfbc; color: var(--ink); text-decoration: none; }
.customer-pending-order span { min-width: 0; }
.customer-pending-order span:nth-child(2) { text-align: right; }
.customer-pending-order strong, .customer-pending-order small { display: block; }
.customer-pending-order small { overflow: hidden; margin-top: 4px; color: #8b682e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-pending-order span:nth-child(2) strong { color: #a43d32; }
.customer-pending-order > b { color: #a46e16; font-size: 20px; }
.customer-pending-more { display: block; padding: 14px 18px; border-top: 1px solid #f0dfbc; color: #8d590e; font-size: 13px; font-weight: 800; text-align: center; }
.customer-balance-overview { display: grid; grid-template-columns: minmax(0, 1.3fr) .7fr; overflow: hidden; margin-bottom: 12px; border-radius: 21px; background: linear-gradient(145deg, #0d293d, #155348); color: #fff; box-shadow: 0 16px 38px rgba(13, 36, 56, .13); }
.customer-balance-main { padding: 22px; }
.customer-balance-main span, .customer-balance-main strong, .customer-balance-main small { display: block; }
.customer-balance-main span { color: #a8cac2; font-size: 12px; font-weight: 750; }
.customer-balance-main strong { margin-top: 8px; font-size: clamp(31px, 8vw, 40px); line-height: 1.08; letter-spacing: -.04em; }
.customer-balance-main small { margin-top: 8px; color: #c4d7d3; }
.customer-balance-stats { display: grid; grid-template-rows: 1fr 1fr; border-left: 1px solid rgba(255,255,255,.14); }
.customer-balance-stats > div { display: grid; align-content: center; justify-items: center; padding: 12px 8px; text-align: center; }
.customer-balance-stats > div:first-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.customer-balance-stats strong, .customer-balance-stats span { display: block; }
.customer-balance-stats strong { font-size: 22px; }
.customer-balance-stats span { margin-top: 3px; color: #b9d1cc; font-size: 11px; }
.customer-balance-stats .has-pending { background: rgba(183, 120, 24, .24); }
.customer-balance-stats .has-pending strong { color: #ffd685; }
.customer-balance-stats .has-pending span { color: #ffdf9f; }
.customer-balance-overview.is-secondary { border: 1px solid #dfe7e2; background: #fff; color: var(--ink); box-shadow: 0 9px 24px rgba(13, 36, 56, .04); }
.customer-balance-overview.is-secondary .customer-balance-main span { color: var(--muted); }
.customer-balance-overview.is-secondary .customer-balance-main strong { color: #a43d32; }
.customer-balance-overview.is-secondary .customer-balance-main small { color: var(--muted); }
.customer-balance-overview.is-secondary .customer-balance-stats { border-left-color: #e7eeea; }
.customer-balance-overview.is-secondary .customer-balance-stats > div:first-child { border-bottom-color: #e7eeea; }
.customer-balance-overview.is-secondary .customer-balance-stats span { color: var(--muted); }
.customer-balance-overview.is-secondary .customer-balance-stats .has-pending { background: #fff6e2; }
.customer-balance-overview.is-secondary .customer-balance-stats .has-pending strong { color: #a86108; }
.customer-balance-overview.is-secondary .customer-balance-stats .has-pending span { color: #8b682e; }
.customer-purpose-results { margin-bottom: 12px; padding: 20px; border: 1px solid #bdd8cd; border-radius: 21px; background: linear-gradient(145deg, #f2faf6, #fff); box-shadow: 0 12px 30px rgba(13, 66, 53, .07); }
.customer-purpose-results > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.customer-purpose-results > header span, .customer-purpose-results > header h2 { display: block; }
.customer-purpose-results > header span { color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.customer-purpose-results > header h2 { margin: 4px 0 0; font-size: 22px; }
.customer-purpose-results > header button { min-height: 36px; padding: 0 12px; border: 1px solid #c8dcd3; border-radius: 10px; background: #fff; color: var(--jade-dark); cursor: pointer; font-weight: 750; }
.customer-purpose-total { margin: 15px 0 8px; padding: 17px; border-radius: 16px; background: #123d43; color: #fff; }
.customer-purpose-total span, .customer-purpose-total strong, .customer-purpose-total small { display: block; }
.customer-purpose-total span { color: #a9ccc4; font-size: 12px; }
.customer-purpose-total strong { margin-top: 6px; font-size: clamp(30px, 8vw, 38px); line-height: 1.08; letter-spacing: -.04em; }
.customer-purpose-total small { margin-top: 7px; color: #c7dad6; }
.customer-purpose-payment-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); }
.customer-purpose-payment-stats > div + div { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.16); }
.customer-purpose-payment-stats b { display: block; margin-top: 4px; color: #fff; font-size: 18px; }
.customer-purpose-payment-stats .is-outstanding b { color: #ffd2c9; }
.customer-purpose-orders { display: grid; }
.customer-purpose-order { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 10px; align-items: center; gap: 9px; min-height: 70px; padding: 11px 1px; border-top: 1px solid #dfeae5; color: var(--ink); text-decoration: none; }
.customer-purpose-order-date strong, .customer-purpose-order-date small, .customer-purpose-order-main strong, .customer-purpose-order-main small, .customer-purpose-order-money strong, .customer-purpose-order-money small { display: block; }
.customer-purpose-order-date strong { font-size: 13px; }
.customer-purpose-order-date small, .customer-purpose-order-main small, .customer-purpose-order-money small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.customer-purpose-order-main { min-width: 0; }
.customer-purpose-order-main strong, .customer-purpose-order-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-purpose-order-money { text-align: right; }
.customer-purpose-order-money strong { margin-top: 4px; color: #a43d32; font-size: 15px; }
.customer-purpose-order-money em { display: block; margin-top: 5px; color: #a43d32; font-size: 11px; font-style: normal; white-space: nowrap; }
.customer-purpose-order-money em.is-settled { color: #167765; }
.customer-purpose-order > b { color: #829188; font-size: 20px; }
.customer-purpose-empty { padding: 24px 10px 11px; text-align: center; }
.customer-purpose-empty strong, .customer-purpose-empty span { display: block; }
.customer-purpose-empty span { margin-top: 6px; color: var(--muted); font-size: 12px; }
.customer-list-limit-note { margin: 12px 0 3px; padding: 11px 13px; border-radius: 11px; background: #eef5f2; color: var(--muted); font-size: 12px; line-height: 1.55; }
.customer-list-more { width: 100%; min-height: 46px; margin-top: 10px; border: 1px solid #c9dcd3; border-radius: 12px; background: #f3f8f5; color: var(--jade-dark); cursor: pointer; font-weight: 800; }
.customer-all-orders { margin-bottom: 12px; padding: 20px; border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .045); }
.customer-all-orders > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid #edf1ee; }
.customer-all-orders > header span { color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.customer-all-orders > header h2 { margin: 5px 0 0; font-size: 20px; }
.customer-all-orders > header > small { color: var(--muted); }
.customer-all-order-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 14px 0 4px; padding: 12px; border-radius: 14px; background: #f4f7f5; }
.customer-all-order-filter label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.customer-all-order-filter input { min-height: 44px; background: #fff; }
.customer-all-order-filter button { min-height: 44px; padding: 0 14px; border: 1px solid #cadbd3; border-radius: 11px; background: #fff; color: var(--jade-dark); cursor: pointer; font-weight: 750; }
.customer-all-order-list { display: grid; }
.customer-all-order-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto 10px; align-items: center; gap: 10px; min-height: 78px; padding: 12px 1px; border-bottom: 1px solid #edf1ee; }
.customer-all-order-row[hidden] { display: none !important; }
.customer-all-order-row:last-child { border-bottom: 0; }
.customer-all-order-date strong, .customer-all-order-date small, .customer-all-order-main strong, .customer-all-order-main small, .customer-all-order-money strong, .customer-all-order-money small { display: block; }
.customer-all-order-date strong { font-size: 12px; }
.customer-all-order-date small, .customer-all-order-main small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.customer-all-order-main { min-width: 0; }
.customer-all-order-main strong, .customer-all-order-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-all-order-money { text-align: right; }
.customer-all-order-money > strong { margin-bottom: 5px; color: #a43d32; font-size: 15px; }
.customer-all-order-money .client-bill-status { display: inline-block; margin: 0; }
.customer-all-order-row > b { color: #829188; font-size: 20px; }
.customer-account-loading { display: grid; min-height: 190px; place-content: center; justify-items: center; color: var(--muted); }
.customer-account-loading span { width: 30px; height: 30px; margin-bottom: 12px; border: 3px solid #dfe9e4; border-top-color: var(--jade); border-radius: 50%; animation: client-spin .8s linear infinite; }
.customer-connection-requests { overflow: hidden; margin-bottom: 12px; padding: 16px 18px; border: 1px solid #d9e5df; border-radius: 19px; background: #fff; box-shadow: 0 9px 24px rgba(13, 36, 56, .04); }
.customer-connection-requests > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; color: var(--jade-dark); font-size: 12px; }
.customer-connection-requests article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #edf1ee; }
.customer-connection-requests article > span { min-width: 0; }
.customer-connection-requests article strong, .customer-connection-requests article small { display: block; }
.customer-connection-requests article small { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.customer-connection-requests article > div { display: flex; flex: 0 0 auto; gap: 7px; }
.customer-connection-requests button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--jade); color: #fff; cursor: pointer; font-weight: 750; }
.customer-connection-requests button.secondary { border: 1px solid #d7e2dc; background: #f6f8f7; color: #5f6e66; }
.customer-connection-requests em { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #fff4df; color: #946015; font-size: 11px; font-style: normal; font-weight: 800; }
.customer-factory-list { margin-bottom: 12px; padding: 20px; border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .045); }
.customer-factory-list > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid #edf1ee; }
.customer-factory-list > header span, .customer-factory-list > header h2 { display: block; }
.customer-factory-list > header span { color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.customer-factory-list > header h2 { margin: 5px 0 0; font-size: 20px; }
.customer-factory-list > header > small { color: var(--muted); }
.customer-factory-search { padding: 14px 0 4px; }
.customer-factory-search > label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.customer-factory-search > div { display: flex; min-height: 50px; padding: 4px 5px 4px 14px; border: 1px solid #cad8d1; border-radius: 14px; background: #f8fbf9; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.customer-factory-search > div:focus-within { border-color: var(--jade); background: #fff; box-shadow: 0 0 0 3px rgba(24, 128, 105, .1); }
.customer-factory-search input { min-width: 0; flex: 1; padding: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.customer-factory-search input::placeholder { color: #94a39b; }
.customer-factory-search button { min-width: 54px; border: 0; border-radius: 10px; background: #e8f2ed; color: var(--jade-dark); font-weight: 800; }
.customer-factory-empty { padding: 25px 10px 12px; text-align: center; }
.customer-factory-empty strong, .customer-factory-empty small { display: block; }
.customer-factory-empty small { margin-top: 6px; color: var(--muted); line-height: 1.5; }
.customer-factory-account { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 12px; align-items: center; gap: 11px; min-height: 80px; padding: 13px 2px; border-bottom: 1px solid #edf1ee; color: var(--ink); text-decoration: none; }
.customer-factory-account.is-empty { grid-template-columns: 42px minmax(0, 1fr) auto; }
.customer-factory-account[hidden], .customer-factory-empty[hidden], .customer-factory-search button[hidden] { display: none !important; }
.customer-factory-account:last-child { border-bottom: 0; }
.customer-factory-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--jade-soft); color: var(--jade-dark); font-size: 17px; font-weight: 850; }
.customer-factory-main, .customer-factory-amount { min-width: 0; }
.customer-factory-main strong, .customer-factory-main small, .customer-factory-amount strong, .customer-factory-amount small { display: block; }
.customer-factory-main > strong { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.customer-factory-main > small { overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.customer-factory-main > small em { color: #a86108; font-style: normal; font-weight: 800; }
.customer-factory-main .customer-factory-error { color: #9a5e05; }
.customer-factory-amount { text-align: right; }
.customer-factory-amount small { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.customer-factory-amount strong { color: #a43d32; font-size: 18px; }
.customer-factory-amount strong.settled { color: var(--jade-dark); font-size: 15px; }
.customer-factory-account > b { color: #829188; font-size: 22px; }
.customer-new-receipt { overflow: hidden; margin-bottom: 12px; border: 1px solid #dfe7e2; border-radius: 18px; background: #fff; box-shadow: 0 8px 22px rgba(13, 36, 56, .035); }
.customer-new-receipt summary { display: grid; grid-template-columns: 36px minmax(0, 1fr) 14px; align-items: center; gap: 11px; padding: 15px 18px; cursor: pointer; list-style: none; }
.customer-new-receipt summary::-webkit-details-marker { display: none; }
.customer-new-receipt summary > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #eef6f2; color: var(--jade-dark); font-size: 20px; }
.customer-new-receipt summary strong, .customer-new-receipt summary small { display: block; }
.customer-new-receipt summary small { margin-top: 3px; color: var(--muted); }
.customer-new-receipt summary > b { color: #829188; font-size: 20px; transition: transform .2s ease; }
.customer-new-receipt[open] summary > b { transform: rotate(90deg); }
.customer-new-receipt form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 0 18px 18px; }
.customer-new-receipt form .button { min-height: 50px; }
.remembered-client-accounts, .client-link-login, .client-first-entry { margin-bottom: 12px; padding: 20px; border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .045); }
.remembered-client-accounts > header span, .remembered-client-accounts > header strong { display: block; }
.remembered-client-accounts > header span { color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.remembered-client-accounts > header strong { margin-top: 5px; font-size: 19px; }
.remembered-client-accounts article { margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf1ee; }
.remembered-client-accounts article a { color: var(--ink); text-decoration: none; }
.remembered-client-accounts article a span, .remembered-client-accounts article a strong, .remembered-client-accounts article a small { display: block; }
.remembered-client-accounts article a span { color: var(--muted); font-size: 12px; }
.remembered-client-accounts article a strong { margin-top: 3px; }
.remembered-client-accounts article a small { margin-top: 4px; color: var(--jade-dark); }
.client-first-entry strong { display: block; margin-top: 7px; font-size: 19px; }
.client-first-entry p { margin: 9px 0 0; color: var(--muted); line-height: 1.7; }
.client-first-entry .button { width: 100%; margin-top: 16px; }
.client-link-login h2 { margin: 6px 0 15px; font-size: 19px; }
.client-link-login form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.client-link-login form label { min-width: 0; }
.client-link-login form .button { min-height: 50px; }
.client-link-login > small { display: block; margin-top: 12px; color: var(--muted); line-height: 1.5; }
.registration-page { width: min(640px, 100%); margin: 0 auto; }
.registration-hero { margin: 14px 0 12px; padding: 27px 24px; border-radius: 22px; color: #fff; box-shadow: 0 18px 42px rgba(13, 36, 56, .14); }
.registration-hero.factory { background: linear-gradient(145deg, #0d293d, #155348); }
.registration-hero.customer { background: linear-gradient(145deg, #123b4e, #1a6557); }
.registration-hero > span { color: #91d1c2; font-size: 13px; font-weight: 800; }
.registration-hero h1 { margin: 8px 0; font-size: 31px; letter-spacing: -.035em; }
.registration-hero p { margin: 0; color: #c4d7d3; line-height: 1.65; }
.registration-form { display: grid; gap: 15px; padding: 22px; border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .045); }
.registration-step span, .registration-step strong { display: block; }
.registration-step span { color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.registration-step strong { margin-top: 5px; font-size: 18px; }
.registration-form .button { width: 100%; min-height: 52px; margin-top: 3px; }
.registration-form > small { color: var(--muted); line-height: 1.55; text-align: center; }
.verification-field { display: grid; grid-template-columns: minmax(0, 1fr) 132px; align-items: end; gap: 10px; }
.verification-field .button { min-height: 50px; margin: 0; padding-inline: 10px; font-size: 14px; }
.legal-consent { display: flex !important; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.55; }
.legal-consent input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--jade); }
.legal-consent a, .legal-links a { color: var(--jade-dark); text-decoration: none; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; color: #9aa6a0; font-size: 12px; }
.login-forgot-button { justify-self: end; margin: -5px 0 0; padding: 2px 0; border: 0; background: transparent; color: var(--jade-dark); cursor: pointer; font-size: 13px; }
.security-form-intro, .deletion-warning { padding: 14px 15px; border-radius: 13px; background: var(--jade-soft); }
.deletion-warning { background: #fff3f1; color: #79332f; }
.security-form-intro strong, .security-form-intro p, .deletion-warning strong, .deletion-warning p { display: block; margin: 0; }
.security-form-intro p, .deletion-warning p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-security-menu { overflow: hidden; border: 1px solid #e0e7e3; border-radius: 15px; }
.account-security-menu a, .account-security-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 14px; padding: 15px; border: 0; border-bottom: 1px solid #e8eeea; background: #fff; color: var(--ink); cursor: pointer; text-align: left; text-decoration: none; }
.account-security-menu > :last-child { border-bottom: 0; }
.account-security-menu span { color: var(--muted); font-size: 12px; }
.account-security-menu button { color: #9b322c; }
.account-security-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; }
.account-security-panel span, .account-security-panel strong, .account-security-panel small { display: block; }
.account-security-panel span { color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.account-security-panel strong { margin-top: 5px; }
.account-security-panel small { margin-top: 5px; color: var(--muted); }
.account-security-panel .button { flex: 0 0 auto; }
.staff-settings-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; }
.staff-settings-panel span, .staff-settings-panel strong, .staff-settings-panel small { display: block; }
.staff-settings-panel span { color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.staff-settings-panel strong { margin-top: 5px; }
.staff-settings-panel small { margin-top: 5px; color: var(--muted); }
.staff-permission-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.staff-permission-guide div { padding: 12px; border-radius: 12px; background: #f1f6f3; }
.staff-permission-guide b, .staff-permission-guide span { display: block; }
.staff-permission-guide b { color: var(--navy); }
.staff-permission-guide span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.staff-list { display: grid; gap: 9px; }
.staff-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; }
.staff-row strong, .staff-row span, .staff-row small { display: block; }
.staff-row span { margin-top: 3px; color: var(--ink); font-size: 13px; }
.staff-row small { margin-top: 3px; color: var(--muted); }
.staff-row .button { min-height: 38px; padding: 0 14px; }
.staff-empty, .staff-loading { display: grid; gap: 5px; padding: 20px; border-radius: 13px; background: #f3f6f5; color: var(--muted); text-align: center; }
.staff-empty strong { color: var(--ink); }
.staff-add-button { width: 100%; margin-top: 14px; }
.staff-form-intro, .staff-edit-name { margin-bottom: 16px; padding: 14px; border-radius: 13px; background: #eef6f2; }
.staff-form-intro strong, .staff-form-intro p, .staff-edit-name strong, .staff-edit-name span { display: block; }
.staff-form-intro p, .staff-edit-name span { margin: 5px 0 0; color: var(--muted); }
.staff-permission-picker { display: grid; gap: 9px; margin: 16px 0; padding: 0; border: 0; }
.staff-permission-picker legend { margin-bottom: 9px; color: var(--ink); font-size: 14px; font-weight: 800; }
.staff-permission-picker label { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 62px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; cursor: pointer; }
.staff-permission-picker input { width: 20px; height: 20px; margin: 0; accent-color: var(--jade); }
.staff-permission-picker span, .staff-permission-picker strong, .staff-permission-picker small { display: block; }
.staff-permission-picker small { margin-top: 3px; color: var(--muted); line-height: 1.45; }
.permission-empty { max-width: 620px; }
.permission-empty p { color: var(--muted); }
.interaction-settings-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; border-color: #cfe1da; background: linear-gradient(145deg, #fff 0%, #f1f7f4 100%); }
.interaction-settings-panel span, .interaction-settings-panel strong, .interaction-settings-panel small { display: block; }
.interaction-settings-panel span { color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.interaction-settings-panel strong { margin-top: 5px; }
.interaction-settings-panel small { margin-top: 5px; color: var(--muted); }
.interaction-settings-panel .button { flex: 0 0 auto; }
.interaction-preference-intro { margin-bottom: 14px; padding: 14px; border-radius: 14px; background: #eef6f3; color: #315b50; }
.interaction-preference-intro strong, .interaction-preference-intro p { display: block; margin: 0; }
.interaction-preference-intro p { margin-top: 5px; color: #5d746b; font-size: 13px; line-height: 1.6; }
.interaction-preference-list { display: grid; gap: 10px; }
.interaction-preference-list label { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid #dbe5e0; border-radius: 14px; background: #fff; cursor: pointer; }
.interaction-preference-list label span { min-width: 0; }
.interaction-preference-list label strong, .interaction-preference-list label small { display: block; }
.interaction-preference-list label small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.interaction-preference-list input { position: relative; width: 50px; min-width: 50px; min-height: 30px; margin: 0; padding: 0; border: 0; border-radius: 999px; appearance: none; background: #cbd4cf; box-shadow: inset 0 1px 3px rgba(13, 36, 56, .13); cursor: pointer; transition: background .16s ease; }
.interaction-preference-list input::after { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(13, 36, 56, .2); content: ""; transition: transform .16s ease; }
.interaction-preference-list input:checked { background: var(--jade); }
.interaction-preference-list input:checked::after { transform: translateX(20px); }
.factory-connection-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin-bottom: 16px; border: 1px solid #dfe7e2; border-radius: 17px; background: #dfe7e2; }
.factory-connection-guide > div { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 14px; background: #fff; }
.factory-connection-guide b { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--jade-soft); color: var(--jade-dark); }
.factory-connection-guide span, .factory-connection-guide strong, .factory-connection-guide small { display: block; min-width: 0; }
.factory-connection-guide strong { font-size: 13px; }
.factory-connection-guide small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.customer-confirm { width: min(680px, 100%); margin: 0 auto; }
.confirm-brand { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 18px; }
.confirm-brand strong, .confirm-brand small { display: block; }
.confirm-brand small { margin-top: 4px; color: #718078; }
.confirm-sheet { overflow: hidden; padding: 22px; }
.confirm-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid #e3eae5; }
.confirm-heading span, .confirm-heading strong { display: block; }
.confirm-heading span { color: #758178; font-size: 13px; }
.confirm-heading strong { margin-top: 5px; font-size: 20px; }
.confirm-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.confirm-meta span, .confirm-meta strong { display: block; }
.confirm-meta span { color: #758178; font-size: 13px; }
.confirm-meta strong { margin-top: 5px; }
.confirm-total { display: flex; align-items: end; justify-content: flex-end; gap: 20px; padding: 18px 0 4px; }
.confirm-total span { color: #66746b; }
.confirm-total strong { font-size: 24px; }
.note-box, .share-box, .confirmed-banner { margin: 14px 0 0; padding: 12px; border-radius: 10px; background: #f0f4f1; color: #56655c; }
.share-box label { margin-bottom: 7px; }
.confirmed-banner { background: var(--jade-soft); color: var(--jade-dark); text-align: center; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.confirm-actions.single { grid-template-columns: 1fr; }
.confirmed-time, .pending-time { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; }
.confirmed-time { background: #e9f6e8; color: #2f6840; }
.pending-time { background: #fff1ce; color: #805308; }
.back-link { display: block; margin-top: 16px; color: #42604d; text-align: center; }
.customer-page-footer { margin-top: 18px; color: #88959e; font-size: 12px; text-align: center; }
.customer-receipt-bar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 12px; padding: 8px; border: 1px solid rgba(213, 222, 218, .82); border-radius: 16px; background: rgba(255, 255, 255, .94); box-shadow: 0 8px 24px rgba(13, 36, 56, .06); backdrop-filter: blur(14px); }
.customer-receipt-bar > div { min-width: 0; text-align: center; }
.customer-receipt-bar strong, .customer-receipt-bar span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-receipt-bar strong { font-size: 16px; }
.customer-receipt-bar span { margin-top: 2px; color: #758178; font-size: 12px; }
.customer-back-button, .customer-share-link { border: 0; background: transparent; color: var(--jade-dark); cursor: pointer; font-weight: 700; }
.customer-back-button { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: #eef4f1; color: var(--navy); font-size: 32px; line-height: 1; }
.customer-share-link { min-width: 42px; padding: 10px 7px; }
.customer-header-spacer { width: 42px; height: 42px; }
.customer-account-menu { position: relative; z-index: 30; }
.customer-account-menu > summary { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: #eef4f1; color: var(--navy); cursor: pointer; list-style: none; }
.customer-account-menu > summary::-webkit-details-marker { display: none; }
.customer-account-menu > summary span { font-size: 22px; line-height: 1; transform: scaleX(1.08); }
.customer-account-menu[open] > summary { background: #dfece6; color: var(--jade-dark); }
.customer-account-menu-panel { position: absolute; top: calc(100% + 9px); right: 0; display: grid; width: min(270px, calc(100vw - 34px)); overflow: hidden; padding: 7px; border: 1px solid #d8e3dd; border-radius: 16px; background: #fff; box-shadow: 0 18px 45px rgba(13, 36, 56, .16); }
.customer-account-menu-panel button { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 58px; padding: 8px 10px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.customer-account-menu-panel button:hover, .customer-account-menu-panel button:focus-visible { background: #f2f7f4; }
.customer-account-menu-panel button > span:first-child { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #edf6f2; color: var(--jade-dark); font-size: 14px; font-weight: 850; }
.customer-account-menu-panel button strong, .customer-account-menu-panel button small { display: block; }
.customer-account-menu-panel button small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.customer-account-menu-panel button.danger { margin-top: 3px; border-top: 1px solid #edf1ee; border-radius: 0 0 11px 11px; color: #9b443c; }
.customer-account-menu-panel button.danger > span:first-child { background: #fff1ef; color: #9b443c; }
.logout-confirm { padding: 4px 0; }
.logout-confirm strong { display: block; font-size: 18px; }
.logout-confirm p { margin: 10px 0 0; color: var(--muted); line-height: 1.7; }
.customer-receipt-preview { overflow: hidden; min-height: 260px; padding: 0; border: 1px solid #dce4df; border-radius: 20px; background: #fff; box-shadow: 0 16px 42px rgba(13, 36, 56, .08); }
.customer-receipt-preview .factory-print-sheet { box-shadow: none; }
.customer-delivery-state { margin-top: 14px; padding: 14px; border: 1px solid rgba(215, 224, 219, .8); border-radius: 16px; background: #fff; }
.customer-delivery-state .confirmed-banner, .customer-delivery-state .confirm-actions, .customer-delivery-state .pending-time { margin: 0; }
.customer-purpose { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 15px; border: 1px solid #dfe7e2; border-radius: 16px; background: #fff; }
.customer-purpose div { min-width: 0; }
.customer-purpose span, .customer-purpose strong, .customer-purpose small { display: block; }
.customer-purpose span { color: var(--jade-dark); font-size: 12px; font-weight: 750; }
.customer-purpose strong { overflow: hidden; margin-top: 4px; text-overflow: ellipsis; white-space: nowrap; }
.customer-purpose small { margin-top: 4px; color: var(--muted); }
.customer-purpose button, .client-order-tools button { flex: 0 0 auto; min-height: 38px; padding: 0 13px; border: 1px solid #cfe0d8; border-radius: 11px; background: #f2f8f5; color: var(--jade-dark); cursor: pointer; font-weight: 750; }
.customer-receipt-actions { display: grid; grid-template-columns: .85fr 1.5fr; gap: 10px; margin-top: 12px; }
.customer-receipt-actions .button { min-height: 52px; }
.customer-preview-entry { display: block; margin: 13px 0 0; color: var(--jade-dark); font-size: 13px; font-weight: 750; text-align: center; text-decoration: none; }
.customer-loading { display: grid; min-height: 70vh; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.customer-loading span { width: 34px; height: 34px; margin-bottom: 14px; border: 3px solid #dfe9e4; border-top-color: var(--jade); border-radius: 50%; animation: client-spin .8s linear infinite; }
.customer-loading strong { color: var(--ink); font-size: 18px; }
.customer-loading p { margin: 7px 0 0; }
@keyframes client-spin { to { transform: rotate(360deg); } }
.customer-client-page { width: min(680px, 100%); margin: 0 auto; }
.client-topbar { position: sticky; z-index: 20; top: 8px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 48px; align-items: center; gap: 10px; padding: 8px; border: 1px solid rgba(213, 222, 218, .82); border-radius: 17px; background: rgba(255, 255, 255, .95); box-shadow: 0 8px 24px rgba(13, 36, 56, .06); backdrop-filter: blur(14px); }
.client-topbar > div { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 0; }
.client-topbar .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
.client-topbar strong, .client-topbar small { display: block; }
.client-topbar small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.client-welcome { margin: 14px 0 12px; padding: 25px 22px; border-radius: 22px; background: linear-gradient(145deg, #0d293d, #155348); color: #fff; box-shadow: 0 18px 42px rgba(13, 36, 56, .15); }
.client-welcome > span { color: #91d1c2; font-size: 13px; font-weight: 750; }
.client-welcome h1 { margin: 8px 0 9px; font-size: clamp(25px, 6.6vw, 34px); line-height: 1.2; letter-spacing: -.035em; }
.client-welcome p { margin: 0; color: #c4d7d3; }
.client-summary { display: grid; grid-template-columns: 1.2fr 1fr 1fr; overflow: hidden; margin-bottom: 12px; border: 1px solid #dfe7e2; border-radius: 19px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .05); }
.client-summary > div { padding: 17px 14px; border-right: 1px solid #edf1ee; }
.client-summary > div:last-child { border-right: 0; }
.client-summary span, .client-summary strong { display: block; }
.client-summary span { color: var(--muted); font-size: 12px; }
.client-summary strong { margin-top: 7px; font-size: 18px; }
.client-summary > div:first-child strong { color: #a43d32; font-size: 22px; }
.client-confirmation-alert { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 12px; margin-bottom: 12px; padding: 15px 17px; border: 1px solid #efd7aa; border-radius: 16px; background: #fff9ed; color: #7a5011; }
.client-confirmation-alert span { grid-row: 1 / 3; display: grid; min-height: 42px; place-items: center; padding: 0 12px; border-radius: 12px; background: #b57616; color: #fff; font-size: 13px; font-weight: 800; }
.client-confirmation-alert strong, .client-confirmation-alert small { display: block; }
.client-confirmation-alert small { color: #8f6b31; }
.client-panel, .client-connect-card { margin-bottom: 12px; padding: 18px; border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(13, 36, 56, .045); }
.client-panel > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.client-panel header span, .client-connect-card > span { color: var(--jade-dark); font-size: 12px; font-weight: 750; }
.client-panel h2, .client-connect-card h2 { margin: 5px 0 0; font-size: 19px; }
.client-panel header small { color: var(--muted); }
.client-date-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 2px 0 11px; padding: 12px; border-radius: 14px; background: #f4f7f5; }
.client-status-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 7px; margin: 2px 0 11px; }
.client-status-summary > span { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0; padding: 9px 10px; border-radius: 11px; font-size: 11px; }
.client-status-summary strong { font-size: 14px; }
.client-status-summary .pending { background: #fff0d7; color: #9a5e05; }
.client-status-summary .confirmed { background: #e4f5ee; color: #11664f; }
.client-status-summary .delivered { background: #eef2f7; color: #536274; }
.client-status-summary .voided { background: #f8e9e7; color: #90443c; }
.client-date-filter label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.client-date-filter input { min-height: 44px; background: #fff; }
.client-date-filter button { min-height: 44px; padding: 0 14px; border: 1px solid #cadbd3; border-radius: 11px; background: #fff; color: var(--jade-dark); cursor: pointer; font-weight: 750; }
.client-date-empty { margin: 5px 0 8px; padding: 22px 12px; border-radius: 13px; background: #f7f9f8; color: var(--muted); text-align: center; }
.client-date-empty strong, .client-date-empty span { display: block; }
.client-date-empty strong { color: var(--ink); }
.client-date-empty span { margin-top: 5px; font-size: 12px; }
.client-order-list { display: grid; }
.client-order-card { border-top: 1px solid #edf1ee; }
.client-order-card:first-child { border-top: 0; }
.client-order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; padding: 14px 2px; border-top: 1px solid #edf1ee; color: var(--ink); text-decoration: none; }
.client-order-card .client-order-row { border-top: 0; }
.client-order-row > span { min-width: 0; }
.client-order-row > span:nth-child(2) { text-align: right; }
.client-order-row strong, .client-order-row small { display: block; }
.client-order-row small { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.client-order-row b { color: #7a8d83; font-size: 22px; }
.client-order-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 14px; }
.client-order-tools > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.client-order-tools small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.client-bill-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.client-bill-status.pending { background: #fff0d7; color: #9a5e05; }
.client-bill-status.confirmed { background: #e4f5ee; color: #11664f; }
.client-bill-status.delivered { background: #eef2f7; color: #536274; }
.client-bill-status.voided { background: #f8e9e7; color: #90443c; }
.client-order-card.voided { opacity: .78; }
.voided-banner { display: grid; gap: 4px; padding: 13px 14px; border-radius: 12px; background: #fff0ed; color: #913d35; text-align: center; }
.voided-banner span { font-size: 12px; }
.client-empty { padding: 24px 12px; color: var(--muted); text-align: center; }
.client-connect-card { padding: 22px; background: linear-gradient(145deg, #f4faf7, #fff); }
.client-connect-card p { margin: 10px 0 17px; color: var(--muted); line-height: 1.7; }
.client-connect-card .button { width: 100%; min-height: 50px; }
.client-connection-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding: 16px 18px; border: 1px solid #dfe7e2; border-radius: 17px; background: #fff; }
.client-connection-note div { min-width: 0; }
.client-connection-note span, .client-connection-note strong { display: block; }
.client-connection-note span { color: var(--muted); font-size: 12px; }
.client-connection-note strong { margin-top: 5px; }
.client-connection-note > small { color: #9a5e05; font-weight: 750; }
.client-connection-note .button { flex: 0 0 auto; min-height: 42px; padding: 0 15px; }
.connection-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 17px 0 4px; }
.connection-flow > div { display: grid; justify-items: center; gap: 7px; padding: 11px 5px; border-radius: 12px; background: #f3f6f5; color: #77847c; font-size: 11px; text-align: center; }
.connection-flow b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #dfe7e3; color: #607068; }
.connection-flow .done { background: #edf7f2; color: var(--jade-dark); }
.connection-flow .done b { background: var(--jade); color: #fff; }
.connection-flow .current { background: #fff5e5; color: #936015; }
.connection-flow .current b { background: #b77818; color: #fff; }
.connection-result-note { margin-top: 12px; padding: 12px; border-radius: 11px; background: #f2f7f4; color: var(--muted); font-size: 12px; line-height: 1.55; }
.client-pending { padding: 13px; border-radius: 12px; background: var(--jade-soft); color: var(--jade-dark); font-weight: 750; text-align: center; }
.connect-intro { margin-bottom: 16px; padding: 14px; border-radius: 13px; background: #f0f7f3; }
.connect-intro strong { color: var(--jade-dark); }
.connect-intro p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; }
.connection-approve { min-height: 34px; padding: 0 11px; border: 0; border-radius: 9px; background: var(--jade); color: #fff; cursor: pointer; font-size: 13px; font-weight: 750; }
.app-shell.customer-mode { padding: 0; }
.customer-mode .sidebar, .customer-mode .mobile-header, .customer-mode .menu-backdrop { display: none !important; }
.customer-mode:not(.customer-app-mode) .bottom-nav { display: none !important; }
.customer-mode .main-content { width: min(680px, 100%); min-height: 100vh; padding: 28px 16px; }
.order-detail-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.review-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.review-status > div { display: flex; align-items: center; gap: 10px; }
.review-status span:not(.status), .review-status small { color: #6e7b72; }
.correction-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 16px 18px; border: 1px solid #cfe0d8; border-radius: 17px; background: linear-gradient(135deg, #edf7f3, #fff); }
.correction-notice.voided { border-color: #ecc8c3; background: linear-gradient(135deg, #fff1ef, #fff); }
.correction-notice span, .correction-notice strong, .correction-notice small { display: block; }
.correction-notice span { color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.correction-notice.voided span { color: #9b3d35; }
.correction-notice strong { margin-top: 4px; font-size: 17px; }
.correction-notice small { margin-top: 5px; color: var(--muted); }
.correction-confirm, .correction-blocked { margin-bottom: 15px; padding: 16px; border-radius: 15px; background: #f1f7f4; }
.correction-blocked { background: #fff2ef; }
.correction-confirm strong, .correction-blocked strong { display: block; font-size: 17px; }
.correction-confirm p, .correction-blocked p { margin: 7px 0 0; color: var(--muted); line-height: 1.65; }
.print-preview { padding: 14px; border-radius: 18px; background: #e7ece8; }
.print-sheet { position: relative; padding: 20px; border: 1px solid #cfd3d0; border-radius: 4px; background: #fff; color: #1d211e; box-shadow: 0 8px 24px rgba(30, 46, 35, .1); }
.voided-preview { background: #efe8e7; }
.print-voided { opacity: .76; }
.print-void-stamp { position: absolute; top: 43%; left: 50%; z-index: 2; padding: 10px 25px; border: 4px double #a9443b; color: #a9443b; font-size: 42px; font-weight: 900; letter-spacing: .2em; transform: translate(-50%, -50%) rotate(-12deg); }
.print-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; text-align: center; }
.print-title > div:first-child { flex: 1; }
.print-title h2, .print-title p { margin: 0; }
.print-title h2 { letter-spacing: .16em; }
.print-title p { margin-top: 5px; color: #3f4742; }
.print-verify { display: grid; min-width: 74px; min-height: 54px; place-items: center; padding: 6px 9px; border: 1px solid #303530; color: #303530; font-size: 11px; line-height: 1.45; text-align: center; }
.print-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 16px; margin: 14px 0 10px; }
.print-table-wrap { overflow-x: auto; }
.print-sheet table { min-width: 620px; border: 1px solid #343a35; }
.print-sheet th, .print-sheet td { border: 1px solid #343a35; }
.print-sheet td small { color: #4f5852; }
.print-sheet tfoot td { font-weight: 700; }
.factory-print-sheet { width: 980px; font-size: 12px; }
.factory-print-sheet .print-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.factory-print-sheet .print-table-wrap { overflow: visible; }
.factory-print-sheet .print-matrix { width: 100%; min-width: 0; table-layout: fixed; font-size: 12px; }
.print-matrix th, .print-matrix td { height: 38px; padding: 4px 3px; text-align: center; vertical-align: middle; }
.print-matrix th:first-child, .print-matrix td:first-child { width: 130px; text-align: left; }
.print-matrix th:nth-child(2), .print-matrix td:nth-child(2) { width: 38px; }
.print-matrix th:nth-child(3), .print-matrix td:nth-child(3) { width: 30px; }
.print-matrix th:nth-child(n+4):nth-child(-n+13), .print-matrix td:nth-child(n+4):nth-child(-n+13) { width: 45px; }
.print-matrix th:nth-child(14), .print-matrix td:nth-child(14) { width: 52px; }
.print-matrix th:nth-child(15), .print-matrix td:nth-child(15) { width: 64px; }
.print-matrix th:nth-child(16), .print-matrix td:nth-child(16) { width: 64px; }
.print-matrix th:nth-child(17), .print-matrix td:nth-child(17) { width: 76px; }
.print-matrix thead tr:last-child th { height: 28px; padding-block: 2px; font-size: 11px; }
.matrix-product small { display: block; margin-top: 2px; }
.matrix-group { background: #f2f4f2; font-size: 13px; font-weight: 900; }
.matrix-measure { padding: 0 !important; }
.matrix-measure strong { display: grid; width: 100%; height: 100%; min-height: 36px; place-items: center; overflow: hidden; padding: 2px 1px; font-size: 16px; font-weight: 900; line-height: 1; text-overflow: clip; white-space: nowrap; }
.matrix-continuation .matrix-product { color: #5a655e; }
.rotated-print-preview { position: relative; }
.print-uppercase, .print-note { margin: 0; padding: 7px 2px; border-bottom: 1px solid #343a35; }
.print-footer { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding-top: 11px; }
.print-footer p { margin: 0 0 4px; }
.print-app-recommendation { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid #343a35; font-size: 11px; font-weight: 700; text-align: center; }
.delivery-workflow { margin-bottom: 14px; padding: 18px; border: 1px solid #d7e2dc; border-radius: 20px; background: linear-gradient(145deg, #f9fbfa 0%, #eef6f3 100%); box-shadow: 0 10px 30px rgba(13, 36, 56, .045); }
.delivery-workflow > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.delivery-workflow > header span { color: var(--jade); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.delivery-workflow > header h2 { margin: 4px 0 0; font-size: 20px; }
.delivery-workflow > header p { margin: 0; color: var(--muted); font-size: 13px; }
.delivery-channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.delivery-channel { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: 12px; min-width: 0; padding: 15px; border: 1px solid #dbe4df; border-radius: 16px; background: rgba(255, 255, 255, .96); }
.delivery-channel.completed { border-color: #a8cbbf; box-shadow: inset 0 3px 0 #4e9b82; }
.delivery-channel-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #edf4f1; color: var(--jade-dark); font-size: 17px; font-weight: 900; }
.delivery-channel.completed .delivery-channel-icon { background: var(--jade); color: #fff; }
.delivery-channel-copy { min-width: 0; }
.delivery-channel-copy span { display: block; overflow: hidden; color: #6c7a72; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.delivery-channel-copy h3 { margin: 4px 0 3px; color: var(--ink); font-size: 17px; }
.delivery-channel-copy p { min-height: 40px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.delivery-channel > .button { grid-column: 1 / -1; min-height: 45px; margin-top: 2px; }
.delivery-channel-actions { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 2px; }
.delivery-channel-actions .button { width: 100%; min-height: 45px; padding-inline: 10px; }
.delivery-channel-actions .button:only-child { grid-column: 1 / -1; }
.print-image-modal { width: min(760px, 100%); }
.print-image-pages { display: grid; gap: 14px; }
.print-image-pages figure { margin: 0; padding: 8px; border: 1px solid #dbe4df; border-radius: 12px; background: #f4f6f5; }
.print-image-pages img { display: block; width: 100%; height: auto; border: 1px solid #bdc8c1; background: #fff; }
.print-image-pages figcaption { padding: 8px 3px 1px; color: var(--muted); font-size: 12px; text-align: center; }
.print-image-steps { display: grid; gap: 7px; margin-top: 16px; padding: 15px; border-radius: 14px; background: var(--jade-soft); }
.print-image-steps strong { color: var(--jade-dark); }
.print-image-steps span { color: #52645c; font-size: 13px; }
.print-image-steps small { color: #7a6150; font-size: 12px; line-height: 1.55; }
.print-image-modal footer { flex-wrap: wrap; }
.print-share-unavailable { flex: 1 1 100%; padding: 10px 12px; border-radius: 10px; background: #fff4e8; color: #80552f; font-size: 13px; line-height: 1.5; text-align: center; }
.review-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.review-actions.single { grid-template-columns: 1fr; }
.review-actions .button[disabled] { cursor: default; opacity: .75; }
.printer-intro { margin-bottom: 14px; padding: 12px; border-radius: 11px; background: #edf5ef; color: #365443; }
.printer-intro p { margin: 5px 0 0; }
.measurement-intro { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; background: #edf6f3; color: #365443; }
.measurement-intro strong { font-size: 14px; }
.measurement-intro span { color: #60766b; font-size: 12px; white-space: nowrap; }
.measurement-entry-label { display: flex; align-items: end; justify-content: space-between; margin-bottom: 6px; color: #31534a; font-weight: 800; }
.measurement-entry-label span { font-size: 18px; }
.measurement-entry-label strong { color: #0d6755; font-size: 24px; }
.measurement-display { width: 100%; min-height: 66px; border-width: 2px; border-color: #90b9ad; background: #f7faf8; color: #142a36; font-size: 34px; font-weight: 900; letter-spacing: .02em; }
.measurement-preview { display: grid; min-height: 68px; overflow: hidden; grid-template-columns: 1fr 1fr 1.5fr; gap: 1px; margin-top: 8px; padding: 0; border: 2px solid #5bb49d; border-radius: 11px; background: #5bb49d; color: #fff; letter-spacing: .01em; }
.measurement-preview > span { display: flex; align-items: center; justify-content: center; flex-direction: column; background: #102f3c; }
.measurement-preview strong { font-size: 25px; line-height: 1; }
.measurement-preview small { margin-top: 6px; color: #d6eee7; font-size: 11px; font-weight: 700; }
.measurement-preview.invalid { background: #fff1ed; color: #9f3426; }
.measurement-records { margin-top: 10px; padding: 10px; border: 1px solid #bfd5cd; border-radius: 13px; background: #f8fbfa; }
.measurement-records-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.measurement-records-heading strong { color: #123a34; font-size: 15px; }
.measurement-records-heading button { border: 0; background: transparent; color: #08705b; cursor: pointer; font-size: 13px; font-weight: 800; }
.measurement-records-grid { min-height: 70px; max-height: 154px; overflow: hidden; border: 1px solid #8fb7aa; border-radius: 10px; background: #fff; }
.measurement-records-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.measurement-records-table + .measurement-records-table { border-top: 3px solid #d4e5df; }
.measurement-records-table th, .measurement-records-table td { height: 34px; padding: 0 4px; border-right: 1px solid #c7d7d1; border-bottom: 1px solid #c7d7d1; color: #17332d; font-size: 15px; font-weight: 800; text-align: center; }
.measurement-records-table tr:last-child > * { border-bottom: 0; }
.measurement-records-table tr > *:last-child { border-right: 0; }
.measurement-records-table th[scope="row"] { width: 52px; background: #e7f2ee; color: #185f50; font-size: 13px; }
.measurement-records-table th[scope="col"] { background: #f1f7f5; }
.measurement-records-empty { display: grid; min-height: 70px; place-items: center; color: #788982; font-size: 14px; }
.measurement-pad-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(84px, 1fr); align-items: stretch; gap: 10px; margin-top: 10px; }
.measurement-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.measurement-key { position: relative; min-height: 64px; border: 1px solid #c8d5cf; border-radius: 17px; background: linear-gradient(180deg, #fff 0%, #edf2ef 100%); color: #152b36; box-shadow: 0 5px 0 #c5d2cc, 0 8px 16px rgba(13, 36, 56, .08), inset 0 1px 0 rgba(255, 255, 255, .9); cursor: pointer; font-size: 29px; font-weight: 800; transition: transform 45ms ease-out, box-shadow 45ms ease-out, background 45ms ease-out; user-select: none; touch-action: manipulation; will-change: transform; }
.measurement-key:active { border-color: #5b9f8d; background: #dcefe9; box-shadow: 0 5px 0 #b5cbc3, 0 8px 16px rgba(13, 36, 56, .08), inset 0 0 0 2px rgba(23, 107, 90, .2); color: #0c6250; filter: none; transform: none; }
.measurement-key.measurement-key-pressed { border-color: #5b9f8d; background: #dcefe9; box-shadow: 0 5px 0 #b5cbc3, 0 8px 16px rgba(13, 36, 56, .08), inset 0 0 0 2px rgba(23, 107, 90, .2); color: #0c6250; transform: none; }
.measurement-backspace { color: #8e3e32; font-size: 18px; }
.measurement-decimal { border-color: #8fbdb1; background: linear-gradient(180deg, #f5fffb 0%, #dceee8 100%); color: #0c6250; font-size: 34px; }
.measurement-space-key { display: flex; width: 100%; min-height: 70px; align-items: center; justify-content: center; flex-direction: column; gap: 8px; border: 1px solid #0e5b4a; border-radius: 18px; background: linear-gradient(180deg, #268873 0%, #176b5a 100%); color: #fff; box-shadow: 0 6px 0 #0e5647, 0 10px 20px rgba(17, 89, 75, .18), inset 0 1px 0 rgba(255, 255, 255, .2); cursor: pointer; user-select: none; touch-action: manipulation; }
.measurement-space-key strong { font-size: 22px; }
.measurement-space-key span { padding: 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, .17); font-size: 14px; font-weight: 800; }
.measurement-space-key:active { background: #0f5f50; box-shadow: 0 6px 0 #0e5647, 0 10px 20px rgba(17, 89, 75, .18), inset 0 0 0 3px rgba(255, 255, 255, .22); filter: none; transform: none; }
.measurement-space-key.measurement-key-pressed { background: #0f5f50; box-shadow: 0 6px 0 #0e5647, 0 10px 20px rgba(17, 89, 75, .18), inset 0 0 0 3px rgba(255, 255, 255, .22); transform: none; }
.measurement-reset { display: block; margin: 9px auto 0; border: 0; background: transparent; color: #65736a; cursor: pointer; font-weight: 700; }
.measurement-clear { margin-top: 14px; }
.modal-backdrop:has(.measurement-modal) { backdrop-filter: none; }
.measurement-key, .measurement-space-key { contain: paint; -webkit-tap-highlight-color: transparent; }
.measurement-key:active, .measurement-space-key:active { filter: none; }
.measurement-modal { position: relative; overflow: hidden; }
.measurement-record-manager[hidden] { display: none; }
.measurement-record-manager { position: absolute; z-index: 12; inset: 0; display: flex; overflow: hidden; flex-direction: column; background: #fff; }
.measurement-record-manager > header { display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid #e1e8e5; }
.measurement-record-manager > header h2 { margin: 0; font-size: 22px; }
.measurement-manager-body { overflow-y: auto; padding: 14px; }
.measurement-manager-summary { display: flex; justify-content: space-between; padding: 13px 16px; border-radius: 13px; background: #102f3c; color: #fff; font-weight: 800; }
.measurement-manager-summary span { display: flex; align-items: baseline; gap: 5px; }
.measurement-manager-summary strong { font-size: 25px; }
.measurement-manager-jump { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 9px; margin-top: 12px; }
.measurement-manager-jump input { width: 100%; min-width: 0; min-height: 54px; font-size: 24px; font-weight: 900; }
.measurement-manager-jump .button { min-height: 54px; padding-inline: 8px; }
.measurement-manager-page-heading { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; }
.measurement-manager-page-heading strong { font-size: 17px; }
.measurement-manager-page-heading span { color: #65766f; font-size: 13px; }
.measurement-manager-grid { overflow: hidden; border: 1px solid #8fb7aa; border-radius: 10px; background: #fff; }
.measurement-manager-table button { width: 100%; min-height: 32px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.measurement-manager-table .selected { background: #fff0ca; color: #8c5700; box-shadow: inset 0 0 0 2px #e7ad3c; }
.measurement-manager-edit { margin-top: 14px; padding: 14px; border: 2px solid #5bb49d; border-radius: 16px; background: #f1faf6; }
.measurement-manager-edit h3 { margin: 0 0 7px; font-size: 19px; }
.measurement-manager-edit > span { display: inline-block; margin-bottom: 9px; padding: 5px 9px; border-radius: 999px; background: #e2f1ec; color: #37675a; font-size: 13px; font-weight: 800; }
.measurement-manager-edit input { width: 100%; min-height: 64px; border-width: 2px; border-color: #8bb7aa; background: #fff; font-size: 32px; font-weight: 900; }
.measurement-manager-edit > div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 9px; margin-top: 10px; }
.measurement-manager-edit .button { min-height: 46px; }
.measurement-manager-pager { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: center; gap: 8px; margin-top: 14px; }
.measurement-manager-pager button { min-height: 42px; border: 1px solid #c7d7d1; border-radius: 12px; background: #fff; color: #155f50; cursor: pointer; font-weight: 800; }
.measurement-manager-pager button:disabled { opacity: .4; cursor: default; }
.measurement-manager-pager span { color: #5d7169; font-size: 13px; text-align: center; }
.version-note { margin: 0 0 12px; color: #6d7a83; font-size: 13px; }
.ledger-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.ledger-summary > div { padding: 14px; border-radius: 12px; background: #f3f7f8; }
.ledger-summary span, .ledger-summary strong { display: block; }
.ledger-order-finder { margin-bottom: 20px; padding: 19px; border: 1px solid #d7e2dc; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(13, 36, 56, .04); }
.ledger-order-finder > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.ledger-order-finder > header span { color: var(--jade); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.ledger-order-finder > header h2 { margin: 4px 0 0; font-size: 20px; }
.ledger-order-finder > header p { margin: 0; color: var(--muted); font-size: 13px; }
.ledger-date-picker { display: grid; grid-template-columns: 44px minmax(0, 320px); align-items: center; gap: 11px; color: var(--ink); font-weight: 700; }
.ledger-date-picker input { min-height: 52px; padding-inline: 15px; background: #f8faf9; color: var(--ink); font-size: 16px; font-weight: 650; }
#ledger-order-search-results { margin-top: 14px; }
.ledger-finder-result-heading, .ledger-account-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.ledger-finder-result-heading span, .ledger-account-heading span { color: var(--muted); font-size: 12px; }
.ledger-account-heading { margin: 0 2px 10px; }
.ledger-account-heading h2 { margin: 0; font-size: 18px; }
.ledger-search-order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ledger-search-order-list .status { padding: 2px 7px; font-size: 10px; }
.ledger-search-empty { display: grid; gap: 5px; padding: 22px 14px; border: 1px dashed #cad8d1; border-radius: 14px; color: var(--muted); text-align: center; }
.ledger-search-empty strong { color: var(--ink); }
.ledger-account-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ledger-account-card { overflow: hidden; border: 1px solid rgba(211, 221, 216, .86); border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(13, 36, 56, .04); }
.ledger-account-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 19px 15px; }
.ledger-account-card h2, .ledger-account-card p { margin: 0; }
.ledger-account-card h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 18px; }
.ledger-account-card p { margin-top: 5px; color: #748178; font-size: 13px; }
.ledger-balance { flex: 0 0 auto; text-align: right; }
.ledger-balance span, .ledger-balance strong { display: block; }
.ledger-balance span { color: #758178; font-size: 12px; }
.ledger-balance strong { margin-top: 4px; color: #a43d32; font-size: 22px; font-variant-numeric: tabular-nums; }
.ledger-account-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-inline: 19px; padding: 13px 0; border-top: 1px solid #edf1ee; border-bottom: 1px solid #edf1ee; }
.ledger-account-stats > div { padding-inline: 12px; border-right: 1px solid #edf1ee; }
.ledger-account-stats > div:first-child { padding-left: 0; }
.ledger-account-stats > div:last-child { padding-right: 0; border-right: 0; }
.ledger-account-stats span, .ledger-account-stats strong { display: block; }
.ledger-account-stats span { color: #7a8780; font-size: 12px; }
.ledger-account-stats strong { margin-top: 5px; font-size: 15px; }
.ledger-account-card > footer { display: grid; grid-template-columns: 1fr 1.15fr; gap: 9px; padding: 15px 19px 19px; }
.ledger-account-card > footer.single-action { grid-template-columns: 1fr; }
.ledger-account-card > footer .button { min-height: 44px; }
.ledger-account-card.archived { background: #fbfcfb; }
.ledger-overview { display: grid; overflow: hidden; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr); margin-bottom: 16px; border: 1px solid #d7e1dc; border-radius: 22px; background: #fff; box-shadow: 0 12px 34px rgba(13, 36, 56, .055); }
.ledger-overview-main { position: relative; display: grid; align-content: center; min-height: 150px; padding: 24px 26px; background: linear-gradient(140deg, #102d3a 0%, #15594d 100%); color: #fff; }
.ledger-overview-main::after { position: absolute; top: -60px; right: -45px; width: 170px; height: 170px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; content: ""; }
.ledger-overview-main span { color: #bdd5cd; font-size: 13px; font-weight: 700; }
.ledger-overview-main strong { margin-top: 7px; font-size: clamp(30px, 4vw, 40px); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.ledger-overview-main small { margin-top: 8px; color: #d2e3dd; }
.ledger-overview-stats { display: grid; grid-template-columns: repeat(2, 1fr); align-items: center; padding: 22px 12px; }
.ledger-overview-stats > div { padding: 11px 22px; border-right: 1px solid #e5ebe7; }
.ledger-overview-stats > div:last-child { border-right: 0; }
.ledger-overview-stats span, .ledger-overview-stats strong, .ledger-overview-stats small { display: block; }
.ledger-overview-stats span { color: #728078; font-size: 12px; }
.ledger-overview-stats strong { margin-top: 7px; font-size: 21px; font-variant-numeric: tabular-nums; }
.ledger-overview-stats small { margin-top: 6px; color: var(--jade); }
.ledger-workspace { padding: 20px; border: 1px solid #d9e2dd; border-radius: 22px; background: #fff; box-shadow: 0 12px 34px rgba(13, 36, 56, .045); }
.ledger-workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.ledger-workspace-header span { color: var(--jade); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.ledger-workspace-header h2 { margin: 4px 0 0; font-size: 20px; }
.ledger-workspace-header p { margin: 0; color: var(--muted); font-size: 13px; }
.ledger-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 13px 0 18px; }
.ledger-filter-tabs { display: flex; min-width: 0; align-items: center; gap: 7px; }
.ledger-filter-tabs button { min-height: 38px; padding: 0 13px; border: 1px solid #d7e1dc; border-radius: 999px; background: #f7f9f8; color: #526159; cursor: pointer; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ledger-filter-tabs button.selected { border-color: var(--jade); background: var(--jade); color: #fff; }
.ledger-sort { display: flex; width: auto; align-items: center; gap: 7px; font-size: 12px; white-space: nowrap; }
.ledger-sort select { width: 118px; min-height: 38px; padding-block: 6px; border-radius: 10px; font-size: 13px; }
#ledger-order-search-results:empty { display: none; }
#ledger-order-search-results:not(:empty) { margin: 0 0 18px; padding: 15px; border: 1px solid #dce6e0; border-radius: 16px; background: #f8faf9; }
.ledger-account-heading { padding-top: 14px; border-top: 1px solid #edf1ee; }
.ledger-customer-search { display: grid; gap: 6px; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.ledger-customer-search input { width: 100%; }
.ledger-account-list { display: grid; grid-template-columns: 1fr; gap: 7px; }
.ledger-account-row { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 14px; min-height: 76px; padding: 13px 15px; border: 1px solid #e1e7e3; border-radius: 15px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.ledger-account-row:hover { border-color: #91b9ab; background: #f8fbfa; transform: translateY(-1px); }
.ledger-account-row.archived { background: #fafbfa; opacity: .82; }
.ledger-customer-primary { display: flex; min-width: 0; align-items: center; gap: 12px; }
.ledger-customer-avatar { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--jade-soft); color: var(--jade-dark); font-weight: 800; }
.ledger-customer-primary > span:last-child { display: grid; min-width: 0; gap: 5px; }
.ledger-customer-primary strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.ledger-customer-primary strong em { margin-left: 7px; padding: 2px 6px; border-radius: 999px; background: #eef1ef; color: #6a756e; font-size: 10px; font-style: normal; }
.ledger-customer-primary small { overflow: hidden; color: #738078; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ledger-account-numbers { display: grid; min-width: 132px; gap: 3px; text-align: right; }
.ledger-account-numbers small { color: #77847c; font-size: 11px; }
.ledger-account-numbers strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.ledger-account-numbers em { color: #7a8780; font-size: 11px; font-style: normal; }
.money-settled { color: var(--jade-dark); }
.ledger-account-arrow { color: var(--jade); font-size: 27px; font-weight: 400; }
.ledger-account-empty { display: grid; gap: 5px; padding: 28px 16px; border: 1px dashed #cad8d1; border-radius: 14px; color: var(--muted); text-align: center; }
.ledger-account-empty strong { color: var(--ink); }
.ledger-detail-overview { display: grid; grid-template-columns: 1.3fr .85fr .85fr; gap: 8px; margin-bottom: 20px; }
.ledger-detail-overview > div { display: grid; align-content: center; min-height: 88px; padding: 14px; border-radius: 14px; background: #f3f7f5; }
.ledger-detail-overview > div:first-child { background: linear-gradient(135deg, #e8f3ef, #f7faf9); }
.ledger-detail-overview span, .ledger-detail-overview small { color: #697970; font-size: 12px; }
.ledger-detail-overview strong { margin: 6px 0 4px; font-size: 20px; font-variant-numeric: tabular-nums; }
.ledger-detail-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.ledger-detail-toolbar h3 { margin: 0; font-size: 17px; }
.ledger-detail-toolbar > div span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.ledger-detail-toolbar label { width: 142px; font-size: 11px; }
.ledger-detail-toolbar select { min-height: 40px; padding-block: 6px; font-size: 13px; }
.ledger-detail-actions { display: flex; align-items: flex-end; gap: 8px; }
.ledger-detail-actions .button { min-height: 40px; padding: 0 12px; font-size: 12px; }
.ledger-activity-list { display: grid; gap: 8px; }
.ledger-activity-row { display: grid; width: 100%; grid-template-columns: 94px minmax(0, 1fr) auto 20px; align-items: center; gap: 12px; padding: 13px; border: 1px solid #dde6e1; border-radius: 14px; background: #fff; color: var(--ink); }
a.ledger-activity-row { cursor: pointer; transition: border-color .16s ease, background .16s ease; }
a.ledger-activity-row:hover { border-color: #91b9ab; background: #f8fbfa; }
.ledger-activity-date, .ledger-activity-main, .ledger-activity-money { display: grid; min-width: 0; gap: 3px; }
.ledger-activity-date strong { font-size: 14px; }
.ledger-activity-date small, .ledger-activity-main small, .ledger-activity-main em, .ledger-activity-money small { color: #77847c; font-size: 11px; font-style: normal; }
.ledger-activity-main strong { font-size: 14px; }
.ledger-activity-main small, .ledger-activity-main em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-activity-money { text-align: right; }
.ledger-activity-money strong { color: #a43d32; font-size: 16px; font-variant-numeric: tabular-nums; }
.ledger-activity-row.is-payment { background: #f5faf7; }
.ledger-activity-row.is-payment .ledger-activity-money strong { color: var(--jade-dark); }
.ledger-activity-row.is-payment.reversed { opacity: .68; }
.ledger-activity-row.is-void { border-color: #ebcfca; background: #fff8f7; }
.ledger-activity-row.is-void .ledger-activity-money strong { color: #9b443c; }
.ledger-activity-row.is-reversal { border-color: #ead4b0; background: #fffaf0; }
.ledger-activity-row.is-reversal .ledger-activity-money strong { color: #9a6617; }
.ledger-payment-mark { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #dcefe7; color: var(--jade-dark); font-size: 11px; font-weight: 800; }
.ledger-payment-mark.void { background: #f6dfdc; color: #944139; }
.ledger-payment-mark.reversal { background: #f5e8c9; color: #896018; }
.ledger-inline-action { width: max-content; margin-top: 5px; padding: 3px 0; border: 0; background: transparent; color: #9a443d; cursor: pointer; font-size: 11px; font-weight: 750; }
.payment-account-summary { margin-bottom: 16px; padding: 17px; border-radius: 16px; background: linear-gradient(135deg, #e8f3ef, #f7faf9); }
.payment-account-summary span, .payment-account-summary strong, .payment-account-summary small { display: block; }
.payment-account-summary span { color: #65766c; font-size: 13px; }
.payment-account-summary strong { margin-top: 4px; color: #a43d32; font-size: 28px; }
.payment-account-summary small { margin-top: 7px; color: #65766c; }
.payment-customer-name { display: grid; align-content: center; min-height: 50px; padding: 9px 13px; border-radius: 12px; background: #f4f7f5; }
.payment-customer-name span, .payment-customer-name strong { display: block; }
.payment-customer-name span { color: #7a8780; font-size: 12px; }
.payment-customer-name strong { margin-top: 3px; }
.payment-after { margin-top: 14px; padding: 13px 15px; border-radius: 13px; background: #102f3c; color: #fff; }
.payment-after strong { float: right; font-size: 18px; }
.payment-after strong.invalid { color: #ffb5a8; }
.ledger-summary span { color: var(--muted); font-size: 12px; }
.ledger-summary strong { margin-top: 6px; font-size: 17px; }
.detail-section + .detail-section { margin-top: 22px; }
.detail-section h3 { margin: 0 0 10px; font-size: 16px; }
.detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.detail-section-heading h3 { margin: 0; }
.detail-section-heading span { color: var(--muted); font-size: 12px; }
.ledger-order-list { display: grid; gap: 9px; }
.ledger-order-row { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto 24px; align-items: center; gap: 12px; padding: 14px; border: 1px solid #dce5df; border-radius: 14px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; text-decoration: none; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.ledger-order-row:hover { border-color: #91b9ab; background: #f8fbfa; transform: translateY(-1px); }
.ledger-order-main, .ledger-order-money { display: grid; min-width: 0; gap: 3px; }
.ledger-order-main small, .ledger-order-money small { color: #7a8780; font-size: 11px; }
.ledger-order-main strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.ledger-order-main .ledger-order-date { font-size: 18px; line-height: 1.18; }
.ledger-order-time { color: #41554a; font-size: 14px; font-weight: 700; }
.ledger-order-main em, .ledger-order-money em { color: #68776e; font-size: 12px; font-style: normal; }
.ledger-order-money { text-align: right; }
.ledger-order-money strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.ledger-order-money em { color: #9b4337; }
.ledger-order-arrow { color: var(--jade); font-size: 28px; font-weight: 400; }
.order-line-detail-list { display: grid; gap: 9px; }
.order-line-detail { padding: 14px; border: 1px solid #e0e7e3; border-radius: 14px; background: #fbfcfb; }
.order-line-detail > div:first-child { min-width: 0; }
.order-line-detail h3 { margin: 0; font-size: 16px; }
.order-line-detail small { display: block; margin-top: 5px; color: #718078; line-height: 1.5; }
.order-line-calculation { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #e8edea; }
.order-line-calculation span { color: #617067; font-size: 13px; }
.order-line-calculation strong { flex: 0 0 auto; font-size: 17px; }
.order-detail-note { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #f1f5f3; }
.order-detail-note span { color: #748178; font-size: 12px; }
.order-detail-note p { margin: 5px 0 0; line-height: 1.6; }
.order-modal-date h2 { font-size: 22px; line-height: 1.15; }
.order-modal-date > strong { display: block; margin-top: 5px; color: #40544a; font-size: 16px; }
.modal .order-modal-date p { margin-top: 4px; color: #8a948e; font-size: 12px; }
.order-detail-modal footer { flex-wrap: wrap; }

.empty-state { padding: 40px 20px; color: #6b786f; text-align: center; }
.empty-state > span { display: inline-grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: #e9f2ec; color: #2c7147; font-size: 24px; }
.empty-state h3 { margin: 13px 0 0; color: #29362e; }
.empty-state p { margin: 7px auto 15px; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 32px)); padding: 13px 17px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: 0 16px 36px rgba(13, 36, 56, .24); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(9, 25, 38, .58); backdrop-filter: blur(3px); }
.modal { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; border: 1px solid rgba(255, 255, 255, .35); border-radius: 20px; background: #fff; box-shadow: 0 28px 80px rgba(5, 22, 35, .28); }
.modal > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #e2e9e4; }
.modal h2, .modal header p { margin: 0; }
.modal header p { margin-top: 4px; color: #748178; }
.modal-body { padding: 20px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px; border-top: 1px solid #e2e9e4; }
.form-hint { margin: 16px 0 0; color: #6c796f; }
.status-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: #eef3f1; color: #60736c; font-size: 13px; font-weight: 700; white-space: nowrap; }
.cloud-print-result .success-message { display: grid; gap: 8px; padding: 20px; border: 1px solid #cce1d9; border-radius: 18px; background: linear-gradient(145deg, #f3faf7, #e9f5f0); color: #123f36; }
.cloud-print-result .success-message strong { font-size: 21px; }
.cloud-print-result .success-message span { color: #58716a; line-height: 1.65; }

.statement-form-intro { margin-bottom: 16px; padding: 15px 16px; border-radius: 15px; background: linear-gradient(135deg, #eaf4f0, #f8fbfa); }
.statement-form-intro strong { display: block; font-size: 17px; }
.statement-form-intro p { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }
.monthly-statement-page { width: min(1000px, 100%); margin: 0 auto; }
.statement-sheet { overflow: hidden; padding: 34px; border: 1px solid #d9e2dd; border-radius: 22px; background: #fff; box-shadow: 0 18px 50px rgba(13, 36, 56, .08); }
.statement-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 23px; border-bottom: 2px solid #173a43; }
.statement-title > div:first-child { display: flex; align-items: center; gap: 12px; }
.statement-title .brand-mark { width: 43px; height: 43px; border-radius: 13px; }
.statement-title span strong, .statement-title span small { display: block; }
.statement-title span strong { font-size: 18px; }
.statement-title span small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.statement-title > div:last-child { text-align: right; }
.statement-title h2 { margin: 0; font-size: 27px; letter-spacing: .08em; }
.statement-title p { margin: 6px 0 0; color: var(--jade-dark); font-weight: 750; }
.statement-parties { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1px; overflow: hidden; margin: 19px 0; border: 1px solid #dfe6e2; border-radius: 13px; background: #dfe6e2; }
.statement-parties > div { padding: 13px 15px; background: #f9fbfa; }
.statement-parties span, .statement-parties strong { display: block; }
.statement-parties span { color: var(--muted); font-size: 11px; }
.statement-parties strong { margin-top: 5px; }
.statement-summary { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; margin-bottom: 16px; border: 1px solid #dce5e0; border-radius: 15px; }
.statement-summary > div { padding: 15px; border-right: 1px solid #e5ebe7; }
.statement-summary > div:last-child { border-right: 0; }
.statement-summary span, .statement-summary strong { display: block; }
.statement-summary span { color: var(--muted); font-size: 12px; }
.statement-summary strong { margin-top: 7px; font-size: 18px; font-variant-numeric: tabular-nums; }
.statement-summary .closing { background: #123a3f; color: #fff; }
.statement-summary .closing span { color: #bad5cc; }
.statement-summary .closing strong { font-size: 22px; }
.statement-adjustments { margin: -4px 0 15px; padding: 10px 13px; border-radius: 10px; background: #fff6e8; color: #806020; font-size: 12px; }
.statement-table-wrap { overflow-x: auto; }
.statement-table { min-width: 680px; border: 1px solid #dce4df; }
.statement-table th { background: #f1f5f3; color: #526159; }
.statement-table td { vertical-align: top; }
.statement-table td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.statement-table td strong, .statement-table td small { display: block; }
.statement-table td small { white-space: normal; }
.statement-table td small a { color: var(--jade-dark); text-decoration: underline; text-underline-offset: 2px; }
.statement-table .statement-increase { color: #9a443d; }
.statement-table .statement-decrease { color: var(--jade-dark); }
.statement-table .statement-empty { padding: 34px; color: var(--muted); text-align: center; }
.statement-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 17px; border-top: 1px solid #dfe6e2; }
.statement-footer p { max-width: 600px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.statement-footer strong { font-size: 12px; }

@media (max-width: 900px) {
  :root { --mobile-header-height: calc(54px + env(safe-area-inset-top)); }
  html, body, #app, .app-shell, .main-content { width: 100%; min-width: 0; max-width: 100%; }
  html, body { min-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .app-shell { min-height: 100dvh; overflow: visible; padding-left: 0; padding-top: var(--mobile-header-height); padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .sidebar { top: var(--mobile-header-height); bottom: calc(68px + env(safe-area-inset-bottom)); width: min(310px, 84vw); overflow-y: auto; padding: 18px 16px 14px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 15px 0 40px rgba(0, 0, 0, .2); touch-action: pan-y; -webkit-overflow-scrolling: touch; }
  .sidebar .nav-list { gap: 3px; margin-top: 20px; }
  .sidebar .nav-list a { min-height: 42px; }
  .sidebar .secondary-nav-actions { margin-top: 14px; padding-top: 12px; }
  .sidebar .tenant-card { margin-top: auto; padding-top: 12px; }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .menu-backdrop { position: fixed; inset: var(--mobile-header-height) 0 0 min(310px, 84vw); z-index: 35; border: 0; background: rgba(8, 23, 35, .42); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .app-shell.menu-open .menu-backdrop { display: block; opacity: 1; pointer-events: auto; }
  .mobile-header { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; height: var(--mobile-header-height); align-items: center; justify-content: space-between; padding: env(safe-area-inset-top) 14px 0; border-bottom: 1px solid rgba(213, 222, 218, .72); background: var(--canvas); box-shadow: 0 1px 0 rgba(13, 36, 56, .025); }
  .mobile-context { display: grid; min-width: 0; gap: 1px; }
  .mobile-context span { color: #87938c; font-size: 10px; line-height: 1.2; }
  .mobile-context strong { overflow: hidden; max-width: min(64vw, 360px); color: var(--navy); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-header .icon-button { width: 40px; height: 40px; border: 0; border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgba(13, 36, 56, .07); }
  .bottom-nav { position: fixed; inset: auto 0 0; z-index: 50; display: grid; grid-template-columns: repeat(3, 1fr); min-height: 68px; padding: 7px max(4px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px); }
  .app-shell[data-factory-nav-count="1"] .bottom-nav { grid-template-columns: 1fr; }
  .app-shell[data-factory-nav-count="2"] .bottom-nav { grid-template-columns: repeat(2, 1fr); }
  .bottom-nav a { display: grid; place-items: center; gap: 3px; color: #75838e; font-size: 11px; }
  .bottom-nav svg { width: 21px; height: 21px; }
  .bottom-nav a.active { color: var(--jade); font-weight: 700; }
  .app-shell.customer-mode.customer-app-mode { padding-bottom: 70px; }
  .customer-app-mode .bottom-nav .factory-bottom-item { display: none; }
  .customer-app-mode .bottom-nav .customer-bottom-item { display: grid; }
  .main-content { overflow-x: hidden; padding: 22px 16px calc(24px + env(safe-area-inset-bottom)); }
  html[data-native-shell="true"], html[data-native-shell="true"] body { height: 100%; min-height: 100%; overflow: hidden; overscroll-behavior: none; }
  html[data-native-shell="true"] body { position: fixed; inset: 0; }
  html[data-native-shell="true"] .app-shell { display: flex; height: 100dvh; min-height: 0; overflow: hidden; flex-direction: column; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  html[data-native-shell="true"] .mobile-header,
  html[data-native-shell="true"] .bottom-nav { background: #fff; backdrop-filter: none; }
  html[data-native-shell="true"] .main-content { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
  html[data-native-shell="true"] .main-content::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .site-compliance { margin-bottom: 6px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .main-content > *, .page-header, .onboarding, .order-form, .order-section, .panel, .ledger-workspace, .confirm-sheet { min-width: 0; max-width: 100%; }
  .content-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .sync-notice { align-items: flex-start; flex-direction: column; }
  .sync-notice small { max-width: none; text-align: left; }
  .onboarding { min-height: 0; grid-template-columns: 1fr; }
  .onboarding-features { display: grid; grid-template-columns: repeat(3, 1fr); }
  .onboarding-features article { border-right: 1px solid var(--line); border-bottom: 0; }
  .onboarding-features article:last-child { border-right: 0; }
  .line-item { grid-template-columns: minmax(150px, 1fr) 82px 76px 96px 40px; }
  .line-item .line-amount { display: none; }
}

@media (max-width: 640px) {
  input, select, textarea { min-height: 52px; scroll-margin-block: 90px 190px; font-size: 16px; line-height: 1.25; }
  textarea { line-height: 1.55; }
  .page-header { align-items: flex-start; margin-bottom: 17px; padding-inline: 2px; }
  .page-header h1 { font-size: 28px; }
  .page-header p { margin-top: 4px; font-size: 13px; }
  .page-header > .button { min-width: 42px; padding: 0 12px; }
  .page-header-actions { gap: 6px; }
  .page-header-actions .button { min-height: 42px; padding: 0 11px; font-size: 12px; }
  .metrics, .metrics.compact { grid-template-columns: 1fr 1fr; }
  .metrics .metric:last-child { grid-column: 1 / -1; }
  .metrics.compact .metric:last-child { grid-column: auto; }
  .metric { padding: 15px; }
  .metric strong { font-size: 21px; }
  .panel { padding: 14px; }
  .main-content { padding: 20px 13px; }
  .factory-home { gap: 11px; }
  .factory-home-hero { min-height: 146px; align-items: stretch; flex-direction: column; gap: 18px; padding: 22px; border-radius: 20px; }
  .factory-home-hero strong { font-size: 34px; }
  .factory-home-primary { width: 100%; min-height: 50px; }
  .factory-home-metrics article { padding: 15px 12px; }
  .factory-home-metrics strong { font-size: 18px; }
  .factory-home-metrics span { font-size: 11px; }
  .factory-home-shortcuts { grid-template-columns: 1fr 1fr; }
  .factory-home-shortcuts a { min-height: 82px; border-bottom: 1px solid #e5ebe7; }
  .factory-home-shortcuts a:nth-child(2n) { border-right: 0; }
  .factory-home-shortcuts a:nth-last-child(-n+2) { border-bottom: 0; }
  .factory-home-order { margin-inline: 15px; }
  .manager-search-bar { align-items: stretch; flex-direction: column; gap: 7px; padding: 13px; }
  .manager-search-bar > small { padding: 0 2px; }
  .order-section { padding: 17px 16px; border-color: rgba(215, 224, 219, .72); border-radius: 19px; box-shadow: 0 6px 20px rgba(13, 36, 56, .025); }
  .onboarding { margin-top: 8px; border-radius: 22px; }
  .onboarding-main { padding: 32px 24px; }
  .onboarding-main .brand-mark { margin: 18px 0; }
  .onboarding h1 { font-size: 38px; }
  .onboarding-main > p { margin: 16px 0 22px; font-size: 15px; }
  .onboarding-features { display: grid; grid-template-columns: 1fr; gap: 0; padding: 10px 22px; }
  .onboarding-features article { padding: 17px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .onboarding-features article:last-child { border-bottom: 0; }
  .role-entry { margin-top: 8px; padding: 28px 20px; border-radius: 22px; }
  .auth-entry { margin-top: 8px; padding: 20px; border-radius: 22px; }
  .auth-entry-hero { margin: 24px 0 16px; padding: 25px 22px; border-radius: 20px; }
  .auth-entry-hero h1 { font-size: 39px; }
  .auth-entry-actions { grid-template-columns: 1fr; }
  .login-entry-hero { padding: 23px 20px; }
  .verification-field { grid-template-columns: minmax(0, 1fr) 112px; }
  .verification-field .button { font-size: 12px; }
  .account-security-panel, .interaction-settings-panel, .staff-settings-panel { align-items: stretch; flex-direction: column; }
  .account-security-panel .button, .interaction-settings-panel .button, .staff-settings-panel .button { width: 100%; }
  .staff-permission-guide { grid-template-columns: 1fr; }
  .role-entry-intro { margin: 30px 0 24px; }
  .role-entry-intro h1 { font-size: 34px; }
  .role-options { grid-template-columns: 1fr; }
  .role-option { min-height: 170px; padding: 22px; }
  .client-link-login form { grid-template-columns: 1fr; }
  .client-link-login form .button { width: 100%; }
  .quick-products { grid-template-columns: 1fr 1fr; }
  .quick-products button { min-height: 86px; }
  .quick-pick-heading { align-items: flex-end; }
  .quick-add { flex: 0 0 auto; }
  .form-grid, .toolbar { grid-template-columns: 1fr; }
  .order-history-list { grid-template-columns: 1fr; }
  .line-item { grid-template-columns: minmax(96px, 1fr) 74px 88px 38px; align-items: end; }
  .line-item .product-field { grid-column: 1 / -1; }
  .line-item .icon-button { grid-column: 4; grid-row: 2; }
  .measurement-editor { align-items: flex-start; flex-direction: column; }
  .measurement-editor .per-measure-field { width: 100%; flex-basis: auto; }
  .order-form { padding-bottom: 10px; }
  .order-footer { position: static; z-index: auto; display: grid; grid-template-columns: minmax(0, 1fr) 1.2fr; align-items: center; gap: 10px; margin: 0 0 8px; padding: 12px 14px; border: 1px solid rgba(211, 221, 216, .9); border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(13, 36, 56, .06); }
  .draft-state { display: none; }
  .order-footer strong { font-size: 21px; }
  .entity-card { grid-template-columns: auto minmax(0, 1fr); }
  .entity-meta { grid-column: 2; text-align: left; }
  .customer-card .entity-meta { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; min-width: 0; padding-top: 13px; border-top: 1px solid #edf1ee; }
  .customer-card .entity-meta > span, .customer-card .entity-meta > strong { grid-column: 1; }
  .customer-card-actions { grid-column: 2; grid-row: 1 / 3; margin-top: 0; }
  .ledger-overview { grid-template-columns: 1fr; border-radius: 19px; }
  .ledger-overview-main { min-height: 126px; padding: 20px; }
  .ledger-overview-main strong { font-size: 32px; }
  .ledger-overview-stats { padding: 9px 5px; }
  .ledger-overview-stats > div { padding: 10px 14px; }
  .ledger-overview-stats strong { font-size: 17px; }
  .ledger-workspace { padding: 15px; border-radius: 19px; }
  .ledger-workspace-header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .ledger-workspace-header p { font-size: 12px; }
  .ledger-date-picker { grid-template-columns: 40px minmax(0, 1fr); }
  .ledger-controls { align-items: stretch; flex-direction: column; gap: 10px; }
  .ledger-filter-tabs { overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .ledger-filter-tabs::-webkit-scrollbar { display: none; }
  .ledger-sort { justify-content: flex-end; }
  .ledger-account-row { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 8px; min-height: 72px; padding: 12px 10px; }
  .ledger-customer-primary { gap: 9px; }
  .ledger-customer-avatar { width: 38px; height: 38px; border-radius: 12px; }
  .ledger-account-numbers { min-width: 94px; }
  .ledger-account-numbers strong { font-size: 16px; }
  .ledger-account-numbers em { display: none; }
  .ledger-detail-overview { grid-template-columns: 1fr 1fr; }
  .ledger-detail-overview > div:first-child { grid-column: 1 / -1; min-height: 90px; }
  .ledger-detail-overview > div:not(:first-child) { min-height: 72px; }
  .ledger-detail-toolbar { align-items: flex-end; }
  .ledger-detail-toolbar label { width: 126px; }
  .ledger-detail-actions { align-items: stretch; flex-direction: column-reverse; }
  .ledger-detail-actions .button { width: 126px; }
  .ledger-activity-row { grid-template-columns: 72px minmax(0, 1fr) auto 18px; gap: 7px; padding: 11px 9px; }
  .ledger-activity-date strong { font-size: 12px; }
  .ledger-activity-main strong { font-size: 13px; }
  .ledger-activity-money strong { font-size: 14px; }
  .ledger-account-list { grid-template-columns: 1fr; }
  .ledger-order-finder { padding: 16px; border-radius: 18px; }
  .ledger-order-finder > header { align-items: flex-start; flex-direction: column; gap: 5px; }
  .ledger-search-order-list { grid-template-columns: 1fr; }
  .ledger-account-card > header { padding: 17px 16px 14px; }
  .ledger-account-stats { margin-inline: 16px; }
  .ledger-account-card > footer { padding: 14px 16px 17px; }
  .confirm-meta, .confirm-actions { grid-template-columns: 1fr; }
  .review-status { align-items: flex-start; flex-direction: column; }
  .review-status > div { align-items: flex-start; flex-direction: column; gap: 6px; }
  .delivery-workflow { padding: 15px; border-radius: 18px; }
  .delivery-workflow > header { align-items: flex-start; flex-direction: column; gap: 5px; }
  .delivery-channel-grid { grid-template-columns: 1fr; }
  .delivery-channel { grid-template-columns: 44px minmax(0, 1fr); padding: 14px; }
  .delivery-channel-icon { width: 44px; height: 44px; }
  .delivery-channel-copy p { min-height: 0; }
  .print-preview { padding: 8px; }
  .print-sheet { padding: 12px; }
  .print-title h2 { font-size: 17px; letter-spacing: .08em; }
  .print-meta { grid-template-columns: 1fr; }
  .print-sheet table { min-width: 520px; }
  .factory-print-sheet { width: 980px; padding: 18px; font-size: 11px; }
  .factory-print-sheet .print-title h2 { font-size: 20px; letter-spacing: .14em; }
  .factory-print-sheet .print-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .factory-print-sheet table { min-width: 0; }
  .rotated-print-preview { min-height: 200px; overflow: hidden; padding: 0; border-radius: 4px; background: #fff; }
  .review-actions { position: relative; z-index: 1; bottom: auto; grid-template-columns: .9fr 1.5fr; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .review-actions.single { grid-template-columns: 1fr; }
  .correction-notice { align-items: stretch; flex-direction: column; padding: 15px; }
  .correction-notice .button { width: 100%; }
  .statement-sheet { padding: 19px 16px; border-radius: 18px; }
  .statement-title { gap: 12px; padding-bottom: 17px; }
  .statement-title .brand-mark { width: 36px; height: 36px; }
  .statement-title span strong { max-width: 120px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .statement-title h2 { font-size: 20px; }
  .statement-title p { font-size: 12px; }
  .statement-parties { grid-template-columns: 1fr 1fr; }
  .statement-parties > div:first-child { grid-column: 1 / -1; }
  .statement-summary { grid-template-columns: 1fr 1fr; }
  .statement-summary > div { border-bottom: 1px solid #e5ebe7; }
  .statement-summary > div:nth-child(2) { border-right: 0; }
  .statement-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
  .statement-summary strong { font-size: 16px; }
  .statement-summary .closing strong { font-size: 19px; }
  .statement-footer { align-items: flex-start; flex-direction: column; }
  .customer-confirm { padding-top: 0; }
  .confirm-sheet { padding: 16px; }
  .customer-mode .main-content { padding: 10px 10px calc(18px + env(safe-area-inset-bottom)); }
  .customer-mode:not(.customer-app-mode) .main-content { width: 100%; padding: 0; background: #fff; }
  .customer-mode:not(.customer-app-mode) .auth-entry, .customer-mode:not(.customer-app-mode) .role-entry { min-height: 100dvh; margin: 0; padding: max(20px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: none; }
  .customer-mode:not(.customer-app-mode) .login-entry, .customer-mode:not(.customer-app-mode) .registration-page { min-height: 100dvh; padding: max(8px, env(safe-area-inset-top)) 10px max(16px, env(safe-area-inset-bottom)); }
  .customer-mode:not(.customer-app-mode) .identity-page-bar { top: max(8px, env(safe-area-inset-top)); }
  .customer-app-mode .main-content { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .customer-receipt-bar { top: 8px; }
  .customer-receipt-actions { position: sticky; z-index: 15; bottom: max(8px, env(safe-area-inset-bottom)); padding: 8px; border: 1px solid rgba(213, 222, 218, .85); border-radius: 17px; background: rgba(255, 255, 255, .94); box-shadow: 0 -8px 28px rgba(13, 36, 56, .08); backdrop-filter: blur(14px); }
  .customer-app-mode .customer-receipt-actions { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .modal-body { padding: 16px; }
  .modal footer { padding: 14px 16px; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; }
  .modal:has(.measurement-keypad) { max-height: 96dvh; }
  .measurement-modal > header { padding: 11px 16px; }
  .measurement-modal > header h2 { font-size: 22px; }
  .measurement-modal > header .icon-button { width: 42px; height: 42px; }
  .measurement-modal .modal-body { padding: 12px 14px 8px; }
  .measurement-modal footer { position: sticky; z-index: 3; bottom: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); }
  .measurement-modal footer .button { min-height: 46px; }
  .print-image-modal { max-height: 94vh; }
  .print-image-modal footer .button { flex: 1 1 130px; }
  .measurement-intro { margin-bottom: 8px; padding: 8px 10px; }
  .measurement-intro strong { font-size: 13px; }
  .measurement-intro span { font-size: 11px; }
  .measurement-display { min-height: 54px; padding-block: 8px; }
  .measurement-preview { margin-top: 7px; padding: 0; }
  .measurement-records { margin-top: 7px; padding: 7px; }
  .measurement-records-heading { margin-bottom: 6px; }
  .measurement-records-grid { min-height: 66px; max-height: 136px; }
  .measurement-records-table th, .measurement-records-table td { height: 32px; font-size: 14px; }
  .measurement-pad-row { grid-template-columns: minmax(0, 3fr) 82px; gap: 8px; margin-top: 8px; }
  .measurement-keypad { gap: 7px; }
  .measurement-key { min-height: 52px; border-radius: 14px; font-size: 25px; }
  .measurement-space-key { min-height: 100%; border-radius: 15px; }
  .measurement-space-key strong { font-size: 19px; }
  .measurement-space-key span { padding: 4px 6px; font-size: 11px; }
  .measurement-reset { margin-top: 7px; min-height: 32px; }
  .ledger-summary { grid-template-columns: 1fr; }
  .ledger-order-row { grid-template-columns: minmax(0, 1fr) auto 20px; gap: 9px; padding: 13px; }
  .ledger-order-money strong { font-size: 15px; }
  .order-detail-modal footer .button { flex: 1 1 150px; }
  .toast { right: 16px; bottom: 82px; }
}

@media (max-width: 360px) {
  .main-content { padding-inline: 12px; }
  .order-section { padding-inline: 14px; }
  .quick-pick-heading { align-items: center; }
  .quick-add { padding-inline: 12px; }
  .line-item { grid-template-columns: minmax(0, .9fr) minmax(0, .82fr) minmax(0, 1.08fr) 36px; gap: 6px; }
  .line-item label { min-width: 0; font-size: 12px; }
  .line-item input, .line-item select { min-width: 0; padding-inline: 8px; }
  .line-item .icon-button { width: 36px; }
  .order-footer { padding-inline: 12px; }
  .order-footer .button { padding-inline: 12px; }
  .ledger-customer-avatar { display: none; }
  .ledger-account-row { grid-template-columns: minmax(0, 1fr) auto 14px; }
  .ledger-activity-row { grid-template-columns: 64px minmax(0, 1fr) auto 16px; gap: 5px; }
  .ledger-detail-toolbar > div span { display: none; }
  .ledger-account-card > header { gap: 10px; }
  .ledger-balance strong { font-size: 19px; }
  .ledger-account-stats > div { padding-inline: 8px; }
  .ledger-account-card > footer { grid-template-columns: .9fr 1.1fr; gap: 7px; }
  .ledger-account-card > footer .button { padding-inline: 10px; }
}

@media (max-width: 520px) {
  .customer-connection-requests article { align-items: stretch; flex-direction: column; }
  .customer-connection-requests article > div { justify-content: flex-end; }
  .customer-dashboard-hero { grid-template-columns: 1fr; }
  .customer-dashboard-hero > div { padding: 25px 21px 22px; }
  .customer-dashboard-hero aside { grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.15); border-left: 0; }
  .customer-dashboard-hero aside strong { margin: 0; font-size: 30px; }
  .customer-home-shortcuts { grid-template-columns: 1fr; }
  .customer-home-shortcuts a { min-height: 92px; border-right: 0; border-bottom: 1px solid #e7eeea; }
  .customer-home-shortcuts a:last-child { border-bottom: 0; }
  .customer-all-orders { padding: 17px 15px; }
  .customer-all-order-row { grid-template-columns: 64px minmax(0, 1fr) auto 9px; gap: 7px; }
  .customer-all-order-money > strong { font-size: 14px; }
  .customer-pending-reminder > header { padding-inline: 17px; }
  .customer-pending-order { padding-inline: 17px; }
  .customer-purpose-search { padding: 20px 17px 17px; }
  .customer-purpose-search h1 { margin-bottom: 14px; }
  .customer-purpose-search .button { padding-inline: 14px; }
  .customer-balance-overview { grid-template-columns: minmax(0, 1.25fr) .75fr; }
  .customer-balance-main { padding: 20px 18px; }
  .customer-purpose-results { padding: 17px 15px; }
  .customer-purpose-order { grid-template-columns: 61px minmax(0, 1fr) auto 9px; gap: 7px; }
  .customer-purpose-order-date strong { font-size: 12px; }
  .customer-purpose-order-main strong { font-size: 14px; }
  .customer-factory-list { padding: 17px 15px; }
  .customer-factory-account { grid-template-columns: 40px minmax(0, 1fr) auto 10px; gap: 9px; }
  .customer-factory-avatar { width: 40px; height: 40px; }
  .customer-factory-main > strong { font-size: 16px; }
  .customer-factory-amount strong { font-size: 16px; }
  .customer-new-receipt form { grid-template-columns: 1fr; }
  .customer-new-receipt form .button { width: 100%; }
  .client-summary { grid-template-columns: 1fr 1fr; }
  .client-summary > div:first-child { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid #edf1ee; }
  .client-summary > div:nth-child(2) { border-right: 1px solid #edf1ee; }
  .client-summary > div:last-child { border-right: 0; }
  .client-status-summary > span { padding-inline: 7px; }
  .client-connection-note { align-items: stretch; flex-direction: column; }
  .client-connection-note .button { width: 100%; }
}

@media print {
  @page { size: 241mm 139.5mm; margin: 6mm; }
  body * { visibility: hidden !important; }
  #print-sheet, #print-sheet *, #statement-sheet, #statement-sheet * { visibility: visible !important; }
  #print-sheet { position: absolute; inset: 0 auto auto 0; width: 229mm; padding: 0; border: 0; box-shadow: none; break-inside: avoid-page; page-break-inside: avoid; transform: translate(7mm, 3mm) scale(.94); transform-origin: top left; }
  #print-sheet table { min-width: 0; }
  #print-sheet .print-verify { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .rotated-print-preview { height: auto !important; }
  .print-rotate-stage { position: static !important; width: auto !important; height: auto !important; transform: none !important; }
  #statement-sheet { position: absolute; inset: 0 auto auto 0; width: 190mm; overflow: visible; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  #statement-sheet .statement-table { min-width: 0; font-size: 10px; }
  #statement-sheet .statement-title, #statement-sheet .statement-summary .closing { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

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