:root {
  color-scheme: light;
  --ink: #1c2926;
  --muted: #71807b;
  --line: #e3e9e6;
  --paper: #ffffff;
  --canvas: #f4f7f5;
  --green: #167c62;
  --green-dark: #0f5e4b;
  --green-soft: #e7f4ef;
  --blue: #416d91;
  --blue-soft: #edf3f8;
  --amber: #ae7127;
  --amber-soft: #fbf1df;
  --red: #b74d48;
  --red-soft: #fbebea;
  --shadow: 0 18px 50px rgba(24, 42, 36, .12);
  font-family: 'Segoe UI', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(22, 124, 98, .25); outline-offset: 2px; }
a { color: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 23px 14px 17px; display: flex; flex-direction: column; min-height: 100vh; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 0 10px 18px; text-decoration: none; border-bottom: 1px solid var(--line); }
.brand-logo { display: block; width: min(100%, 176px); height: auto; object-fit: contain; }
.brand-copy { display: block; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--green); color: #fff; font-weight: 700; font-size: 17px; }
.brand-copy strong { display: block; font-size: 13px; font-weight: 700; }
.brand-copy small { display: block; color: #89958f; font-size: 9px; margin-top: 3px; }
.workspace-label, .nav-group-label { padding: 21px 12px 8px; color: #9aa6a1; font-size: 11px; font-weight: 600; }
.main-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { border: 0; border-radius: 6px; background: transparent; color: #576760; display: flex; align-items: center; text-align: left; gap: 10px; min-height: 39px; padding: 0 10px; cursor: pointer; font-size: 13px; }
.nav-link { width: 100%; text-decoration: none; box-sizing: border-box; }
.nav-item:hover { background: #f4f7f5; color: var(--ink); }
.nav-item.active { color: var(--green-dark); background: #eaf4f0; font-weight: 600; }
.nav-glyph { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; border: 1px solid currentColor; font-size: 11px; opacity: .83; }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 10px; background: #eff3f1; color: #728079; font-size: 10px; }
.nav-count:empty { display: none; }
.nav-count.alert-count { background: var(--amber-soft); color: var(--amber); }
.sidebar-bottom { margin-top: auto; padding: 14px 7px 0; border-top: 1px solid var(--line); }
.demo-note { display: flex; align-items: flex-start; gap: 9px; padding: 10px 5px 13px; }
.demo-note strong, .demo-note small { display: block; }
.demo-note strong { font-size: 11px; }
.demo-note small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.status-dot.amber { background: #d99b45; }
.portal-switch { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; border: 1px solid #bcd6ca; color: var(--green-dark); background: #f3faf6; border-radius: 6px; padding: 0 10px; cursor: pointer; font-size: 12px; font-weight: 600; }
.portal-switch:hover { background: var(--green-soft); }
.portal-symbol { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 4px; background: var(--green); color: #fff; font-size: 13px; }
.reset-link { display: block; margin: 10px auto 0; padding: 4px 8px; border: 0; background: transparent; color: #89958f; cursor: pointer; font-size: 10px; }
.reset-link:hover { color: var(--red); }
.main-area { min-width: 0; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 10px; color: #7e8a85; font-size: 12px; }
.crumb strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.crumb-sep { color: #c2cbc6; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.env-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #eed9b7; background: #fff9ee; color: #95601f; border-radius: 20px; padding: 5px 9px; font-size: 10px; white-space: nowrap; }
.env-pill .status-dot { width: 6px; height: 6px; }
.icon-button { position: relative; border: 0; background: transparent; color: #68766f; font-size: 11px; cursor: pointer; padding: 8px; }
.notification-dot { position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.user-avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #dcece5; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.user-label strong, .user-label small { display: block; }
.user-label strong { font-size: 11px; font-weight: 600; }
.user-label small { margin-top: 2px; color: #98a39e; font-size: 10px; }
.mobile-menu { display: none; border: 0; background: none; font-size: 18px; cursor: pointer; }
.page-content { width: min(1440px, 100%); margin: 0 auto; padding: 28px 34px 52px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: 23px; line-height: 1.35; letter-spacing: 0; font-weight: 700; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { min-height: 34px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 1px solid #d9e1dc; border-radius: 5px; padding: 0 12px; background: #fff; color: #4b5c54; cursor: pointer; font-size: 11px; font-weight: 600; white-space: nowrap; }
.button:hover { background: #f6f9f7; border-color: #b9c8c0; }
.button.primary { color: #fff; border-color: var(--green); background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.subtle { background: #f8faf9; }
.button.danger { border-color: #ebc8c5; color: var(--red); background: #fff; }
.button.text-button { border-color: transparent; background: transparent; color: var(--green-dark); padding: 0 5px; }
.button.small { min-height: 28px; padding: 0 9px; font-size: 10px; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.inline-link { border: 0; padding: 0; background: transparent; color: var(--green); cursor: pointer; font-size: inherit; font-weight: 600; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-top: 5px; font-size: 10px; }
.attachment-link { padding: 0; border: 0; background: transparent; color: var(--green-dark); cursor: pointer; font: inherit; text-align: left; }
.attachment-link:hover { text-decoration: underline; }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; margin-bottom: 22px; }
.receivable-strip { grid-template-columns: repeat(5, minmax(0,1fr)); }
.stat-item { min-height: 103px; padding: 17px 19px 15px; border-right: 1px solid var(--line); position: relative; }
.stat-item:last-child { border-right: 0; }
.stat-item::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: var(--stat-color, #aac9bc); }
.stat-label { color: var(--muted); font-size: 11px; }
.stat-value { margin-top: 9px; font-size: 25px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-foot { margin-top: 8px; color: #99a49f; font-size: 10px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); gap: 18px; align-items: start; }
.section-block { background: var(--paper); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.section-head { min-height: 51px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; font-size: 13px; font-weight: 700; }
.section-head .head-note { color: #8a9790; font-size: 10px; }
.section-body { padding: 16px 17px; }
.todo-list { display: flex; flex-direction: column; }
.todo-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: start; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf1ef; }
.todo-row:last-child { border-bottom: 0; }
.todo-row > .status-dot { margin-top: 5px; }
.todo-row strong { display: block; font-size: 11px; line-height: 1.5; }
.todo-row p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.todo-row time { color: #9ba6a1; font-size: 9px; white-space: nowrap; }
.callout { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #e8d6b8; border-radius: 6px; padding: 12px; background: #fffaf1; }
.callout-mark { flex: 0 0 20px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #f2dfbd; color: #926024; font-size: 11px; font-weight: 700; }
.callout strong { display: block; color: #7d5a2d; font-size: 11px; }
.callout p { margin: 4px 0 0; color: #8e7960; font-size: 10px; line-height: 1.6; }
.sync-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf1ef; }
.sync-row:last-child { border-bottom: 0; }
.sync-row strong { display: block; font-size: 11px; }
.sync-row small { display: block; color: #8a9790; margin-top: 4px; font-size: 9px; }
.mini-tag { border: 1px solid var(--line); background: #f8faf9; color: #77847d; border-radius: 4px; padding: 3px 6px; font-size: 9px; white-space: nowrap; }
.mini-tag.warning { border-color: #f0d6ac; color: #996523; background: #fff7e9; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { height: 38px; padding: 0 12px; background: #f8faf9; color: #78857e; font-size: 10px; font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { min-height: 45px; padding: 11px 12px; border-bottom: 1px solid #edf1ef; vertical-align: middle; font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfb; }
.mono { font-family: 'DM Mono', monospace; font-size: 10px; font-variant-numeric: tabular-nums; }
.primary-cell { display: block; font-weight: 600; white-space: nowrap; }
.secondary-cell { display: block; margin-top: 4px; color: #8c9992; font-size: 9px; white-space: nowrap; }
.amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.amount.negative { color: var(--red); }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; background: #f1f4f2; color: #68766f; font-size: 9px; white-space: nowrap; }
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.status.green { color: var(--green-dark); background: var(--green-soft); }
.status.amber { color: #966225; background: var(--amber-soft); }
.status.red { color: #a74641; background: var(--red-soft); }
.status.blue { color: #456d8c; background: var(--blue-soft); }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.field, .filters select, .filters input { min-height: 32px; border: 1px solid #dce4df; border-radius: 5px; background: #fff; color: var(--ink); padding: 0 9px; font-size: 10px; }
.filters input[type=search] { width: min(230px, 100%); }
.filters select { min-width: 105px; }
.filters-spacer { flex: 1; }
.field-label { display: block; color: #64736b; font-size: 10px; font-weight: 600; margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-field { min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 37px; border: 1px solid #dce4df; border-radius: 5px; padding: 8px 10px; background: #fff; color: var(--ink); font-size: 11px; }
.form-field textarea { min-height: 82px; resize: vertical; line-height: 1.6; }
.form-field .helper { display: block; margin-top: 5px; color: #8b9791; font-size: 9px; line-height: 1.5; }
.check-row { display: flex; align-items: flex-start; gap: 8px; color: #58675f; font-size: 10px; line-height: 1.55; }
.check-row input { margin-top: 2px; accent-color: var(--green); }
.form-note { grid-column: 1 / -1; border-left: 2px solid #9fc7b5; padding: 8px 10px; background: #f4faf7; color: #60756a; font-size: 10px; line-height: 1.6; }
.empty-state { padding: 34px 14px; text-align: center; color: #8b9791; font-size: 11px; }
.empty-state strong { display: block; color: #5e6c64; margin-bottom: 5px; font-size: 12px; }
.detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-bottom: 1px solid var(--line); background: #fbfcfb; }
.detail-stat { padding: 13px 15px; border-right: 1px solid var(--line); }
.detail-stat:last-child { border: 0; }
.detail-stat span { color: #839087; display: block; font-size: 9px; }
.detail-stat strong { display: block; margin-top: 5px; font-size: 13px; font-variant-numeric: tabular-nums; }
.tab-row { display: flex; gap: 18px; padding: 0 15px; border-bottom: 1px solid var(--line); background: white; }
.tab-button { position: relative; border: 0; background: transparent; color: #78857e; padding: 12px 0; cursor: pointer; font-size: 10px; }
.tab-button.active { color: var(--green-dark); font-weight: 700; }
.tab-button.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--green); }
.adjustment-line { padding: 12px; border-bottom: 1px solid #edf1ef; display: grid; grid-template-columns: 70px minmax(0,1fr) auto; gap: 10px; align-items: start; }
.adjustment-line:last-child { border-bottom: 0; }
.adjustment-line strong { display: block; font-size: 10px; }
.adjustment-line p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.adjustment-amount { text-align: right; font-weight: 700; font-size: 11px; white-space: nowrap; }
.adjustment-amount.plus { color: var(--green-dark); }
.adjustment-amount.minus { color: var(--red); }
.client-shell { min-height: 100vh; background: #f4f7f5; }
.client-topbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(20px, calc((100vw - 1120px)/2)); background: #fff; border-bottom: 1px solid var(--line); }
.client-brand { display: flex; align-items: center; gap: 11px; font-size: 12px; font-weight: 700; }
.client-brand { color: inherit; text-decoration: none; }
.client-brand .brand-mark { width: 30px; height: 30px; font-size: 14px; }
.client-brand-logo { display: block; width: 150px; height: auto; max-height: 49px; object-fit: contain; padding-right: 10px; border-right: 1px solid var(--line); }
.client-main { max-width: 1120px; margin: 0 auto; padding: 28px 22px 56px; }
.client-greeting { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.client-greeting h1 { margin: 0; font-size: 22px; }
.client-greeting p { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.client-banner { border: 1px solid #cde1d7; border-radius: 6px; background: #edf7f2; padding: 12px 14px; margin: 0 0 16px; color: #386955; font-size: 11px; line-height: 1.6; }
.client-tabs { display: flex; gap: 7px; border-bottom: 1px solid #dfe7e2; margin-bottom: 15px; }
.client-tab { border: 0; border-bottom: 2px solid transparent; background: transparent; color: #76837c; padding: 11px 13px; cursor: pointer; font-size: 11px; }
.client-tab.active { border-color: var(--green); color: var(--green-dark); font-weight: 700; }
.client-bill-list { display: grid; gap: 10px; }
.client-bill { background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.client-bill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 16px 12px; border-bottom: 1px solid #edf1ef; }
.client-bill-head h2 { margin: 0; font-size: 13px; }
.client-bill-head p { margin: 5px 0 0; color: #87948d; font-size: 10px; }
.client-bill-body { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 13px 16px; }
.client-amounts { display: flex; gap: 28px; flex-wrap: wrap; }
.client-amounts span { display: block; color: #89958f; font-size: 9px; }
.client-amounts strong { display: block; margin-top: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.client-bill-actions { display: flex; gap: 7px; justify-content: flex-end; }
.login-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 26px; }
.login-panel { width: min(430px,100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 26px; box-shadow: 0 10px 36px rgba(24,42,36,.06); }
.login-panel h1 { margin: 0; font-size: 20px; }
.login-panel > p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 8px 0 20px; }
.login-panel .form-field { margin: 13px 0; }
.demo-code { margin-top: 13px; padding: 10px; background: #f6f9f7; color: #718078; font-size: 10px; line-height: 1.6; border-radius: 5px; }
.customer-company { display: flex; align-items: center; gap: 8px; color: #506159; font-size: 10px; }
.customer-company .company-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.customer-header-actions { display: flex; align-items: center; gap: 12px; }
.customer-user { min-width: 0; text-align: right; }
.customer-user strong, .customer-user small { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-user strong { color: var(--ink); font-size: 11px; }
.customer-user small { margin-top: 3px; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.customer-login-panel { width: min(460px,100%); }
.customer-auth-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px 12px; }
.customer-auth-form .form-field.full, .customer-auth-form .customer-mock-code, .customer-auth-form .customer-submit, .customer-auth-form .customer-secondary { grid-column: 1 / -1; }
.customer-auth-form .form-field { min-width: 0; margin: 0; }
.customer-submit { width: 100%; margin-top: 3px; }
.customer-secondary { width: 100%; }
.customer-privacy-note { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: #7c8982; font-size: 10px; line-height: 1.65; }
.customer-note { border: 1px solid #d7e5de; border-radius: 5px; background: #f4f9f6; padding: 10px 12px; color: #526d60; font-size: 10px; line-height: 1.6; }
.customer-readonly-note { margin: 0 0 14px; }
.customer-mock-code { padding: 9px 10px; border: 1px dashed #d8c69d; border-radius: 5px; background: #fffaf0; color: #80602a; font-size: 10px; line-height: 1.6; }
.customer-mock-code strong { margin-left: 4px; font-family: 'DM Mono',monospace; font-size: 13px; letter-spacing: 1px; }
.customer-alert { margin: 0 0 13px; padding: 10px 12px; border: 1px solid #ebd7c9; border-radius: 5px; background: #fff8f3; color: #8c4f31; font-size: 10px; line-height: 1.6; }
.customer-state, .customer-empty { display: grid; justify-items: center; gap: 7px; padding: 48px 16px; color: var(--muted); text-align: center; }
.customer-state strong, .customer-empty strong { color: #506159; font-size: 12px; }
.customer-empty span { font-size: 10px; }
.loading-mark { width: 20px; height: 20px; border: 2px solid #d6e2dc; border-top-color: var(--green); border-radius: 50%; animation: customer-spin .75s linear infinite; }
@keyframes customer-spin { to { transform: rotate(360deg); } }
.customer-account-code { color: #64756c; font-size: 10px; font-variant-numeric: tabular-nums; }
.bill-status { flex: 0 0 auto; border: 1px solid #eadfbe; border-radius: 4px; background: #fff9e9; color: #816627; padding: 4px 7px; font-size: 9px; line-height: 1.2; }
.customer-detail-toolbar { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 15px; }
.customer-detail-greeting { align-items: center; }
.customer-summary { grid-template-columns: repeat(5,minmax(0,1fr)); margin: 0 0 14px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.customer-summary .detail-stat:last-child { background: #eff7f2; }
.customer-detail-table { min-width: 700px; }
.customer-detail-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.customer-response-panel { margin: 16px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.customer-response-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.customer-response-heading h2 { margin: 0; color: var(--ink); font-size: 14px; }
.customer-response-heading > span:not(.bill-status) { color: var(--green-dark); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.customer-response-panel > p { margin: 6px 0; color: #617068; font-size: 10px; line-height: 1.65; }
.customer-response-notice { margin: 0 0 12px; }
.customer-objection-status { border-color: #eadfbe; background: #fffdf7; }
.customer-workflow-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 13px; }
.customer-workflow-form > label, .customer-invoice-fields > label { display: grid; align-content: start; gap: 5px; min-width: 0; color: #52645b; font-size: 10px; font-weight: 600; }
.customer-workflow-form input:not([type="checkbox"]):not([type="file"]), .customer-workflow-form select, .customer-workflow-form textarea { width: 100%; min-width: 0; min-height: 36px; border: 1px solid #d8e1dc; border-radius: 4px; padding: 8px 9px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.customer-workflow-form textarea { resize: vertical; line-height: 1.55; }
.customer-workflow-form input[type="file"] { max-width: 100%; color: var(--muted); font: inherit; }
.customer-workflow-form .helper { color: #849189; font-size: 9px; line-height: 1.5; font-weight: 400; }
.customer-invoice-fields { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.customer-invoice-fields[hidden] { display: none; }
.customer-workflow-form .workflow-wide, .customer-workflow-form .customer-check-row, .customer-workflow-form .customer-form-actions { grid-column: 1 / -1; }
.customer-check-row { display: flex !important; align-items: flex-start; gap: 8px !important; color: #5d6c64 !important; font-weight: 400 !important; line-height: 1.55; }
.customer-check-row input { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.customer-check-row strong { color: var(--ink); white-space: nowrap; }
.customer-form-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.customer-form-actions .button { min-height: 36px; }
.customer-form-actions .button:disabled { cursor: wait; opacity: .55; }
.client-detail-section { background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; margin-bottom: 13px; }
.client-detail-section .section-head { min-height: 46px; }
.customer-fold-section > summary { display: flex; list-style: none; cursor: pointer; }
.customer-fold-section > summary::-webkit-details-marker { display: none; }
.customer-fold-section > summary h2 { flex: 0 0 auto; }
.customer-fold-section > summary .customer-fold-meta { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.customer-fold-meta span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; }
.customer-fold-chevron { flex: 0 0 auto; margin-left: 10px; color: #87948d; transition: transform .16s ease; }
.customer-fold-section[open] > summary { border-bottom: 1px solid var(--line); }
.customer-fold-section[open] .customer-fold-chevron { transform: rotate(180deg); }
.customer-adjustment-empty { padding: 13px 15px; color: #7d8983; font-size: 10px; }
.customer-response-actions .customer-form-actions { padding-top: 2px; }
.customer-response-actions .customer-form-actions .button { min-width: 112px; min-height: 38px; }
.client-hint { padding: 11px 13px; background: #f6faf8; border: 1px solid #dcebe3; border-radius: 5px; font-size: 10px; color: #587365; line-height: 1.6; }
.modal-layer[hidden] { display: none; }
.modal-layer { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,31,27,.38); backdrop-filter: blur(2px); }
.modal { position: relative; width: min(650px,100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; background: #fff; border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.modal.wide { width: min(900px,100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 20px 13px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 4px; color: #91a098; font-size: 9px; text-transform: uppercase; letter-spacing: .6px; }
.modal-header h2 { margin: 0; font-size: 16px; }
.close-button { flex: 0 0 28px; width: 28px; height: 28px; border: 0; border-radius: 5px; background: transparent; color: #75827b; cursor: pointer; font-size: 20px; line-height: 1; }
.close-button:hover { background: #f1f5f2; }
.modal-body { overflow-y: auto; padding: 17px 20px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: #fcfdfc; }
.modal-footer:empty { display: none; }
.section-divider { height: 1px; background: var(--line); margin: 18px 0; }
.toast-region { position: fixed; z-index: 40; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(340px,calc(100vw - 40px)); }
.toast { border: 1px solid #cfe0d7; background: #fff; color: #365c4c; box-shadow: 0 8px 24px rgba(24,42,36,.12); border-radius: 6px; padding: 11px 13px; font-size: 11px; line-height: 1.5; animation: toast-in .18s ease-out; }
.toast.warning { border-color: #ead4b3; color: #795629; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.text-red { color: var(--red); }
.text-green { color: var(--green-dark); }
.helper-block { color: #8b9791; font-size: 10px; line-height: 1.65; }
.recon-flow { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; overflow: hidden; margin: 18px 0; }
.flow-step { padding: 15px; border-right: 1px solid var(--line); }
.flow-step:last-child { border-right: 0; }
.flow-step span { color: #9aa59f; font-family: 'DM Mono',monospace; font-size: 9px; }
.flow-step strong { display: block; margin-top: 7px; font-size: 11px; }
.flow-step small { display: block; margin-top: 5px; color: #88958e; font-size: 9px; line-height: 1.5; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid #dfe6e2; border-radius: 4px; background: #f9fbfa; color: #67766e; padding: 4px 7px; font-size: 9px; }
.permission-warning { margin-bottom: 14px; }
.permission-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.permission-toolbar > label { color: #64736b; font-size: 10px; font-weight: 600; }
.permission-toolbar select { width: min(270px, 100%); }
.permission-toolbar .helper { flex: 1 1 100%; }
.permission-table { min-width: 760px; }
.permission-role { min-width: 112px; }
.permission-scope-list, .permission-reviewer-options { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.permission-reviewer-options { padding: 3px 0; }
.permission-scope-list .check-row { align-items: center; }
.permission-scope-list .check-row input, .permission-reviewer-options .check-row input { flex: 0 0 auto; }
.adjustment-draft-list { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.adjustment-draft-list .adjustment-line { grid-template-columns: 58px minmax(0,1fr) auto; }
.adjustment-draft-list .adjustment-amount .inline-link { display: block; margin: 5px 0 0 auto; font-size: 9px; }
.warehouse-sync-panel { margin: -7px 0 18px; padding: 14px 16px; border: 1px solid #cfe0d8; border-radius: 5px; background: #f6faf8; }
.warehouse-status-copy strong, .warehouse-status-copy span { display: block; }
.warehouse-status-copy strong { color: var(--green-dark); font-size: 12px; }
.warehouse-status-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.warehouse-transport-warning { color: #9b5b18; font-weight: 700; }
.warehouse-source-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.warehouse-source-list > div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); background: #fff; font-size: 10px; }
.warehouse-source-list > div span:first-child { color: #4f665b; font-weight: 600; }
.warehouse-source-list > div span:last-child { color: #79877f; text-align: right; font-variant-numeric: tabular-nums; }
.warehouse-quality-panel { margin-bottom: 18px; }
.quality-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.normalization-summary { grid-template-columns: repeat(5, minmax(0,1fr)); margin-bottom: 12px; }
.quality-summary-item { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); background: #fff; }
.quality-summary-item > span, .quality-summary-item > strong, .quality-summary-item > small { display: block; }
.quality-summary-item > span { color: var(--muted); font-size: 10px; }
.quality-summary-item > strong { margin-top: 7px; color: var(--ink); font-size: 17px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.quality-summary-item > small { margin-top: 5px; color: #89958f; font-size: 9px; line-height: 1.5; }
.quality-issues { margin-top: 15px; padding: 12px 14px; border: 1px solid #eadbbf; background: #fffcf5; }
.quality-issues h3 { margin: 0 0 7px; color: #795e34; font-size: 11px; }
.quality-issues ul { display: grid; gap: 6px; margin: 0; padding-left: 16px; color: #756c5c; font-size: 10px; line-height: 1.55; }
.quality-source-table { margin-top: 16px; }
.quality-source-table h3 { margin: 0 0 7px; color: #52645b; font-size: 11px; }
.quality-mapping { margin-top: 12px; border-top: 1px solid var(--line); }
.quality-mapping summary { padding: 11px 0; color: var(--green-dark); cursor: pointer; font-size: 10px; font-weight: 600; }
.quality-mapping[open] summary { border-bottom: 1px solid var(--line); }
.quality-mapping table { min-width: 620px; }
.quality-mapping + .helper-block { margin-bottom: 0; }
.normalization-notice { padding: 10px 12px; border: 1px solid #e8dcc4; background: #fffaf0; color: #756547; font-size: 10px; line-height: 1.6; }
.normalization-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 9px; }
.normalization-toolbar label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.normalization-toolbar select { min-height: 31px; border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; background: #fff; color: var(--ink); font-size: 10px; }
.normalization-count { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.normalization-table table { min-width: 960px; }
.normalization-table td { vertical-align: top; }
.objection-server-section { margin-top: 16px; }
.objection-head-actions { display: flex; align-items: center; gap: 10px; }
.objection-filters { min-height: 48px; }
.objection-filters label { color: var(--muted); font-size: 10px; }
.objection-filters select { min-width: 130px; }
.objection-table { min-width: 900px; }
.objection-table td { vertical-align: top; }
.objection-feedback, .objection-note { display: block; max-width: 440px; margin-top: 5px; color: #53635b; font-size: 10px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.objection-note { color: var(--muted); }
.objection-attachment { display: inline-block; max-width: 210px; margin: 2px 7px 2px 0; color: var(--green-dark); font-size: 10px; overflow-wrap: anywhere; }
.objection-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.objection-pagination > div { display: flex; gap: 6px; }
.objection-modal-files { margin: 12px 0; color: var(--muted); font-size: 10px; }
.objection-history { margin: 14px 0; border-top: 1px solid var(--line); }
.objection-history h3 { margin: 11px 0 8px; color: var(--ink); font-size: 11px; }
.objection-history ol { display: grid; gap: 8px; max-height: 170px; overflow-y: auto; margin: 0; padding: 0 0 0 18px; }
.objection-history li { padding-left: 3px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.objection-history li > div { display: flex; justify-content: space-between; gap: 12px; }
.objection-history li strong { color: var(--ink); }
.objection-history time { white-space: nowrap; }
.objection-history small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.normalization-reasons { display: flex; flex-wrap: wrap; gap: 4px; max-width: 340px; margin-top: 5px; }
.normalization-reason { display: inline-block; padding: 3px 5px; border: 1px solid #efdcb9; background: #fff9ec; color: #8a672e; font-size: 9px; line-height: 1.4; }
.candidate-filters { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)) auto; gap: 9px; align-items: end; margin-bottom: 12px; }
.candidate-filters label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.candidate-filters input, .candidate-filters select { width: 100%; min-width: 0; min-height: 34px; border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; background: #fff; color: var(--ink); font: inherit; }
.candidate-summary { display: flex; flex-wrap: wrap; gap: 16px; padding: 9px 11px; border: 1px solid var(--line); background: #f7faf8; color: var(--muted); font-size: 10px; }
.candidate-summary strong { margin-left: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.candidate-summary-note, .candidate-boundary { margin: 10px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.candidate-table { margin-top: 10px; }
.candidate-table table { min-width: 920px; }
.candidate-table tfoot { border-top: 2px solid #aabdb3; background: #f4f8f6; font-weight: 600; }
.candidate-table tfoot th, .candidate-table tfoot td { padding-top: 10px; padding-bottom: 10px; }
.candidate-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; color: var(--muted); font-size: 10px; }
.candidate-actions label { display: flex; align-items: center; gap: 7px; }
.candidate-action-buttons { display: flex; gap: 7px; }
.candidate-select { width: 16px; height: 16px; accent-color: var(--green, #287a61); }
.ledger-download-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-bottom: 0; background: #f7faf8; color: var(--muted); font-size: 10px; }
.ledger-download-toolbar label { display: flex; align-items: center; gap: 7px; }
.ledger-subsection { margin-top: 18px; }
.ledger-subsection h3 { margin: 0; color: var(--ink); font-size: 12px; font-weight: 650; }
.ledger-review-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.ledger-review-actions .button { white-space: nowrap; }
.review-history { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.6; }
.review-history ol { margin: 7px 0 0; padding-left: 18px; }
.review-history li + li { margin-top: 7px; }
.readiness-table { margin-top: 13px; }
.readiness-table td:first-child { width: 54px; color: #9a4339; font-weight: 650; }
.readiness-table tr:first-child td:first-child { color: var(--green-dark); }
.source-payload { max-width: 460px; max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px; background: #f5f8f6; border: 1px solid var(--line); font: 10px/1.5 ui-monospace, monospace; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.modal-footer .button:disabled { opacity: .48; cursor: not-allowed; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 210px minmax(0,1fr); }
  .page-content { padding: 24px 22px 42px; }
  .topbar { padding: 0 22px; }
  .overview-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 15; inset: 0 auto 0 0; width: 250px; min-height: 100vh; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .brand { padding-bottom: 14px; }
  .brand-logo { width: min(100%, 150px); }
  .brand-copy strong { font-size: 12px; }
  .mobile-menu { display: inline-grid; place-items: center; width: 32px; height: 32px; }
  .topbar { height: 56px; padding: 0 12px; gap: 8px; }
  .crumb { margin-right: auto; gap: 6px; font-size: 10px; }
  .crumb strong { font-size: 10px; }
  .topbar-actions { gap: 5px; }
  .env-pill { padding: 4px 6px; font-size: 9px; }
  .user-label { display: none; }
  .page-content { padding: 21px 13px 36px; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 16px; }
  .page-heading h1 { font-size: 20px; }
  .heading-actions { justify-content: flex-start; }
  .stat-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .receivable-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-item { min-height: 88px; padding: 13px; }
  .stat-item:nth-child(2) { border-right: 0; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat-value { font-size: 22px; }
  .detail-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .normalization-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-stat:nth-child(2) { border-right: 0; }
  .detail-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full, .form-note { grid-column: auto; }
  .recon-flow { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .flow-step:nth-child(2) { border-right: 0; }
  .flow-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .client-main { padding: 21px 13px 42px; }
  .client-topbar { min-height: 58px; padding: 10px 14px; }
  .client-brand { gap: 8px; font-size: 11px; }
  .client-brand-logo { width: 112px; max-height: 37px; padding-right: 7px; }
  .client-greeting { align-items: flex-start; flex-direction: column; }
  .client-bill-body { grid-template-columns: 1fr; gap: 12px; }
  .client-bill-actions { justify-content: flex-start; }
  .client-amounts { gap: 16px; }
  .customer-header-actions { gap: 8px; }
  .customer-user strong { max-width: 130px; }
  .customer-login-panel { padding: 20px; }
  .customer-auth-form { grid-template-columns: minmax(0,1fr); }
  .customer-auth-form .form-field.full, .customer-auth-form .customer-mock-code, .customer-auth-form .customer-submit, .customer-auth-form .customer-secondary { grid-column: auto; }
  .customer-detail-greeting { align-items: flex-start; flex-direction: column; }
  .customer-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .customer-summary .detail-stat:nth-child(2n) { border-right: 0; }
  .customer-summary .detail-stat:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .customer-detail-toolbar { align-items: center; }
  .customer-response-panel { padding: 13px; }
  .customer-response-actions { position: sticky; bottom: 8px; z-index: 5; box-shadow: 0 -7px 20px rgba(24,42,36,.10); }
  .customer-response-actions .customer-form-actions { display: grid; grid-template-columns: 1.15fr 1fr; }
  .customer-response-actions .customer-form-actions .button { min-width: 0; min-height: 44px; padding: 0 9px; }
  .customer-fold-section > summary { min-height: 48px; padding: 0 12px; }
  .customer-fold-section > summary .customer-fold-meta { gap: 7px; font-size: 9px; }
  .customer-fold-section > summary .customer-fold-meta span:first-child { display: none; }
  .customer-fold-chevron { margin-left: 5px; }
  .customer-workflow-form, .customer-invoice-fields { grid-template-columns: minmax(0,1fr); }
  .customer-workflow-form > label, .customer-invoice-fields > label { grid-column: 1 / -1; }
  .customer-form-actions .button { flex: 1 1 145px; }
  .filters { gap: 6px; padding: 11px; }
  .filters select { flex: 1 1 125px; }
  .filters input[type=search] { flex: 1 1 100%; width: 100%; }
  .objection-head-actions { gap: 6px; }
  .objection-head-actions .head-note { text-align: right; }
  .objection-pagination { align-items: flex-start; flex-direction: column; }
  .modal-layer { padding: 10px; }
  .modal { max-height: 94vh; }
  .modal-header, .modal-body { padding-left: 15px; padding-right: 15px; }
  .modal-footer { padding: 10px 15px; }
  .permission-toolbar { align-items: stretch; }
  .permission-toolbar select { width: 100%; }
  .warehouse-source-list { grid-template-columns: 1fr; }
  .warehouse-source-list > div { align-items: flex-start; flex-direction: column; }
  .warehouse-source-list > div span:last-child { text-align: left; }
  .quality-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .candidate-filters { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .candidate-filters button { grid-column: 1 / -1; }
  .quality-summary-item { padding: 10px; }
  .quality-summary-item > strong { font-size: 15px; }
  .adjustment-draft-list .adjustment-line { grid-template-columns: 48px minmax(0,1fr); }
  .adjustment-draft-list .adjustment-amount { grid-column: 2; display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .adjustment-draft-list .adjustment-amount .inline-link { margin: 0; }
}

.bank-history-filters { align-items: end; }
.bank-history-filters .field { min-width: 145px; flex: 1 1 150px; }
.bank-history-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px 2px; color: var(--muted); font-size: 11px; }
.bank-history-table { margin-top: 12px; }
.bank-history-table table { min-width: 1080px; }
.bank-history-table td:nth-child(4), .bank-history-table td:nth-child(5), .bank-history-table td:nth-child(6) { white-space: nowrap; }
.bank-match-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.bank-match-summary { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 13px 0 2px; color: var(--muted); font-size: 11px; }
.bank-match-summary strong { margin-left: 4px; color: var(--ink); font-size: 15px; }
.warning-text { color: var(--amber) !important; }
.bank-match-table { margin-top: 10px; }
.bank-match-table table { min-width: 860px; }
.bank-match-candidate { display: flex; justify-content: space-between; gap: 18px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.payment-allocation-line { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 5px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.payment-allocation-line:last-child { border-bottom: 0; }
.payment-allocation-line > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.payment-allocation-line > strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.payment-allocation-line .secondary-cell { margin-top: 3px; }
.payment-bank-source { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 16px; margin: 12px 0; padding: 12px; background: var(--canvas); border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; }
.payment-bank-source strong { grid-column: 1 / -1; color: var(--ink); }
.payment-allocation-input { min-width: 115px; max-width: 150px; text-align: right; font-variant-numeric: tabular-nums; }
.payment-mismatch-check { margin: 12px 0; }
#payment-ledger-panel .table-wrap table { min-width: 950px; }
@media (max-width: 720px) {
  .bank-history-meta { align-items: flex-start; flex-direction: column; }
  .bank-history-filters .field { min-width: 100%; flex-basis: 100%; }
  .bank-match-toolbar { align-items: flex-start; flex-direction: column; }
  .bank-match-toolbar .button { width: 100%; }
  .bank-match-candidate { align-items: flex-start; flex-direction: column; gap: 1px; }
  .payment-allocation-line { grid-template-columns: minmax(0,1fr) auto; gap: 5px 9px; }
  .payment-allocation-line > .inline-link, .payment-allocation-line > .mini-tag { grid-column: 2; justify-self: end; }
  .payment-bank-source { grid-template-columns: minmax(0,1fr); }
  .payment-bank-source strong { grid-column: auto; }
  .payment-allocation-input { min-width: 105px; width: 105px; }
}

body.internal-auth-gate .app-shell { grid-template-columns: minmax(0, 1fr); }
body.internal-auth-gate .sidebar,
body.internal-auth-gate .topbar { display: none; }
body.internal-auth-gate .page-content { display: flex; flex-direction: column; justify-content: center; width: min(760px, 100%); min-height: 100vh; padding: 40px 24px; }
.internal-login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.internal-login-brand img { display: block; width: min(176px, 42vw); height: auto; object-fit: contain; }
.internal-login-brand strong,
.internal-login-brand small { display: block; }
.internal-login-brand strong { font-size: 14px; }
.internal-login-brand small { margin-top: 4px; color: var(--muted); font-size: 11px; }

/* ===== UI 批量改进（2026-11-12）：区块折叠 ===== */
.section-toggle { flex: 0 0 22px; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 5px; background: #f8faf9; color: #77847d; font-size: 10px; line-height: 1; cursor: pointer; padding: 0; }
.section-toggle:hover { background: #edf3ef; color: var(--ink); border-color: #c6d4cc; }
.section-block.collapsed > *:not(.section-head),
.ledger-subsection.collapsed > *:not(.section-head),
.warehouse-sync-panel.collapsed > *:not(.section-head) { display: none !important; }
.section-block.collapsed > .section-head,
.ledger-subsection.collapsed > .section-head,
.warehouse-sync-panel.collapsed > .section-head { border-bottom: 0; }

/* ===== UI 批量改进（2026-11-12）：列表分页（模块顶部页码） ===== */
.list-pagination { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; background: #fff; }
.list-pagination .pagination-size-label { display: inline-flex; align-items: center; gap: 4px; }
.list-pagination select.pagination-size { border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font-size: 10px; padding: 3px 4px; }
.list-pagination .filters-spacer { flex: 1; }

/* ===== UI 批量改进（2026-11-12）：总览统计卡可点击 ===== */
button.stat-item { display: block; width: 100%; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; font: inherit; cursor: pointer; padding: 17px 19px 15px; min-height: 103px; }
button.stat-item:last-child { border-right: 0; }
button.stat-item:hover { background: #f7faf8; }

/* ===== UI 批量改进（2026-11-12）：CRM 商务未匹配分组列表 ===== */
.owner-mapping-groups { margin-top: 8px; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 6px 10px; }
.owner-mapping-group { border-bottom: 1px solid #eef2f0; padding: 6px 0; }
.owner-mapping-group:last-child { border-bottom: 0; }
.owner-mapping-group summary { cursor: pointer; font-size: 11px; font-weight: 700; color: var(--ink); }
.owner-mapping-group .owner-mapping-customers { margin: 6px 0 2px; color: var(--muted); font-size: 10px; line-height: 1.7; word-break: break-all; }
