:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 16px;
  --navy: #10233d;
  --navy-2: #172f4e;
  --blue: #2c78e4;
  --blue-dark: #1766d5;
  --blue-light: #eaf3ff;
  --ink: #172b45;
  --muted: #6d7c90;
  --line: #e5ebf2;
  --page: #f4f7fb;
  --white: #ffffff;
  --amber: #e9922b;
  --amber-light: #fff4e4;
  --red: #d95250;
  --red-light: #fff0ef;
  --green: #189b72;
  --green-light: #e9f8f2;
  --shadow: 0 14px 45px rgba(25, 51, 82, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--page); color: var(--ink); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

/* Compact column sorting and on-demand filters. The menu is fixed because the
   horizontally scrolling table would otherwise clip it. */
.store-data-table th { position: relative; }
.store-data-table .column-head { display: flex; align-items: center; gap: 4px; min-height: 29px; }
.store-data-table .column-sort { min-width: 0; flex: 1; display: inline-flex; align-items: center; gap: 5px; padding: 5px 1px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 750; text-align: left; cursor: pointer; white-space: nowrap; }
.store-data-table .column-sort:hover, .store-data-table .column-sort[aria-sort]:not([aria-sort="none"]) { color: #246bc1; }
.store-data-table .column-sort .sort-indicator { color: #2c78d5; font-size: 11px; }
.store-data-table .column-menu-button { flex: none; width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: #e9f2fa; color: #557d9e; cursor: pointer; font-size: 12px; line-height: 1; }
.store-data-table .column-menu-button:hover, .store-data-table .column-menu-button[aria-expanded="true"] { color: #176ac4; background: #dcecff; }
.store-data-table .column-menu-button svg { width: 13px; height: 13px; }
.column-popover { position: fixed; z-index: 55; width: min(280px, calc(100vw - 24px)); max-height: min(440px, calc(100dvh - 24px)); overflow: auto; padding: 13px; border: 1px solid #dce6f0; border-radius: 11px; background: #fff; color: #243e59; box-shadow: 0 15px 42px #12304c30; white-space: normal; font-size: 13px; }
.column-popover h3, .column-popover strong { display: block; margin: 0 0 9px; font-size: 13px; color: #1c3b5d; }
.column-popover p { margin: 6px 0 10px; color: #7c8fa2; font-size: 12px; line-height: 1.45; }
.column-popover .control, .column-popover input[type="text"], .column-popover input[type="date"], .column-popover select { width: 100%; min-width: 0; }
.column-popover .filter-option { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: #405c77; text-align: left; font-size: 13px; cursor: pointer; }
.column-popover .filter-option:hover, .column-popover .filter-option.active, .column-popover .filter-option[aria-selected="true"] { color: #1f68bd; background: #edf6ff; }
.column-popover .filter-option input[type="checkbox"] { margin: 0; accent-color: var(--blue); }
.column-popover .filter-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 11px; margin-top: 10px; border-top: 1px solid #edf1f6; }
.column-popover .filter-actions .button { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.column-filter-wrap { display: none; }

/* Each company can be expanded independently while another company is active. */
.company-workspace:not(.expanded) .company-nav { display: none; }
.company-workspace.expanded .company-nav { display: grid; }
.company-toggle { width: 22px; height: 27px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #a5c1da; cursor: pointer; }
.company-toggle:hover { color: #fff; background: #ffffff1d; }
.company-toggle svg { width: 14px; height: 14px; transition: transform .18s ease; }
.company-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.company-workspace.expanded:not(.active) { background: #ffffff09; }
.company-workspace.expanded .company-row:not(.active) .company-name { color: #e4f1ff; }

/* Customer creation and inline editing both use the same centered dialog. */
.modal-backdrop:has(.customer-modal) { align-items: center; justify-content: center; padding: 20px; }
.modal-box.customer-modal { width: min(100%, 940px); max-height: calc(100dvh - 40px); height: auto; margin: 0; border-radius: 16px; animation: modal-in .18s ease-out; }
.customer-modal .modal-header { flex: none; }
.customer-modal .modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.customer-modal .modal-footer { flex: none; }
.customer-modal .detail-form { display: block; }
.customer-modal .detail-form .form-section { margin-bottom: 22px; }
.customer-modal .detail-form .form-section h3 { color: #173655; }
.customer-modal .detail-form .form-grid { gap: 13px 16px; }
.customer-modal .detail-form .control:focus { border-color: #7fb4f3; }
.customer-modal .detail-form .photo-field { padding: 3px 0; }
.detail-log { margin-top: 22px; padding-top: 16px; border-top: 1px solid #e7edf4; }
.detail-log h3 { margin: 0 0 10px; color: #1c3856; font-size: 15px; }
.detail-log .table-scroll { border: 1px solid #edf1f5; border-radius: 9px; }
.detail-log table { width: 100%; border-collapse: collapse; }
.detail-log th { padding: 9px 10px; background: #f7fafd; color: #72869a; text-align: left; font-size: 12px; font-weight: 700; white-space: nowrap; }
.detail-log td { padding: 10px; border-top: 1px solid #edf1f5; color: #40566d; font-size: 12px; white-space: nowrap; }
.detail-log .detail-payment { padding: 9px 0; }
.detail-log .empty-state { padding: 20px; }
.log-pager { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: #798b9e; font-size: 12px; }
.log-pager button { min-width: 30px; min-height: 30px; padding: 4px 9px; border: 1px solid #dce6f0; border-radius: 7px; background: #fff; color: #3d6288; font-size: 12px; cursor: pointer; }
.log-pager button:hover:not(:disabled), .log-pager button.active, .log-pager button[aria-current="page"] { border-color: #a8c9ed; color: #1d68bd; background: #eaf4ff; }
.log-pager button:disabled { opacity: .43; cursor: not-allowed; }

@media (max-width: 1040px) and (min-width: 701px) {
  .company-toggle { width: 19px; }
  .company-workspace.expanded .company-nav { display: grid; }
}
@media (max-width: 700px) {
  .modal-backdrop:has(.customer-modal) { padding: 12px; }
  .modal-box.customer-modal { width: 100%; max-height: calc(100dvh - 24px); border-radius: 15px; }
  .column-popover { z-index: 60; }
}
@media (max-width: 420px) {
  .customer-modal .detail-form .form-grid { grid-template-columns: 1fr; }
  .log-pager { justify-content: center; }
}
.home-fields { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.home-field { display: inline-block; color: #40566e; font-size: 12px; line-height: 1.5; }
.home-field b { color: #7b8da3; font-weight: 500; }
.home-preview-list { padding: 4px 18px 14px; }
.home-preview-row { width: 100%; border: 0; border-bottom: 1px solid #edf1f6; background: transparent; padding: 11px 2px; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.home-preview-row:last-child { border-bottom: 0; }
.home-preview-row:hover { background: #f7faff; }
.home-preview-row > span:not(.store-avatar) { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 13px; }
.home-preview-row > svg { width: 15px; height: 15px; color: #8da0b7; }
.detail-photo-cell .store-avatar.hero { margin-top: 7px; }
.widget-item-actions .void-link { color: #c65a53; }
:focus-visible { outline: 3px solid #89bbff; outline-offset: 2px; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 238px; background: var(--navy); color: #eff7ff; flex: 0 0 238px; padding: 28px 14px 18px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 15; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 10px 25px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, #48b8ff, #2874eb); box-shadow: 0 6px 18px #113f7880; }
.brand-mark svg { width: 23px; height: 23px; stroke-width: 2.1; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 19px; line-height: 1.2; letter-spacing: .03em; }
.brand span { font-size: 12px; color: #9fb3cb; margin-top: 4px; white-space: nowrap; }
.company-section { padding: 0 1px 17px; margin-bottom: 21px; border-bottom: 1px solid #ffffff1c; }
.company-section-head { padding: 0 10px 9px 14px; display: flex; align-items: center; justify-content: space-between; color: #8fa8c2; font-size: 12px; letter-spacing: .06em; }
.company-section-head button { width: 25px; height: 25px; border: 1px solid #ffffff2d; background: #ffffff10; color: #bcd0e5; border-radius: 7px; display: grid; place-items: center; }
.company-section-head button:hover { color: white; background: #ffffff22; }
.company-section-head button svg { width: 15px; height: 15px; }
.company-list { display: grid; gap: 3px; max-height: min(30vh, 235px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #526f8e transparent; }
.company-row { display: flex; align-items: center; border-radius: 9px; min-width: 0; }
.company-row.active { background: #ffffff1d; }
.company-select { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; padding: 9px 7px 9px 10px; background: transparent; border: 0; color: #b9cce0; text-align: left; font-size: 13px; }
.company-row.active .company-select { color: #fff; font-weight: 750; }
.company-select:hover { color: #fff; }
.company-initial { width: 27px; height: 27px; border-radius: 8px; flex: none; background: #ffffff18; display: grid; place-items: center; color: #bfd9f5; font-size: 12px; font-weight: 800; }
.company-row.active .company-initial { background: #377fd3; color: white; }
.company-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-due-count { flex: none; border-radius: 12px; background: #df5b59; color: #fff; min-width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 11px; padding: 0 4px; }
.company-manage { width: 27px; height: 29px; flex: none; border: 0; background: transparent; color: #8ea7c0; display: grid; place-items: center; border-radius: 6px; }
.company-manage:hover { background: #ffffff1c; color: white; }
.company-manage svg { width: 15px; height: 15px; }
.sidebar-caption { color: #7791ac; font-size: 12px; padding: 0 15px; margin-bottom: 12px; letter-spacing: .08em; }
.management-caption { margin-top: 27px; }
.side-nav { display: grid; gap: 4px; }
.nav-item { width: 100%; border: 0; border-radius: 10px; padding: 12px 14px; color: #bdd0e4; background: transparent; display: flex; align-items: center; gap: 13px; text-align: left; font-size: 14px; font-weight: 600; transition: background .18s, color .18s; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { background: #ffffff14; color: white; }
.nav-item.active { color: white; background: #2976cf; box-shadow: inset 3px 0 0 #80c8ff; }
.nav-count { margin-left: auto; background: #e05b59; color: white; min-width: 20px; height: 20px; border-radius: 20px; text-align: center; line-height: 20px; font-size: 11px; }
.sidebar-bottom { margin-top: auto; padding: 14px 14px 2px; border-top: 1px solid #ffffff1c; color: #9bb1c8; font-size: 12px; display: flex; align-items: center; gap: 7px; }
.local-dot { width: 7px; height: 7px; background: #7bdbb4; border-radius: 50%; }
.sidebar-version { margin-left: auto; }
.workspace { min-width: 0; flex: 1; }
.topbar { height: 76px; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 10; }
.topbar-date { color: var(--muted); font-size: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-actions .button { white-space: nowrap; }
.icon-button { border: 1px solid var(--line); background: white; color: #53677d; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; position: relative; }
.icon-button:hover { background: #f6f9fc; color: var(--blue); }
.top-notify-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; background: var(--red); border: 2px solid white; border-radius: 50%; }
.mobile-brand, .mobile-nav { display: none; }
.button { border: 1px solid transparent; border-radius: 10px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 10px 16px; min-height: 40px; font-size: 14px; font-weight: 700; transition: transform .15s, background .15s, border .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button svg { width: 17px; height: 17px; }
.button-primary { background: var(--blue); color: white; box-shadow: 0 5px 13px #2c78e426; }
.button-primary:hover { background: var(--blue-dark); }
.button-outline { background: white; color: #46617d; border-color: #dbe5ef; }
.button-outline:hover { border-color: #aac8ea; background: #f8fbff; }
.button-soft { background: var(--blue-light); color: var(--blue-dark); }
.button-soft:hover { background: #dcecff; }
.button-danger { color: #c83e3b; background: white; border-color: #f0cfce; }
.button-danger:hover { background: #fff4f3; }
.button-text { color: var(--blue-dark); background: transparent; padding: 5px 2px; min-height: unset; }
.button-small { padding: 7px 11px; min-height: 34px; font-size: 13px; border-radius: 8px; }
#mainContent { padding: 30px 34px 75px; max-width: 1600px; margin: 0 auto; outline: none; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.page-title h1 { margin: 0; font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -.03em; }
.page-company { display: inline-block; color: #3575bd; background: #e9f3ff; border: 1px solid #d3e8ff; border-radius: 6px; font-size: 12px; font-weight: 750; padding: 3px 8px; margin-bottom: 9px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-title p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.header-tools { display: flex; align-items: center; gap: 10px; }
.demo-banner { background: #eaf3ff; color: #305e93; border: 1px solid #cfe5ff; border-radius: 12px; padding: 11px 14px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.demo-banner strong { color: #245587; }
.demo-banner button { border: 0; color: #1766d5; background: transparent; font-weight: 700; white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { text-align: left; min-width: 0; min-height: 146px; border: 1px solid var(--line); border-radius: 16px; background: white; padding: 19px 19px 16px; box-shadow: 0 6px 25px rgba(25,51,82,.035); color: var(--ink); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 75px; height: 75px; border-radius: 50%; right: -25px; top: -28px; background: var(--stat-tint, #eaf3ff); opacity: .8; }
.stat-card:hover { border-color: #b4d3f5; transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card .stat-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 14px; background: var(--stat-tint, #eaf3ff); color: var(--stat-color, #2874db); }
.stat-card .stat-icon svg { width: 18px; height: 18px; }
.stat-label { color: #687c93; font-size: 13px; font-weight: 650; }
.stat-value { display: block; font-size: 25px; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; margin: 7px 0 4px; white-space: nowrap; }
.stat-note { color: #8797a8; font-size: 12px; }
.stat-card.urgent { --stat-tint: #fff0ee; --stat-color: #d9514e; }
.stat-card.soon { --stat-tint: #fff3e1; --stat-color: #dd8a1e; }
.stat-card.success { --stat-tint: #e9f8f2; --stat-color: #178f68; }
.stat-card.rebate { --stat-tint: #f0ecff; --stat-color: #7650bc; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.dashboard-stack { display: grid; gap: 18px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 5px 25px rgba(24,49,78,.035); min-width: 0; }
.panel-head { padding: 20px 22px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.section-link { color: var(--blue-dark); background: transparent; border: 0; font-size: 13px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.section-link svg { width: 14px; height: 14px; }
.urgent-list { padding: 0 10px 10px; }
.urgent-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; border-top: 1px solid #eef1f5; padding: 14px 12px; }
.urgent-row:first-child { border-top: 0; }
.store-avatar { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; flex: none; background: #e6effa; color: #2b6bb7; display: grid; place-items: center; font-size: 16px; font-weight: 800; overflow: hidden; }
.store-avatar img { width: 100%; height: 100%; object-fit: cover; }
.store-avatar.large { width: 64px; height: 64px; border-radius: 14px; font-size: 22px; }
.store-avatar.hero { width: 76px; height: 76px; border-radius: 16px; font-size: 26px; }
.store-main { min-width: 0; }
.store-main strong { display: block; font-size: 14px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-main span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urgent-meta { text-align: right; }
.urgent-meta strong { display: block; font-size: 14px; }
.urgent-meta span { font-size: 12px; color: var(--red); }
.urgent-meta span.today { color: var(--amber); }
.urgent-meta span.soon { color: var(--blue); }
.chart-wrap { padding: 2px 22px 22px; }
.chart-bars { min-height: 165px; display: flex; align-items: end; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e8edf4; padding: 8px 4px 0; }
.chart-item { height: 145px; flex: 1; max-width: 75px; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 6px; }
.chart-amount { color: #6a7a8d; font-size: 11px; white-space: nowrap; }
.chart-bar { width: min(100%, 32px); min-height: 3px; background: #cfe3fb; border-radius: 6px 6px 0 0; transition: height .25s; }
.chart-item.current .chart-bar { background: linear-gradient(180deg, #55aff7, #2c78e4); }
.chart-item.current .chart-amount { color: #1d70d6; font-weight: 700; }
.chart-labels { display: flex; justify-content: space-between; gap: 12px; padding: 9px 4px 0; }
.chart-labels span { text-align: center; flex: 1; max-width: 75px; color: #8998aa; font-size: 12px; }
.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mini-metric { padding: 16px 20px 18px; }
.mini-metric .small-title { color: #6b7d93; font-size: 13px; }
.mini-metric strong { display: block; font-size: 22px; margin-top: 5px; }
.mini-metric p { color: #8795a6; font-size: 12px; margin: 1px 0 0; }
.mix-list { padding: 0 22px 20px; display: grid; gap: 14px; }
.mix-row { display: grid; grid-template-columns: 50px 1fr 23px; align-items: center; gap: 9px; font-size: 12px; color: #64758a; }
.mix-row b { text-align: right; color: #394f68; font-size: 12px; }
.mix-track { height: 7px; border-radius: 10px; background: #e8eef5; overflow: hidden; }
.mix-fill { height: 100%; border-radius: inherit; background: #5a9fe9; }
.mix-row:nth-child(2) .mix-fill { background: #60bdb0; }
.mix-row:nth-child(3) .mix-fill { background: #edb363; }
.mix-row:nth-child(4) .mix-fill { background: #9b9fe0; }
.recent-list { padding: 0 22px 13px; }
.recent-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #eef1f5; }
.recent-row:first-child { border-top: 0; }
.recent-row .store-avatar { width: 34px; height: 34px; border-radius: 9px; font-size: 13px; }
.recent-row .store-main { flex: 1; }
.recent-row .money { color: var(--green); font-weight: 800; white-space: nowrap; font-size: 14px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-wrap { position: relative; flex: 1; min-width: 230px; max-width: 390px; }
.search-wrap svg { position: absolute; left: 13px; top: 11px; width: 18px; height: 18px; color: #94a3b4; }
.search-wrap input { padding-left: 40px; width: 100%; }
.control { height: 41px; padding: 0 13px; border: 1px solid #dbe4ee; border-radius: 9px; background: white; color: var(--ink); font-size: 14px; outline: none; }
.control:focus { border-color: #7fb4f3; box-shadow: 0 0 0 3px #2c78e41c; }
textarea.control { min-height: 100px; padding: 10px 13px; resize: vertical; }
select.control { min-width: 125px; }
.filter-chip { border: 1px solid #dbe5ef; color: #56708b; padding: 8px 12px; background: white; border-radius: 8px; font-size: 13px; }
.filter-chip.active { border-color: #9fc8f4; background: var(--blue-light); color: var(--blue-dark); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.data-table { border-collapse: collapse; width: 100%; min-width: 970px; }
.data-table th { text-align: left; background: #fafbfd; color: #76869a; font-size: 12px; font-weight: 700; white-space: nowrap; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 14px 17px; border-bottom: 1px solid #edf1f5; font-size: 13px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdff; }
.table-store { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.table-store .store-avatar { width: 45px; height: 45px; }
.table-store strong { display: block; font-size: 14px; }
.table-store span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.subline { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.table-money { font-weight: 800; font-size: 14px; }
.status-pill { display: inline-flex; align-items: center; border-radius: 20px; padding: 4px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-overdue { background: var(--red-light); color: #c64846; }
.status-today { background: var(--amber-light); color: #c0781c; }
.status-soon { background: var(--blue-light); color: #256dcb; }
.status-active { background: var(--green-light); color: #188d6a; }
.status-paused { background: #edf0f4; color: #718196; }
.status-partial { background: #fff6e6; color: #ad741b; }
/* Distinct urgency levels for the computed 到期天数 column. */
.due-days-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due-days-today { background: #c9232c; color: #fff; box-shadow: 0 2px 7px #c9232c38; }
.due-days-soon { background: #fff0cf; color: #a34b00; border: 1px solid #ffc06b; box-shadow: 0 1px 5px #f29c3540; }
.due-days-overdue { background: #b91c1c; color: #fff; border: 1px solid #b91c1c; animation: due-days-alert 1.15s ease-in-out infinite; }
.due-days-normal { background: #edf3fa; color: #345777; font-variant-numeric: tabular-nums; }
@keyframes due-days-alert {
  0%, 100% { background: #b91c1c; box-shadow: 0 0 0 0 #e43f3f28; }
  50% { background: #ef4444; box-shadow: 0 0 0 4px #e43f3f3d; }
}
@media (prefers-reduced-motion: reduce) {
  .due-days-overdue { animation: none; background: #b91c1c; color: #fff; box-shadow: 0 0 0 2px #fca5a5; }
}
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.row-actions .button { min-height: 31px; padding: 6px 9px; }
.empty-state { padding: 48px 20px; text-align: center; color: #8292a4; }
.empty-state .empty-icon { width: 52px; height: 52px; background: #eef4fb; color: #78a5d5; display: grid; place-items: center; border-radius: 15px; margin: 0 auto 13px; }
.empty-state .empty-icon svg { width: 25px; height: 25px; }
.empty-state strong { display: block; color: #516980; font-size: 15px; }
.empty-state p { margin: 5px 0 14px; font-size: 13px; }
.reminder-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
.reminder-list { display: grid; gap: 10px; }
.reminder-card { background: white; border: 1px solid var(--line); border-radius: 13px; display: flex; align-items: center; gap: 13px; padding: 15px; }
.reminder-card .store-main { flex: 1; }
.reminder-card .status-pill { margin-top: 5px; }
.reminder-card .due-info { text-align: right; min-width: 100px; }
.reminder-card .due-info strong { display: block; color: #263f5a; font-size: 14px; }
.reminder-card .due-info span { display: block; color: var(--muted); font-size: 12px; }
.reminder-card .reminder-actions { display: flex; gap: 6px; }
.rule-panel { padding: 21px; align-self: start; }
.rule-panel h2 { font-size: 17px; margin: 0 0 13px; }
.rule-panel p, .rule-panel li { color: #6e7f93; font-size: 13px; line-height: 1.8; }
.rule-panel ul { margin: 0; padding-left: 17px; }
.rule-panel .button { margin-top: 15px; width: 100%; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(310px, 1fr); gap: 18px; align-items: start; }
.settings-panel { padding: 21px; }
.settings-panel h2 { margin: 0; font-size: 17px; }
.settings-panel p { color: var(--muted); margin: 6px 0 17px; font-size: 13px; }
.field-list { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; align-items: center; border: 1px solid #edf1f5; border-radius: 9px; padding: 10px 12px; background: #fcfdff; }
.field-row-main { min-width: 0; display: flex; align-items: center; gap: 8px; }
.field-row-main strong { font-size: 13px; }
.field-row-main span { color: #8a99aa; font-size: 12px; }
.field-row-actions { display: flex; gap: 2px; }
.mini-icon { width: 28px; height: 28px; border: 0; background: transparent; color: #8091a3; border-radius: 6px; display: grid; place-items: center; }
.mini-icon:hover { color: var(--blue); background: #eaf3ff; }
.mini-icon svg { width: 16px; height: 16px; }
.field-note { border-radius: 9px; background: #f5f8fc; padding: 11px 12px; color: #718297; font-size: 12px; line-height: 1.65; margin-top: 14px; }
.form-field { display: grid; gap: 6px; min-width: 0; }
.form-field label { font-size: 13px; color: #4e6178; font-weight: 700; }
.form-field label em { color: #dc6a64; font-style: normal; margin-left: 2px; }
.form-field .control { width: 100%; }
.form-hint { color: #8b9aac; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-section { margin: 0 0 23px; }
.form-section h3 { font-size: 15px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #e9eef4; }
.form-section .form-grid + .form-grid { margin-top: 16px; }
.full-span { grid-column: 1 / -1; }
.date-control { position: relative; }
.date-control input { padding-right: 42px; cursor: pointer; }
.date-control .date-trigger { position: absolute; right: 1px; top: 1px; height: 39px; width: 39px; border: 0; color: #6c8daf; background: transparent; display: grid; place-items: center; border-radius: 8px; }
.date-control .date-trigger svg { width: 17px; height: 17px; }
.checkline { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #50647c; cursor: pointer; line-height: 1.5; }
.checkline input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); flex: none; }
.photo-field { display: flex; gap: 15px; align-items: center; }
.photo-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.photo-actions .form-hint { flex-basis: 100%; }
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.detail-head h2 { margin: 0; font-size: 22px; }
.detail-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.detail-cell { border: 1px solid #edf1f5; border-radius: 9px; padding: 10px 12px; min-width: 0; }
.detail-cell span { display: block; color: #8795a6; font-size: 12px; }
.detail-cell strong, .detail-cell a { display: block; margin-top: 4px; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.detail-cell a { color: var(--blue); }
.detail-section { margin-top: 25px; }
.detail-section h3 { font-size: 15px; margin: 0 0 11px; }
.detail-payment { display: flex; justify-content: space-between; border-top: 1px solid #edf1f5; padding: 10px 0; gap: 10px; font-size: 13px; }
.detail-payment:first-child { border-top: 0; }
.detail-payment b { color: var(--green); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
.modal-root:empty { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: #0d203b81; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-box { background: #fff; border-radius: 16px; width: min(100%, 560px); max-height: min(92vh, 1000px); display: flex; flex-direction: column; box-shadow: 0 30px 80px #07172e4d; animation: modal-in .18s ease-out; }
.modal-box.wide { width: min(100%, 720px); }
.modal-box.drawer { width: min(100%, 590px); border-radius: 18px 0 0 18px; height: 100%; max-height: none; margin-left: auto; animation: drawer-in .2s ease-out; }
.modal-backdrop:has(.drawer) { padding: 0; justify-content: flex-end; }
.modal-header { padding: 20px 23px 17px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-header h2 { margin: 0; font-size: 20px; }
.modal-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.modal-close { border: 0; background: #f3f6fa; color: #6d7d90; width: 31px; height: 31px; border-radius: 8px; display: grid; place-items: center; }
.modal-close svg { width: 17px; height: 17px; }
.modal-body { overflow: auto; padding: 20px 23px; }
.modal-footer { padding: 15px 23px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 16px 16px; }
.modal-footer .left-action { margin-right: auto; }
.warning-box { padding: 12px 14px; background: #fff7e9; color: #976923; border: 1px solid #fae0b4; font-size: 13px; border-radius: 9px; line-height: 1.6; margin-bottom: 17px; }
.error-box { padding: 11px 13px; color: #af413e; background: #fff1f0; border: 1px solid #f5ceca; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.reminder-widget { position: fixed; bottom: 19px; right: 20px; width: 354px; z-index: 20; box-shadow: 0 19px 56px #132e4b29; border-radius: 15px; overflow: hidden; background: #fff; border: 1px solid #dfE7f0; }
.widget-head { width: 100%; background: var(--navy-2); color: white; border: 0; padding: 13px 16px; text-align: left; display: flex; align-items: center; gap: 9px; }
.widget-head svg { width: 18px; height: 18px; }
.widget-head strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-head .widget-count { background: #e45d5d; min-width: 19px; height: 19px; border-radius: 12px; line-height: 19px; text-align: center; font-size: 11px; padding: 0 4px; }
.widget-head .widget-expand { margin-left: auto; transition: transform .2s; }
.reminder-widget.is-open .widget-expand { transform: rotate(180deg); }
.widget-body { max-height: 350px; overflow: auto; display: none; }
.reminder-widget.is-open .widget-body { display: block; }
.widget-item { padding: 12px 15px; border-top: 1px solid #eaf0f6; }
.widget-item-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.widget-item strong { font-size: 13px; }
.widget-item .overdue-days { color: #d24e4b; font-size: 12px; white-space: nowrap; }
.widget-item p { color: #6d7f93; font-size: 12px; margin: 4px 0 8px; }
.widget-item-actions { display: flex; align-items: center; gap: 8px; }
.widget-item-actions .button { min-height: 29px; padding: 4px 8px; font-size: 12px; }
.widget-item-actions .text-link { border: 0; background: transparent; color: #5c7692; font-size: 12px; }
.widget-footer { width: 100%; border: 0; background: #f7faff; color: #2b72c6; padding: 10px; font-size: 12px; font-weight: 700; border-top: 1px solid #eaf0f6; }
.widget-empty { padding: 15px; color: #77899d; font-size: 12px; }
.toast-region { position: fixed; top: 88px; right: 22px; z-index: 50; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 230px; max-width: 390px; box-shadow: 0 14px 35px #142f4c24; border-radius: 10px; padding: 11px 14px; background: #173350; color: white; font-size: 13px; animation: toast-in .2s ease-out; }
.toast.error { background: #ba4542; }
.toast.success { background: #167b62; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes drawer-in { from { opacity: .5; transform: translateX(25px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.3fr) minmax(280px, .8fr); }
}
@media (min-width: 701px) and (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stat-card { grid-column: span 2; }
  .stat-card:nth-last-child(-n+2) { grid-column: span 3; }
}
@media (max-width: 1040px) {
  .sidebar { width: 70px; flex-basis: 70px; padding-inline: 9px; }
  .brand { margin: 0 3px 25px; }
  .brand > div:last-child, .sidebar-caption, .nav-item span, .sidebar-bottom, .nav-count { display: none !important; }
  .company-section { margin-bottom: 16px; padding-bottom: 13px; }
  .company-section-head { padding: 0 0 7px; justify-content: center; }
  .company-section-head span, .company-name, .company-manage { display: none; }
  .company-list { max-height: 190px; }
  .company-select { justify-content: center; padding: 7px 0; }
  .company-due-count { position: absolute; transform: translate(14px,-12px); min-width: 15px; height: 15px; line-height: 15px; font-size: 10px; }
  .company-row { position: relative; }
  .nav-item { justify-content: center; padding: 12px 0; }
  .nav-item svg { width: 21px; height: 21px; }
  .management-caption { margin-top: 25px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-stack { grid-template-columns: 1fr 1fr; align-items: start; }
  .dashboard-stack > .panel:first-child { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .sidebar { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-size: 17px; }
  .mobile-company-switch { border: 0; background: transparent; color: var(--ink); text-align: left; padding: 0; min-width: 0; max-width: calc(100vw - 110px); }
  .mobile-company-switch > svg { width: 15px; height: 15px; color: #71849a; }
  .mobile-company-copy { display: block; min-width: 0; }
  .mobile-company-copy strong, .mobile-company-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-company-copy strong { font-size: 15px; line-height: 1.25; }
  .mobile-company-copy small { color: #8394a6; font-size: 10px; line-height: 1.2; margin-top: 1px; }
  .mobile-brand-mark { width: 30px; height: 30px; border-radius: 9px; background: #2777da; color: white; display: grid; place-items: center; font-size: 16px; }
  .topbar { height: 61px; padding: 0 16px; }
  .topbar-date, .backup-button { display: none; }
  .topbar-actions { gap: 7px; }
  .add-top-button { width: 35px; height: 35px; min-height: 35px; padding: 0; font-size: 0; }
  .add-top-button svg { width: 20px; height: 20px; }
  .top-notify { width: 35px; height: 35px; }
  #mainContent { padding: 22px 15px 105px; }
  .page-header { margin-bottom: 17px; }
  .page-title h1 { font-size: 23px; }
  .page-title p { font-size: 13px; }
  .header-tools { display: none; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat-card { min-height: 125px; padding: 13px; border-radius: 12px; }
  .stat-card .stat-icon { margin-bottom: 10px; width: 30px; height: 30px; }
  .stat-value { font-size: 21px; }
  .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 112px; }
  .dashboard-stack, .insight-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dashboard-grid { gap: 10px; }
  .panel { border-radius: 12px; }
  .panel-head { padding: 16px 15px 10px; }
  .panel-head h2 { font-size: 16px; }
  .urgent-row { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 12px 6px; gap: 8px; }
  .urgent-row > .button { display: none; }
  .urgent-meta { min-width: 72px; }
  .chart-wrap { padding: 0 15px 17px; }
  .mix-list { padding-inline: 15px; }
  .recent-list { padding-inline: 15px; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #dde6ef; background: #fff; z-index: 25; justify-content: space-around; box-shadow: 0 -9px 25px #1f3f6220; }
  .mobile-nav button { border: 0; background: none; flex: 1; min-width: 0; color: #8a99ab; display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 3px; font-size: 11px; }
  .mobile-nav button.active { color: var(--blue); font-weight: 800; }
  .mobile-nav svg { width: 20px; height: 20px; }
  .reminder-widget { width: auto; max-width: calc(100vw - 30px); right: 15px; bottom: calc(79px + env(safe-area-inset-bottom)); }
  .reminder-widget:not(.is-open) { width: auto; border-radius: 30px; }
  .reminder-widget:not(.is-open) .widget-head { padding: 9px 12px; border-radius: 30px; }
  .reminder-widget:not(.is-open) .widget-head strong, .reminder-widget:not(.is-open) .widget-expand { display: none; }
  .reminder-widget.is-open { width: calc(100vw - 30px); }
  .reminder-widget.is-open .widget-body { max-height: min(47vh, 340px); }
  .toolbar { gap: 8px; }
  .search-wrap { max-width: none; width: 100%; flex-basis: 100%; }
  .toolbar select { flex: 1; min-width: 0; }
  .reminder-page-grid { grid-template-columns: 1fr; }
  .reminder-card { flex-wrap: wrap; }
  .reminder-card .store-main { flex: 1 1 calc(100% - 60px); }
  .reminder-card .due-info { text-align: left; flex: 1; }
  .reminder-card .reminder-actions { margin-left: auto; }
  .form-grid { gap: 12px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal-box, .modal-box.wide, .modal-box.drawer { width: 100%; height: auto; max-height: 94vh; border-radius: 16px 16px 0 0; margin: 0; }
  .modal-box.drawer { height: 94vh; }
  .modal-header { padding: 17px 17px 13px; }
  .modal-body { padding: 17px; }
  .modal-footer { padding: 12px 17px calc(12px + env(safe-area-inset-bottom)); border-radius: 0; }
  .modal-footer .button { flex: 1; }
  .modal-footer .left-action { flex: 0 0 auto; white-space: nowrap; }
  .toast-region { left: 16px; right: 16px; top: 69px; }
  .toast { max-width: none; }
}
@media (max-width: 420px) {
  .stat-value { font-size: 19px; }
  .stat-label { font-size: 12px; }
  .dashboard-stack, .insight-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .full-span { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .urgent-meta strong { font-size: 13px; }
}

/* Company workspaces and account controls */
.company-section { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; margin-bottom: 0; }
.company-list { display: block; flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; padding-right: 2px; }
.company-workspace { margin-bottom: 5px; border-radius: 10px; }
.company-workspace.active { background: #ffffff0d; }
.company-workspace .company-row { min-height: 43px; }
.company-workspace .company-row.active { background: #ffffff1b; }
.company-nav { display: grid; gap: 2px; margin: 2px 7px 9px 22px; padding-left: 8px; border-left: 1px solid #ffffff2a; }
.company-nav-item { width: 100%; min-height: 33px; border: 0; border-radius: 7px; padding: 7px 9px; background: transparent; color: #a8c0d9; display: flex; align-items: center; gap: 10px; text-align: left; font-size: 12px; font-weight: 600; }
.company-nav-item svg { width: 16px; height: 16px; }
.company-nav-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-nav-item:hover { background: #ffffff15; color: white; }
.company-nav-item.active { background: #2b73c7; color: white; }
.company-nav-item .nav-count { margin-left: auto; flex: none; }
.company-workspace:not(.active) .company-nav { display: none; }
.management-caption { margin-top: 15px; margin-bottom: 6px; }
.logout-link { margin-left: auto; border: 0; padding: 0; background: none; color: #adc2d7; white-space: nowrap; font-size: 12px; }
.logout-link:hover { color: white; text-decoration: underline; }
.top-account { color: #63778d; font-size: 13px; font-weight: 700; white-space: nowrap; }
.sidebar-bottom { flex-wrap: wrap; }
.sidebar-bottom .sidebar-version { margin-left: 0; }

/* Store selection, export and per-field filters */
.panel-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.panel-actions .button { white-space: nowrap; }
.store-data-table { width: max-content; min-width: 100%; }
.store-data-table th { min-width: 142px; padding: 10px 12px 9px; vertical-align: top; }
.store-data-table th:first-child, .store-data-table td:first-child { min-width: 47px; width: 47px; padding-left: 16px; padding-right: 4px; }
.store-data-table th:last-child { min-width: 209px; text-align: right; }
.store-data-table td { padding: 12px; }
.store-data-table input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.store-data-table .table-store { min-width: 190px; }
.store-data-table .store-avatar { cursor: pointer; }
.store-data-table tbody tr:has(.store-check:checked) { background: #f2f8ff; }
.column-filter-wrap { margin-top: 7px; }
.column-filter { display: block; width: 100%; min-width: 0; height: 29px; padding: 3px 7px; border: 1px solid #dce5ee; border-radius: 6px; background: white; color: #344e68; font-size: 12px; font-weight: 400; outline: none; }
.column-filter::placeholder { color: #a1aebb; }
.column-filter:focus { border-color: #84b5ed; box-shadow: 0 0 0 2px #2c78e41a; }
.column-filter[type="date"] { padding-inline: 5px; }
.store-data-table .row-actions { gap: 4px; }
.store-data-table .row-actions .button { font-size: 12px; }
.selection-summary { display: inline-flex; align-items: center; gap: 7px; color: #2c69ac; background: #eaf3ff; border: 1px solid #d1e5fc; border-radius: 8px; padding: 7px 10px; font-size: 12px; font-weight: 700; }

/* Editable field layout and display destinations */
.field-settings-row { border: 1px solid #e9eef5; border-radius: 10px; background: #fff; padding: 12px; margin-bottom: 9px; }
.field-settings-row .field-row-main { margin-bottom: 9px; }
.field-visibility { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; }
.field-visibility label { display: inline-flex; align-items: center; gap: 5px; color: #62758b; font-size: 12px; cursor: pointer; white-space: nowrap; }
.field-visibility input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); }
.field-settings-row .field-row-actions { margin-left: auto; }
.field-order-controls { display: inline-flex; gap: 5px; align-items: center; margin-right: auto; }
.field-order-controls .button { min-width: 58px; padding-inline: 8px; }
.field-order-controls .button:disabled { opacity: .42; cursor: not-allowed; }
.field-section-chip { display: inline-flex; align-items: center; border-radius: 5px; padding: 2px 6px; color: #4a75a5; background: #eaf3ff; font-size: 11px; font-weight: 700; }
.field-row-label { min-width: 0; }
.field-row-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-row-label small { color: #8a99aa; font-size: 11px; }

/* Centered detail view and voided customers */
.modal-box.wide { width: min(100%, 840px); }
.detail-section + .detail-section { border-top: 1px solid #edf1f5; padding-top: 18px; }
.status-void, .status-cancelled { background: #f1f2f5; color: #6d7888; }
.void-reason { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: #f7f8fa; color: #536579; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.void-reason strong { color: #344c65; }
.voided-row td { background: #fafbfc; }
.voided-row .store-main, .voided-row .table-store { color: #637387; }
.reminder-actions { flex-wrap: wrap; }
.reminder-actions .button-danger { border-color: #efcecc; }
.widget-item-actions { flex-wrap: wrap; }

/* Local test login and account editor */
.auth-root:empty { display: none; }
.auth-root:not(:empty) { position: fixed; inset: 0; z-index: 100; overflow: auto; display: grid; place-items: center; padding: 25px 16px; background: radial-gradient(circle at 75% 10%, #ddefff 0, transparent 30%), linear-gradient(145deg, #0d2946 0%, #173a62 42%, #edf5fc 42.1%, #f5f8fc 100%); }
.auth-card { width: min(100%, 450px); border: 1px solid #dfe8f1; border-radius: 20px; padding: 30px; background: white; box-shadow: 0 26px 70px #0b284747; }
.auth-card h1, .auth-card h2 { margin: 0 0 6px; color: #122d4c; font-size: 25px; line-height: 1.3; }
.auth-card p { margin: 0 0 22px; color: #6f8296; font-size: 13px; line-height: 1.65; }
.auth-card .brand-mark { margin-bottom: 17px; }
.auth-form { display: grid; gap: 15px; }
.auth-form .form-field { gap: 7px; }
.auth-form .control { height: 45px; }
.auth-form .button { min-height: 45px; margin-top: 3px; }
.auth-error { padding: 9px 11px; border: 1px solid #f1cdca; border-radius: 8px; color: #b74440; background: #fff2f1; font-size: 12px; }
.auth-note { display: block; margin-top: 16px; color: #8291a1; font-size: 11px; line-height: 1.6; }
.account-list { display: grid; gap: 9px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid #e8edf3; border-radius: 10px; background: #fff; }
.account-row strong { display: block; font-size: 14px; }
.account-row span { color: #8090a2; font-size: 12px; }
.account-row .row-actions { flex-wrap: wrap; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 210px; overflow: auto; border: 1px solid #e4ebf3; border-radius: 9px; padding: 11px; }
.permission-grid .checkline { padding: 4px; }

@media (max-width: 1040px) and (min-width: 701px) {
  .company-section { min-height: 0; }
  .company-list { max-height: none; }
  .company-nav { margin: 1px 0 8px; padding: 0; border: 0; }
  .company-nav-item { justify-content: center; padding: 7px 0; }
  .company-nav-item span, .company-nav-item .nav-count { display: none !important; }
  .company-nav-item svg { width: 17px; height: 17px; }
  .company-workspace:not(.active) .company-nav { display: none; }
}
@media (max-width: 700px) {
  .top-account { display: none; }
  .panel-head { align-items: flex-start; }
  .panel-actions { width: 100%; justify-content: flex-start; }
  .panel-head:has(.panel-actions) { flex-wrap: wrap; }
  .panel-actions .button { flex: 1 1 auto; }
  .store-data-table { min-width: 100%; }
  .store-data-table th, .store-data-table td { padding-inline: 9px; }
  .store-data-table th:first-child, .store-data-table td:first-child { padding-left: 12px; }
  .modal-backdrop:has(.modal-box.wide) { align-items: center; justify-content: center; padding: 14px; }
  .modal-box.wide { width: min(100%, 840px); height: auto; max-height: calc(100dvh - 28px); border-radius: 16px; margin: 0; }
  .account-row { align-items: flex-start; flex-direction: column; }
  .account-row .row-actions { width: 100%; justify-content: flex-start; }
  .permission-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .auth-card { padding: 23px 20px; }
  .field-visibility { gap: 7px 10px; }
}
/* Hidden elements stay hidden when component display rules apply. */
[hidden] { display: none !important; }

/* Keep independent expansion and customer-dialog layout above earlier variants. */
.company-workspace:not(.expanded) .company-nav { display: none; }
.company-workspace.expanded .company-nav { display: grid; }
.modal-backdrop:has(.modal-box.customer-modal) { align-items: center; justify-content: center; padding: 20px; }
.modal-box.wide.customer-modal { width: min(100%, 940px); height: auto; max-height: calc(100dvh - 40px); margin: 0; border-radius: 16px; }
@media (max-width: 1040px) and (min-width: 701px) {
  .company-workspace.expanded .company-nav { display: grid; }
}
@media (max-width: 700px) {
  .modal-backdrop:has(.modal-box.customer-modal) { padding: 12px; }
  .modal-box.wide.customer-modal { width: 100%; max-height: calc(100dvh - 24px); border-radius: 15px; }
}

/* A company heading is the full-width toggle, with its own manage button beside it. */
.company-select.company-toggle { width: auto; height: auto; min-width: 0; flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-start; gap: 9px; padding: 9px 7px 9px 10px; border-radius: 9px; text-align: left; }
.company-select.company-toggle svg { width: 13px; height: 13px; margin-left: auto; transition: transform .18s ease; }
.company-select.company-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.column-popover .popover-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.column-popover .popover-title strong { margin: 0; }
.column-popover .popover-title button { width: 25px; height: 25px; display: grid; place-items: center; border: 0; border-radius: 6px; background: #f2f6fa; color: #688099; font-size: 18px; }
.column-popover .popover-options { max-height: 225px; overflow-y: auto; margin-top: 8px; }
.column-popover .popover-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 11px; margin-top: 10px; border-top: 1px solid #edf1f6; }
.column-popover .popover-actions .button { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.store-data-table .column-menu-button.filtered { color: #fff; background: #2c78e4; }
.store-data-table .sort-direction { color: #2774ca; font-size: 12px; }
.store-data-table tbody tr[data-open-row] { cursor: pointer; }
.avatar-action { display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 11px; background: transparent; color: inherit; vertical-align: middle; }
.avatar-action:hover .store-avatar { outline: 2px solid #8dbcf0; outline-offset: 2px; }
.table-name-link { border: 0; padding: 0; background: transparent; color: #183855; font-size: 13px; font-weight: 750; text-align: left; }
.table-name-link:hover { color: #246fc7; text-decoration: underline; }
.detail-log-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.detail-log-head h4 { margin: 0; color: #1c3856; font-size: 15px; }
.detail-log-head > span { color: #8192a3; font-size: 12px; }

/* Resizable customer columns: explicit <col> widths keep short values close
   together, and the last column remains reachable in a narrow viewport. */
.store-data-table { table-layout: fixed; width: var(--store-table-width, max-content); min-width: 0; }
.store-data-table th,
.store-data-table td { min-width: 0; padding: 10px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-data-table th { height: 42px; padding-block: 6px; }
.store-data-table th:first-child,
.store-data-table td:first-child { width: 42px; min-width: 0; padding-left: 12px; padding-right: 4px; }
.store-data-table th:last-child,
.store-data-table td:last-child { min-width: 0; position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -8px 0 14px -13px #24436377; }
.store-data-table th:last-child { z-index: 3; background: #f8fafc; padding-right: 12px; }
.store-data-table tbody tr:hover td:last-child,
.store-data-table tbody tr:has(.store-check:checked) td:last-child { background: #f5f9ff; }
.store-data-table .column-head { min-width: 0; width: 100%; padding-right: 7px; }
.store-data-table .column-sort { overflow: hidden; text-overflow: ellipsis; }
.store-data-table .column-menu-button { width: 21px; height: 21px; }
.store-data-table .table-store { min-width: 0; gap: 7px; }
.store-data-table .table-store > div { min-width: 0; }
.store-data-table .table-store strong,
.store-data-table .table-store span,
.store-data-table .store-main strong,
.store-data-table .store-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-data-table .row-actions { justify-content: flex-end; gap: 4px; }
.store-data-table .row-actions .button { min-width: 0; padding-inline: 7px; }
.store-data-table .column-resizer { position: absolute; right: -4px; top: 0; bottom: 0; width: 10px; z-index: 4; border: 0; padding: 0; background: transparent; cursor: col-resize; touch-action: none; }
.store-data-table .column-resizer::after { content: ""; position: absolute; top: 8px; bottom: 8px; left: 4px; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
.store-data-table th:hover .column-resizer::after,
.store-data-table .column-resizer:hover::after,
.store-data-table .column-resizer:focus-visible::after,
.store-data-table .column-resizer.resizing::after { background: #72a8e7; }
body.is-resizing-column,
body.is-resizing-column * { cursor: col-resize !important; user-select: none !important; }
.store-data-table .table-empty { position: static; text-align: center; padding: 30px 12px; }

/* Preview above the scrolling table, at four times the list avatar size. */
.avatar-hover-preview { position: fixed; z-index: 45; width: 180px; height: 180px; padding: 5px; overflow: hidden; border: 1px solid #dae5f1; border-radius: 17px; background: #fff; box-shadow: 0 18px 42px #102c4b48; pointer-events: none; animation: avatar-preview-in .13s ease-out; }
.avatar-hover-preview img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
@keyframes avatar-preview-in { from { opacity: 0; transform: translateY(4px) scale(.96); } to { opacity: 1; transform: none; } }

/* Full-size photo inspection from the customer dialog. */
.photo-zoom-trigger { display: inline-grid; place-items: center; position: relative; flex: none; padding: 0; border: 0; border-radius: 14px; background: transparent; cursor: zoom-in; }
.photo-zoom-trigger::after { content: ""; position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; transform: translate(-50%, -50%) scale(.88); border-radius: 50%; background: #102f50c9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.7' cy='10.7' r='6.2'/%3E%3Cpath d='m15.3 15.3 5.2 5.2'/%3E%3C/svg%3E") center / 22px 22px no-repeat; box-shadow: 0 5px 14px #102b4b55; opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; }
.photo-zoom-trigger:hover::after,
.photo-zoom-trigger:focus-visible::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.photo-zoom-trigger:hover .store-avatar { filter: brightness(.8); }
.photo-lightbox { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 42px 28px; overflow: auto; background: #08192cea; backdrop-filter: blur(5px); }
.photo-lightbox img { display: block; width: auto; height: auto; max-width: min(92vw, 1600px); max-height: calc(100dvh - 90px); object-fit: contain; box-shadow: 0 24px 75px #0009; border-radius: 7px; }
.photo-lightbox button,
.photo-lightbox-close { position: absolute; right: 22px; top: 19px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #ffffff57; border-radius: 10px; background: #ffffff21; color: #fff; font-size: 23px; line-height: 1; }
.photo-lightbox button:hover,
.photo-lightbox-close:hover { background: #ffffff39; }

/* A restrained calendar badge and optional account-owned header image. */
.topbar { isolation: isolate; }
.topbar-date { display: flex; align-items: center; min-width: 0; }
.date-display { display: inline-flex; align-items: center; gap: 9px; min-height: 39px; max-width: 100%; padding: 5px 12px 5px 7px; border: 1px solid #dce6f0; border-radius: 11px; background: linear-gradient(180deg, #ffffff, #f1f6fc); box-shadow: 0 1px 1px #fff inset, 0 2px 6px #183b6010; color: #244365; }
.date-icon { width: 27px; height: 27px; display: grid; place-items: center; flex: none; border-radius: 7px; background: linear-gradient(145deg, #438de3, #236bc4); box-shadow: 0 3px 8px #2a75d240; color: #fff; }
.date-icon svg { width: 15px; height: 15px; stroke-width: 2; }
.date-main { font-family: "Aptos", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif; font-size: 13px; font-weight: 750; letter-spacing: .015em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-weekday { padding-left: 8px; border-left: 1px solid #d3deea; color: #6b8299; font-size: 12px; font-weight: 600; white-space: nowrap; }
.topbar.has-custom-background,
.topbar[data-custom-background] { background-color: #173858; background-image: linear-gradient(90deg, #092443c9, #12355480), var(--topbar-custom-image); background-size: cover; background-position: center; border-bottom-color: #082d48a8; }
.topbar.has-custom-background .date-display,
.topbar[data-custom-background] .date-display { border-color: #ffffff59; background: #ffffffed; box-shadow: 0 4px 14px #001b3655; }
.topbar.has-custom-background .icon-button,
.topbar[data-custom-background] .icon-button { color: #fff; border-color: #ffffff80; background: #092d4b7a; backdrop-filter: blur(4px); }
.topbar.has-custom-background .icon-button:hover,
.topbar[data-custom-background] .icon-button:hover { color: #fff; background: #164c77bd; }
.topbar.has-custom-background .top-account,
.topbar[data-custom-background] .top-account,
.topbar.has-custom-background .mobile-company-switch,
.topbar[data-custom-background] .mobile-company-switch,
.topbar.has-custom-background .mobile-company-copy small,
.topbar[data-custom-background] .mobile-company-copy small { color: #fff; text-shadow: 0 1px 2px #08223d; }
.topbar [data-action="customize-header"] { flex: none; }

/* Tighter page heading, especially above the reminder queue. */
#mainContent { padding-top: 22px; }
.page-header { margin-bottom: 16px; }
.page-company { margin-bottom: 6px; }
.page-title h1 { font-size: 26px; }
.page-title p { margin-top: 5px; }
#mainContent:has(.reminder-page-grid) .page-header { margin-bottom: 14px; }
#mainContent:has(.reminder-page-grid) .toolbar { margin-bottom: 12px; }

@media (max-width: 1040px) and (min-width: 701px) {
  .topbar { padding-inline: 20px; }
  .topbar-actions { gap: 7px; }
  .date-display { gap: 7px; padding-right: 9px; }
  .date-weekday { padding-left: 6px; }
  .store-data-table th,
  .store-data-table td { padding-inline: 7px; }
}
@media (max-width: 700px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; gap: 0 8px; height: 83px; padding: 7px 12px 6px; align-items: center; }
  .mobile-brand { min-width: 0; grid-column: 1; grid-row: 1; }
  .mobile-company-switch { max-width: calc(100vw - 187px); }
  .topbar-actions { grid-column: 2; grid-row: 1 / 3; gap: 5px; }
  .topbar-date { display: flex; grid-column: 1; grid-row: 2; align-self: start; }
  .date-display { min-height: 23px; gap: 5px; padding: 1px 7px 1px 2px; border-radius: 7px; }
  .date-icon { width: 19px; height: 19px; border-radius: 5px; }
  .date-icon svg { width: 11px; height: 11px; }
  .date-main { font-size: 10px; }
  .date-weekday { font-size: 10px; padding-left: 5px; }
  .topbar .icon-button { width: 34px; height: 34px; }
  .topbar .icon-button svg { width: 18px; height: 18px; }
  .topbar .button.add-top-button { width: 34px; height: 34px; }
  #mainContent { padding-top: 16px; }
  .page-title h1 { font-size: 22px; }
  .store-data-table th:last-child,
  .store-data-table td:last-child { padding-inline: 6px; }
  .store-data-table .row-actions .button { padding-inline: 5px; font-size: 11px; }
  .avatar-hover-preview { width: 160px; height: 160px; }
  .reminder-widget { z-index: 24; right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); max-width: calc(100vw - 20px); }
  .reminder-widget.is-open { width: calc(100vw - 20px); }
  .reminder-widget.is-open .widget-body { max-height: min(42dvh, 310px); }
  .modal-backdrop:has(.customer-modal) { align-items: center; padding: 8px; }
  .modal-box.wide.customer-modal { max-height: calc(100dvh - 16px); }
  .customer-modal .modal-header { padding: 12px 14px 9px; }
  .customer-modal .modal-body { padding: 12px 14px; }
  .customer-modal .modal-footer { padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); flex-wrap: wrap; gap: 6px; }
  .customer-modal .modal-footer .button { flex: 1 1 auto; min-height: 35px; padding: 6px 8px; font-size: 12px; }
  .customer-modal .modal-footer .left-action { margin-right: 0; }
  .photo-lightbox { padding: 50px 10px; }
  .photo-lightbox img { max-width: 100%; max-height: calc(100dvh - 100px); }
  .photo-lightbox button,
  .photo-lightbox-close { right: 10px; top: 9px; }
}
@media (max-width: 390px) {
  .topbar { padding-inline: 9px; gap: 0 4px; }
  .topbar-actions { gap: 3px; }
  .mobile-company-switch { max-width: calc(100vw - 177px); }
  .topbar .icon-button,
  .topbar .button.add-top-button { width: 31px; height: 31px; }
  .date-weekday { display: none; }
  .store-data-table th,
  .store-data-table td { padding-inline: 5px; }
  .reminder-widget.is-open .widget-body { max-height: 36dvh; }
}

/* Reminder stays a small, dismissible corner control on compact windows. */
@media (max-width: 1200px) {
  .reminder-widget { right: 12px; bottom: 14px; max-width: calc(100vw - 24px); }
  .reminder-widget:not(.is-open) { width: auto; border-radius: 100px; }
  .reminder-widget:not(.is-open) .widget-head { min-height: 38px; padding: 8px 11px; border-radius: 100px; }
  .reminder-widget:not(.is-open) .widget-head strong,
  .reminder-widget:not(.is-open) .widget-expand { display: none; }
  .reminder-widget.is-open { display: flex; flex-direction: column; width: min(315px, calc(100vw - 24px)); max-height: min(30dvh, 270px); }
  .reminder-widget.is-open .widget-head,
  .reminder-widget.is-open .widget-footer { flex: none; }
  .reminder-widget.is-open .widget-body { min-height: 0; flex: 1 1 auto; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
  .widget-item { padding: 9px 11px; }
  .widget-item p { margin: 3px 0 6px; }
}
@media (max-width: 700px) {
  #mainContent { padding-bottom: calc(145px + env(safe-area-inset-bottom)); }
  .reminder-widget { right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .reminder-widget.is-open { width: min(310px, calc(100vw - 20px)); max-height: min(29dvh, 230px); }
  .reminder-widget.is-open .widget-body { max-height: none; }
}
@media (max-width: 390px) {
  .reminder-widget.is-open { max-height: min(27dvh, 195px); }
  .reminder-widget.is-open .widget-body { max-height: none; }
}

/* Mobile "More" menu keeps pages that do not fit in the bottom rail reachable. */
.mobile-more-list { display: grid; gap: 8px; }
.mobile-more-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 2px 8px; width: 100%; min-height: 62px; padding: 10px 13px; border: 1px solid #e1e9f2; border-radius: 11px; background: #fbfdff; color: #183a5d; text-align: left; touch-action: manipulation; }
.mobile-more-item strong { grid-column: 1; grid-row: 1; font-size: 14px; font-weight: 750; }
.mobile-more-item span { grid-column: 1; grid-row: 2; min-width: 0; color: #71869b; font-size: 12px; line-height: 1.35; }
.mobile-more-item svg { grid-column: 2; grid-row: 1 / 3; width: 17px; height: 17px; color: #8ca5bd; }
.mobile-more-item:hover,
.mobile-more-item:focus-visible { border-color: #a8c8e9; background: #f1f7ff; }
.mobile-more-item:active { background: #e8f2ff; transform: scale(.99); }
.mobile-more-item[data-action="logout"] { color: #a7433d; background: #fffafa; }
.mobile-more-item[data-action="logout"]:hover { border-color: #edc4c0; background: #fff4f2; }
@media (max-width: 420px) {
  .mobile-more-list { gap: 7px; }
  .mobile-more-item { min-height: 58px; padding: 9px 11px; }
}
.photo-lightbox { display: grid; place-items: center; overflow: hidden; padding: 58px 16px 20px; }
.photo-lightbox img { width: auto; height: auto; min-width: 0; min-height: 0; max-width: min(940px, calc(100vw - 32px)); max-height: min(860px, calc(100dvh - 78px)); margin: auto; object-fit: contain; }
@media (max-width: 700px) {
  .photo-lightbox { padding: 50px 10px 20px; }
  .photo-lightbox img { max-width: calc(100vw - 20px); max-height: calc(100dvh - 78px); }
}
.platform-choices { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid #dce6f0; border-radius: 9px; background: #f9fbfe; }
.avatar-hover-preview .preview-letter { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 12px; background: #e6effa; color: #2b6bb7; font-size: 68px; font-weight: 800; }
.platform-choice { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.platform-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.platform-choice span { display: inline-flex; align-items: center; min-height: 33px; padding: 6px 12px; border: 1px solid #d8e4f1; border-radius: 7px; background: #fff; color: #4b6681; font-size: 12px; font-weight: 650; }
.platform-choice input:checked + span { border-color: #78b1f0; color: #1769c3; background: #eaf4ff; box-shadow: 0 0 0 1px #afd3f8 inset; }
.platform-choice input:focus-visible + span { outline: 3px solid #89bbff; outline-offset: 2px; }
.header-settings-preview { display: grid; place-items: center; min-height: 120px; margin-bottom: 17px; border-radius: 12px; background-color: #173a5f; background-image: linear-gradient(90deg, #102d4cbd, #336b9e83), var(--preview-image, none); background-position: center; background-size: cover; color: #fff; font-size: 17px; font-weight: 750; }
.header-settings-preview[style] { background-image: linear-gradient(90deg, #102d4cbd, #336b9e83), var(--preview-image, none); }
.branch-list { display: grid; gap: 10px; margin-top: 13px; }
.branch-card { display: flex; align-items: center; gap: 14px; padding: 13px; border: 1px solid #e3ebf3; border-radius: 10px; background: #fbfdff; }
.branch-card-main { min-width: 0; flex: 1; }
.branch-card-main strong { display: block; font-size: 14px; color: #183653; }
.branch-card-main span { display: block; margin: 3px 0 8px; color: #71859b; font-size: 12px; }
.branch-link { width: 100%; max-width: 680px; height: 32px; font-size: 11px; color: #59738e; background: #fff; }
.branch-card-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.workspace.has-custom-background .page-header { border: 1px solid #dbe8f4; border-radius: 13px; padding: 14px 16px; background-image: linear-gradient(90deg, #f7fbffeb, #f7fbffb5), var(--topbar-custom-image); background-position: center; background-size: cover; box-shadow: 0 4px 18px #17375910; }
@media (max-width: 700px) { .branch-card { align-items: stretch; flex-direction: column; } .branch-card-actions .button { flex: 1; } .workspace.has-custom-background .page-header { padding: 12px; } }

/* Store list page size and navigation stay outside the horizontally scrolling table. */
.store-page-size { display: inline-flex; align-items: center; gap: 7px; color: #62758b; font-size: 12px; font-weight: 650; white-space: nowrap; }
.store-page-size .control { width: 88px; min-width: 88px; height: 34px; padding: 5px 8px; font-size: 12px; }
.store-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 20px; border-top: 1px solid #e7edf4; color: #62758b; font-size: 12px; }
.store-pagination-actions { display: flex; align-items: center; gap: 8px; }
.store-pagination-actions .button:disabled { opacity: .48; cursor: not-allowed; }
.field-config-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.field-config-head > div { min-width: 0; }
.field-config-head p { margin-bottom: 0; }
.field-config-head .button { flex: none; white-space: nowrap; }
.field-group-heading { margin: 10px 1px 3px; color: #3b5875; font-size: 13px; font-weight: 800; }
.field-group-empty { padding: 13px; border: 1px dashed #dbe6f1; border-radius: 9px; color: #8394a6; font-size: 12px; }
.fixed-received-field { background: #f5f9ff; border-color: #cfe1f7; }
.fixed-received-field .field-row-main { flex-wrap: wrap; }
.fixed-field-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border-radius: 6px; background: #e6f1ff; color: #286bb1; font-size: 11px; font-weight: 700; white-space: nowrap; }
.fixed-received-desc { color: #526b84; font-size: 12px; line-height: 1.6; }
.computed-field-output { display: flex; align-items: center; background: #f6f9fd; color: #47647f; font-weight: 700; }
.field-settings-row .field-row-actions { justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.field-recovery { margin-top: 13px; }
.store-payment-toolbar { padding: 11px 14px; background: #f6faff; border: 1px solid #dae8f8; border-radius: 11px; }
.store-month-picker, .payment-month-picker { display: inline-flex; align-items: center; gap: 10px; color: #506b87; font-size: 12px; font-weight: 750; white-space: nowrap; }
.store-month-picker .control, .payment-month-picker .control { width: 174px; height: 36px; font-size: 13px; font-weight: 650; color: #17395b; background: #fff; }
.store-month-summary, .payment-period-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; padding: 12px 18px; border: 1px solid #d8e9f7; border-radius: 10px; background: linear-gradient(110deg, #f2f8ff, #fbfdff); color: #365b7e; font-size: 12px; }
.store-month-summary { margin: 0 20px 14px; }
.store-month-summary strong, .payment-summary-period { color: #183a5b; font-weight: 800; }
.store-month-summary span b, .payment-period-summary span strong { color: #1163bf; font-size: 16px; font-weight: 850; white-space: nowrap; }
.store-month-summary small { flex-basis: 100%; color: #7890a8; line-height: 1.5; }
.payment-toolbar { gap: 9px; }
.payment-month-picker { margin-left: auto; }
.payment-period-summary { margin: 0 0 14px; }
.payment-toolbar { align-items: stretch; margin-bottom: 7px; padding: 12px; border: 1px solid #d9e8f1; border-radius: 12px; background: linear-gradient(145deg, #f8fcff, #f3faf9); }
.payment-quick-filters, .payment-date-filters { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; }
.payment-quick-filters .filter-chip { white-space: nowrap; }
.payment-date-filter, .payment-range-filters { display: inline-flex; align-items: center; gap: 6px; min-width: 0; min-height: 42px; padding: 5px 8px; border: 1px solid #dce7f0; border-radius: 9px; background: #fff; color: #506b87; font-size: 12px; font-weight: 750; white-space: nowrap; }
.payment-date-filter.is-active, .payment-range-filters.is-active { border-color: #91c6d4; background: #effafa; box-shadow: 0 0 0 2px #91c6d422; }
.payment-date-filter .control, .payment-month-picker .control, .payment-range-filters .control { width: 142px; min-width: 0; height: 32px; padding: 3px 7px; border-radius: 7px; font-size: 12px; }
.payment-date-filter:has(#paymentYearFilter) .control { width: 112px; }
.payment-month-picker { margin-left: 0; }
.payment-range-filters { flex-wrap: wrap; }
.payment-range-filters label { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.payment-range-separator { color: #7892a5; font-size: 11px; }
.payment-filter-hint { margin: 0 1px 11px; color: #7b91a4; font-size: 11px; line-height: 1.45; }
.store-data-table th small { color: #8a9caf; font-size: 11px; font-weight: 600; }
@media (max-width: 700px) {
  .store-page-size { flex: 1 1 100%; }
  .store-pagination { padding: 11px 14px; }
  .store-pagination-actions { width: 100%; }
  .store-pagination-actions .button { flex: 1 1 0; }
  .field-config-head { flex-wrap: wrap; }
  .field-config-head > div { flex: 1 1 100%; }
  .field-config-head .button { width: 100%; justify-content: center; }
  .store-month-picker, .payment-month-picker { width: 100%; justify-content: space-between; margin-left: 0; }
  .store-month-picker .control, .payment-month-picker .control { width: min(56vw, 190px); }
  .store-payment-toolbar .subline { flex-basis: 100%; }
  .store-month-summary { margin: 0 12px 12px; padding: 11px 12px; }
  .store-month-summary strong, .payment-summary-period { flex-basis: 100%; }
  .payment-toolbar { padding: 10px; }
  .payment-quick-filters .filter-chip { flex: 1 1 calc(50% - 7px); }
  .payment-date-filter, .payment-range-filters { flex: 1 1 100%; width: 100%; justify-content: space-between; white-space: normal; }
  .payment-date-filter .control, .payment-month-picker .control { flex: 0 1 70%; width: min(68%, 210px); }
  .payment-range-filters { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: stretch; gap: 7px; }
  .payment-range-filters > span:first-child { font-size: 12px; }
  .payment-range-filters label { width: 100%; justify-content: space-between; }
  .payment-range-filters label .control { flex: 0 1 70%; width: min(68%, 210px); }
  .payment-range-separator { display: none; }
  .payment-range-filters label:last-child::before { content: '至'; color: #506b87; }
}

/* Keep account and branch actions legible on 375 px phones. */
@media (max-width: 700px) {
  .settings-panel > .panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 9px; padding: 0 0 12px; }
  .settings-panel > .panel-head > div { min-width: 0; flex: 1 1 100%; }
  .settings-panel > .panel-head .button { width: auto; min-width: max-content; flex: 0 0 auto; white-space: nowrap; writing-mode: horizontal-tb; }
  .settings-panel > .panel-head h2 { margin: 0; }
  .settings-panel > .panel-head p { margin: 4px 0 0; overflow-wrap: anywhere; }
  .branch-card-actions { width: 100%; }
  .branch-card-actions .button { min-width: max-content; white-space: nowrap; }
}

/* The ten-minute reminder opens the existing corner list and briefly celebrates its arrival. */
.reminder-widget.is-nudging { box-shadow: 0 18px 58px #eb608544, 0 0 0 3px #ffdce7; animation: widget-pop .65s cubic-bezier(.2, 1.3, .35, 1); }
.reminder-widget.is-nudging .widget-head { background: linear-gradient(105deg, #7d356f, #e05f86 62%, #fa8876); }
.widget-nudge { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; overflow: hidden; background: linear-gradient(105deg, #fff2f6, #fff8e8); border-bottom: 1px solid #f9dbe1; }
.widget-nudge-bell { flex: 0 0 35px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 13px; background: #fff; box-shadow: 0 5px 14px #df799033; font-size: 23px; transform-origin: top center; animation: widget-bell-ring .65s ease-in-out 4; }
.widget-nudge-copy { display: grid; gap: 2px; min-width: 0; }
.widget-nudge-copy strong { color: #a6275a; font-size: 14px; font-weight: 850; letter-spacing: .02em; }
.widget-nudge-copy small { color: #a26573; font-size: 11px; }
.widget-nudge-spark { position: absolute; right: 12px; top: 7px; color: #efa341; font-size: 18px; animation: widget-spark 1.2s ease-in-out infinite alternate; }
.widget-sound-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; background: #f9fbff; border-bottom: 1px solid #eaf0f6; }
.widget-sound-row > span { color: #70849a; font-size: 11px; line-height: 1.3; text-align: right; }
.widget-sound-button { display: inline-flex; align-items: center; gap: 5px; min-height: 29px; padding: 4px 9px; border: 1px solid #e5c5da; border-radius: 8px; color: #9c376b; background: #fff; font-size: 11px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.widget-sound-button:hover { background: #fff0f7; }
.widget-sound-button:focus-visible { outline: 2px solid #9c376b; outline-offset: 2px; }
.widget-sound-button svg { width: 14px; height: 14px; }
@keyframes widget-pop { from { opacity: .55; transform: translateY(17px) scale(.93); } to { opacity: 1; transform: none; } }
@keyframes widget-bell-ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(16deg); } 75% { transform: rotate(-14deg); } }
@keyframes widget-spark { from { transform: scale(.7) rotate(-15deg); opacity: .45; } to { transform: scale(1.25) rotate(20deg); opacity: 1; } }
@media (max-width: 1200px) {
  .reminder-widget.is-nudging.is-open { max-height: min(49dvh, 370px); }
}
@media (max-width: 700px) {
  .reminder-widget.is-open { max-height: min(36dvh, 240px); }
  .reminder-widget.is-nudging.is-open { max-height: min(46dvh, 310px); }
  .widget-sound-row { padding: 8px 10px; }
  .widget-nudge { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .reminder-widget.is-nudging, .widget-nudge-bell, .widget-nudge-spark { animation: none !important; }
}

/* Calm depth for the company workspaces: clear hierarchy without heavier navigation. */
.sidebar {
  background: radial-gradient(circle at 8% 0%, #254b76 0, transparent 32%), linear-gradient(164deg, #183655 0%, #102a48 47%, #0b203b 100%);
  border-right: 1px solid #274d73;
  box-shadow: inset -1px 0 0 #ffffff12, 8px 0 25px #17334d12;
}
.sidebar .brand { padding-bottom: 18px; margin-bottom: 19px; border-bottom: 1px solid #ffffff1d; }
.sidebar .brand-mark { border: 1px solid #ffffff49; box-shadow: 0 8px 18px #071e3c63, inset 0 1px 0 #ffffff7d; }
.sidebar .brand strong { letter-spacing: .015em; text-shadow: 0 1px 2px #061b35; }
.sidebar .company-section-head { color: #b4cbe0; font-weight: 750; }
.sidebar .company-section-head button { border-color: #91b9db48; background: linear-gradient(155deg, #ffffff22, #ffffff0d); box-shadow: inset 0 1px 0 #ffffff21; }
.sidebar .company-workspace { border: 1px solid transparent; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.sidebar .company-workspace.expanded { background: linear-gradient(145deg, #ffffff13, #ffffff07); border-color: #b6d7f028; box-shadow: 0 5px 14px #051a3225, inset 0 1px 0 #ffffff12; }
.sidebar .company-workspace.active { border-color: #76afe24f; box-shadow: 0 7px 18px #071e3c33, inset 3px 0 0 #59acff; }
.sidebar .company-row.active { background: linear-gradient(90deg, #4a88c133, #ffffff08); }
.sidebar .company-select:hover { background: #ffffff0b; }
.sidebar .company-initial { border: 1px solid #ffffff1d; background: linear-gradient(145deg, #486a8c, #2d4c70); box-shadow: 0 2px 5px #071a3450; }
.sidebar .company-row.active .company-initial { border-color: #a3d8ff55; background: linear-gradient(145deg, #52b3f6, #227bd8); box-shadow: 0 3px 8px #1274ce55; }
.sidebar .company-nav { border-left-color: #87b5dd4c; }
.sidebar .company-nav-item { border: 1px solid transparent; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.sidebar .company-nav-item:hover { background: #ffffff15; border-color: #ffffff18; }
.sidebar .company-nav-item.active { background: linear-gradient(105deg, #3c94e9, #2574c6); border-color: #9dd5ff54; box-shadow: 0 4px 11px #0c407170, inset 0 1px 0 #ffffff44; }
.sidebar .company-nav-item.active svg { color: #fff; }
.sidebar .sidebar-bottom { background: linear-gradient(90deg, #ffffff08, transparent); }

/* Payment dialog: paired inputs start on the same baseline; hints stay with inputs. */
.modal-box:has(#collectForm) { border: 1px solid #cbd9e8; box-shadow: 0 28px 78px #081d3a55, 0 2px 6px #0f315a1f; }
.modal-box:has(#collectForm) .modal-header { background: linear-gradient(120deg, #f2f8ff, #ffffff 65%); border-bottom-color: #d9e7f5; }
.modal-box:has(#collectForm) .modal-header h2 { color: #123656; letter-spacing: .01em; }
.modal-box:has(#collectForm) .modal-body { background: #f5f8fc; }
.modal-box:has(#collectForm) .warning-box { margin-bottom: 15px; border-color: #f4d8a5; background: linear-gradient(110deg, #fff8ea, #fffdf7); box-shadow: inset 3px 0 0 #e7a74d; color: #8f6128; }
#collectForm > .form-grid,
#collectForm > .form-section { padding: 16px; border: 1px solid #dfe9f3; border-radius: 13px; background: #fff; box-shadow: 0 4px 16px #1b466d0b, inset 0 1px 0 #fff; }
#collectForm > .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; align-items: start; }
#collectForm .form-field { display: flex; flex-direction: column; align-self: start; align-items: stretch; gap: 6px; min-width: 0; }
#collectForm .form-field label { min-height: 20px; line-height: 20px; color: #3a5875; font-weight: 750; }
#collectForm .form-field .control { min-width: 0; height: 43px; background: #fcfdff; border-color: #d6e2ee; }
#collectForm .form-field .control:hover { border-color: #a9c8e8; }
#collectForm .form-field .control:focus { background: #fff; }
#collectForm .form-field .date-control { width: 100%; }
#collectForm .form-hint { display: block; margin-top: 1px; line-height: 1.5; color: #748ba1; }
#collectForm > .form-section { margin: 14px 0; }
#collectForm > .form-section h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; color: #203d5b; }
#collectForm > .form-section h3::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: linear-gradient(#65b4f3, #2a77ce); }
#collectForm > .checkline { padding: 2px 3px; color: #395976; font-weight: 650; }
.modal-box:has(#collectForm) .modal-footer { background: linear-gradient(180deg, #ffffff, #f8fbff); }

/* Customer archive: two distinct, readable sections with a stable action bar. */
.customer-modal { border: 1px solid #cbd9e8; box-shadow: 0 30px 82px #071d3859, 0 2px 7px #0f315a1b; }
.customer-modal .modal-header { background: linear-gradient(120deg, #edf6ff, #ffffff 68%); border-bottom-color: #d8e6f3; }
.customer-modal .modal-header h2 { color: #143759; letter-spacing: .01em; }
.customer-modal .modal-body { padding: 19px; background: #f4f8fc; }
.customer-modal .detail-form .form-section { margin: 0 0 17px; padding: 18px 20px 20px; border: 1px solid #dfe8f2; border-radius: 13px; background: #fff; box-shadow: 0 5px 17px #173b6010, inset 0 1px 0 #fff; }
.customer-modal .detail-form .form-section:last-child { margin-bottom: 0; }
.customer-modal .detail-form .form-section > h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 0 0 12px; border-bottom: 1px solid #e5edf5; font-size: 15px; font-weight: 800; }
.customer-modal .detail-form .form-section > h3::before { content: ""; width: 4px; height: 18px; border-radius: 3px; background: linear-gradient(#68b6f4, #2775cc); box-shadow: 0 2px 5px #2a7fd54d; }
.customer-modal .detail-form .form-grid { align-items: start; gap: 15px 18px; }
.customer-modal .detail-form .form-field { align-self: start; align-content: start; }
.customer-modal .detail-form .form-field label { color: #3b5875; font-weight: 750; }
.customer-modal .detail-form .control { background: #fcfdff; border-color: #d6e2ed; }
.customer-modal .detail-form .control:hover { border-color: #aac9e8; }
.customer-modal .detail-form .control:focus { background: #fff; }
.customer-modal .fixed-amount-output { display: flex; align-items: center; color: #1769bb; font-weight: 850; font-variant-numeric: tabular-nums; background: linear-gradient(110deg, #f1f8ff, #fbfdff); border-color: #cee3f8; }
.customer-modal .fixed-payment-readonly .form-hint { line-height: 1.45; }
.customer-modal .detail-form .photo-field { padding: 11px 12px; border: 1px solid #e1eaf3; border-radius: 12px; background: linear-gradient(110deg, #f9fcff, #fff); }
.customer-modal .detail-log { margin-top: 0; padding-top: 0; border-top: 0; }
.customer-modal .detail-log-head { padding: 0 2px 2px; }
.customer-modal .detail-log .table-scroll { border-color: #dfe8f2; border-radius: 9px; }
.customer-modal .detail-log th { background: #f4f8fc; color: #56708b; }
.customer-modal .modal-footer { background: linear-gradient(180deg, #fff, #f8fbff); border-top-color: #dce7f2; }

@media (max-width: 1040px) and (min-width: 701px) {
  .sidebar .brand { padding-bottom: 13px; margin-bottom: 13px; }
  .sidebar .company-nav { border-left: 0; }
  .sidebar .company-workspace.active { box-shadow: 0 5px 12px #071e3c26, inset 2px 0 0 #59acff; }
}
@media (max-width: 700px) {
  .customer-modal .modal-body { padding: 11px; }
  .customer-modal .detail-form .form-section { padding: 14px 13px 15px; margin-bottom: 12px; border-radius: 11px; }
  .customer-modal .detail-form .form-grid { gap: 12px; }
  .modal-box:has(#collectForm) .modal-body { padding: 12px; }
  #collectForm > .form-grid, #collectForm > .form-section { padding: 14px; }
}
@media (max-width: 420px) {
  #collectForm > .form-grid, #collectForm > .form-section .form-grid { grid-template-columns: minmax(0, 1fr); }
  .customer-modal .detail-form .photo-field { padding: 9px; }
}

/* Keep the brief success notice behind an open dialog; outside dialogs it stays visible. */
.modal-root:not(:empty) + .toast-region { z-index: 29; }

/* Fresh, lightly coloured surfaces keep the accounting screens easy to scan. */
body { background: radial-gradient(circle at 82% 0%, #e7f7f4 0, transparent 28%), linear-gradient(145deg, #f4f9fc 0%, #f0f6f9 58%, #f8fafc 100%); }
.topbar { background: linear-gradient(105deg, #ffffff 5%, #f4fbfc 100%); border-bottom-color: #dbe9ee; box-shadow: 0 2px 13px #194c6b0a; }
.panel { border-color: #dfe9ee; box-shadow: 0 6px 20px #2149610b, 0 1px 2px #173b5106; }
.stat-card { border-color: #dce8ee; background: linear-gradient(155deg, #ffffff 58%, #f8fcfd 100%); box-shadow: 0 7px 22px #1b4f650d, inset 0 1px 0 #fff; }
.stat-card:nth-child(4n + 2) { background: linear-gradient(155deg, #fff 56%, #f3fbf8); }
.stat-card:nth-child(4n + 3) { background: linear-gradient(155deg, #fff 56%, #f5f9ff); }
.stat-card:nth-child(4n + 4) { background: linear-gradient(155deg, #fff 56%, #f9f7ff); }
.button-primary { background: linear-gradient(145deg, #358be3, #236fc7); box-shadow: 0 6px 15px #2879d532, inset 0 1px 0 #ffffff53; }
.button-primary:hover:not(:disabled) { background: linear-gradient(145deg, #287fd6, #1c63b6); box-shadow: 0 8px 17px #216fcb40, inset 0 1px 0 #ffffff3b; }
.store-data-table [data-action="collect-store"] { color: #176c95; border: 1px solid #cce9e9; background: linear-gradient(145deg, #effbfa, #eaf5ff); box-shadow: 0 2px 5px #235d840d, inset 0 1px 0 #fff; }
.store-data-table [data-action="collect-store"]:hover:not(:disabled) { color: #0b5c86; border-color: #9bcedc; background: linear-gradient(145deg, #e5f7f4, #dceffd); }

/* Existing customer archives use one scroll area. Every selected detail field remains
   in normal document flow, with a compact information grid above a readable log. */
.modal-box.wide.customer-modal:has(#storeForm:not([data-id=""])) { height: min(860px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); }
.customer-modal:has(#storeForm:not([data-id=""])) .modal-header { padding: 11px 16px 10px; }
.customer-modal:has(#storeForm:not([data-id=""])) .modal-header h2 { font-size: 18px; line-height: 1.3; }
.customer-modal:has(#storeForm:not([data-id=""])) .modal-header p { margin-top: 2px; font-size: 12px; line-height: 1.4; }
.customer-modal:has(#storeForm:not([data-id=""])) .modal-close { width: 34px; height: 34px; flex: none; }
.customer-modal:has(#storeForm:not([data-id=""])) .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px; scrollbar-color: #bfd7e4 transparent; scrollbar-width: thin; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm { display: block; height: auto; min-height: 0; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section { margin: 0 0 12px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child { overflow: visible; padding: 10px 12px 12px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child > h3 { margin-bottom: 9px; padding-bottom: 7px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-field:has(#field_storeName),
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-field:has(#field_onlineStoreName) { grid-column: span 2; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-grid + .form-grid { margin-top: 8px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-grid:has(> #customMonthsWrap[hidden]) { display: none; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-field { gap: 3px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-field label { font-size: 12px; line-height: 1.3; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .control { height: 37px; padding-left: 10px; padding-right: 10px; font-size: 13px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .date-trigger { width: 35px; height: 35px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child textarea.control { height: auto; min-height: 68px; padding-top: 8px; padding-bottom: 8px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-hint { font-size: 11px; line-height: 1.3; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .photo-field { gap: 10px; padding: 5px 8px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .photo-field .store-avatar.large { width: 48px; height: 48px; font-size: 18px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .photo-actions .form-hint { font-size: 11px; line-height: 1.3; }
.customer-modal:has(#storeForm:not([data-id=""])) .photo-field-with-notes { display: grid; grid-template-columns: auto minmax(180px, 220px) minmax(0, 1fr); align-items: center; }
.customer-modal:has(#storeForm:not([data-id=""])) .photo-field-with-extras { display: grid; grid-template-columns: auto minmax(140px, 190px) minmax(0, 1fr); align-items: center; }
.customer-modal:has(#storeForm:not([data-id=""])) .photo-field-with-extras:has(.photo-due-days):has(.photo-inline-notes) { grid-template-columns: auto minmax(140px, 190px) auto minmax(0, 1fr); }
.customer-modal:has(#storeForm:not([data-id=""])) .photo-due-days { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.customer-modal:has(#storeForm:not([data-id=""])) .photo-due-days > span:first-child { color: #5f788d; font-size: 11px; font-weight: 700; }
.customer-modal:has(#storeForm:not([data-id=""])) .photo-due-days .due-days-pill { min-height: 22px; padding: 2px 7px; font-size: 11px; }
.customer-modal:has(#storeForm:not([data-id=""])) .photo-inline-notes { min-width: 0; }
.customer-modal:has(#storeForm:not([data-id=""])) .photo-inline-notes textarea.control { min-height: 62px; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:nth-child(2) { display: block; overflow: visible; min-height: 285px; padding: 11px 12px 12px; background: linear-gradient(160deg, #fff 65%, #f6fcfb); border-color: #cde6e5; }
.customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:nth-child(2) > h3 { margin-bottom: 6px; padding-bottom: 6px; }
.customer-modal:has(#storeForm:not([data-id=""])) #activityLog { display: block; min-height: 0; }
.customer-modal:has(#storeForm:not([data-id=""])) .detail-log { display: block; min-height: 0; }
.customer-modal:has(#storeForm:not([data-id=""])) .detail-log-head { justify-content: flex-end; min-height: 18px; margin-bottom: 6px; }
.customer-modal:has(#storeForm:not([data-id=""])) .detail-log-head h4 { display: none; }
.customer-modal:has(#storeForm:not([data-id=""])) .detail-log .table-scroll { min-height: 186px; overflow-x: auto; scrollbar-color: #c3dbe5 transparent; scrollbar-width: thin; }
.customer-modal:has(#storeForm:not([data-id=""])) .log-pager { margin-top: 5px; gap: 6px; }
.customer-modal:has(#storeForm:not([data-id=""])) .log-pager button { min-height: 27px; }
.customer-modal .detail-log-table { width: 100%; min-width: 0; table-layout: fixed; }
.customer-modal .detail-log-table th,
.customer-modal .detail-log-table td { padding: 10px 9px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; line-height: 1.45; }
.customer-modal .detail-log-table th { position: sticky; top: 0; z-index: 1; background: #eef8f8; color: #486b78; box-shadow: inset 0 -1px 0 #dce9ed; }
.customer-modal .detail-log-table th:first-child,
.customer-modal .detail-log-table td:first-child { width: 18%; font-variant-numeric: tabular-nums; }
.customer-modal .detail-log-table th:nth-child(2),
.customer-modal .detail-log-table td:nth-child(2) { width: 27%; }
.customer-modal .detail-log-table th:last-child,
.customer-modal .detail-log-table td:last-child { width: 12%; }
.customer-modal .detail-log-table tbody tr:nth-child(even) { background: #f9fcfd; }
.customer-modal .detail-log-table tbody tr:hover { background: #f0faf9; }
.customer-modal .detail-log-table td strong { color: #1d5370; }
.customer-modal .detail-log-table td .subline { display: block; margin-top: 3px; color: #71899a; white-space: normal; }
.customer-modal .detail-log-head h4 { color: #19576b; }
.customer-modal .log-pager button { border-color: #cfe2e9; box-shadow: 0 1px 3px #24526c0b; }
.customer-modal .detail-form .form-section > h3::before { background: linear-gradient(#53c9ba, #247fc2); }
.customer-modal .detail-form .form-section:first-child { background: linear-gradient(150deg, #ffffff 80%, #f7fcfd); }
.customer-modal .detail-form .control:focus { border-color: #72bfbf; box-shadow: 0 0 0 3px #3db6aa1c; }
.customer-modal .period-date-readonly .computed-field-output { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #245775; background: linear-gradient(115deg, #edf7f7, #f7fbfd); border-color: #cfe4e8; box-shadow: inset 3px 0 0 #76bfc1; font-weight: 750; font-variant-numeric: tabular-nums; cursor: default; }
.customer-modal .period-date-readonly .computed-field-output::after { content: "只读"; flex: none; border: 1px solid #c7e2e3; border-radius: 5px; padding: 1px 5px; color: #56828e; background: #ffffffb8; font-size: 10px; font-weight: 700; }
.customer-modal .period-date-readonly .form-hint { color: #6d8794; }

/* The receipt dialog gives received money, refund and dates a clear visual order. */
.modal-box:has(#collectForm) { border-color: #bdd9df; box-shadow: 0 30px 82px #0c385659, 0 3px 8px #1e61731c; }
.modal-box:has(#collectForm) .modal-header { background: linear-gradient(112deg, #e9f8f7, #f2f9ff 60%, #ffffff); border-bottom-color: #cfe6e9; }
.modal-box:has(#collectForm) .modal-header h2 { color: #145476; }
.modal-box:has(#collectForm) .modal-body { background: linear-gradient(160deg, #f2f9f9, #f6f9fd); }
#collectForm > .form-grid { border-color: #d0e5e8; box-shadow: 0 8px 19px #1b5d6f14, inset 0 1px 0 #fff; }
#collectForm > .form-grid > .form-field:has(#collectMode) { padding: 11px 12px; border: 1px solid #d3e7eb; border-radius: 10px; background: linear-gradient(115deg, #f3fbfa, #f8fcff); }
#collectForm > .form-grid > .form-field:has(#paidAmount),
#collectForm > .form-grid > .form-field:has(#paidRebate) { padding: 11px 12px; border: 1px solid #cae7e6; border-radius: 10px; background: linear-gradient(145deg, #f3fcf9, #fbfefe); box-shadow: inset 3px 0 0 #5cbcae; }
#collectForm > .form-grid > .form-field:has(#paidRebate) { border-color: #d5e1f0; background: linear-gradient(145deg, #f5f9ff, #fbfdff); box-shadow: inset 3px 0 0 #78a8e1; }
#collectForm #paidAmount,
#collectForm #paidRebate { color: #13577b; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; background: #fff; }
#collectForm > .form-section { border-color: #d3e6e9; background: linear-gradient(145deg, #ffffff, #f9fdfc); box-shadow: 0 7px 18px #1b5d6f0d; }
#collectForm > .form-section h3::before { background: linear-gradient(#52c4b6, #3087cc); }
.modal-box:has(#collectForm) .modal-footer { border-top-color: #cfe4e9; background: linear-gradient(180deg, #ffffff, #f3fbfb); }
.modal-box:has(#collectForm) .modal-footer .button-primary { min-width: 112px; }

@media (min-width: 701px) and (max-width: 840px) {
  .customer-modal .detail-log-table { min-width: 700px; }
  .customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .modal-box.wide.customer-modal:has(#storeForm:not([data-id=""])) { height: auto; max-height: calc(100dvh - 16px); }
  .customer-modal:has(#storeForm:not([data-id=""])) .modal-header { padding: 9px 12px; }
  .customer-modal:has(#storeForm:not([data-id=""])) .modal-body { overflow-y: auto; padding: 11px; }
  .customer-modal:has(#storeForm:not([data-id=""])) #storeForm { display: block; height: auto; }
  .customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child { overflow: visible; margin-bottom: 12px; }
  .customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-grid { grid-template-columns: minmax(0, 1fr); }
  .customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-field:has(#field_storeName),
  .customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:first-child .form-field:has(#field_onlineStoreName) { grid-column: auto; }
  .customer-modal:has(#storeForm:not([data-id=""])) .photo-field-with-notes,
  .customer-modal:has(#storeForm:not([data-id=""])) .photo-field-with-extras,
  .customer-modal:has(#storeForm:not([data-id=""])) .photo-field-with-extras:has(.photo-due-days):has(.photo-inline-notes) { grid-template-columns: auto minmax(0, 1fr); }
  .customer-modal:has(#storeForm:not([data-id=""])) .photo-field-with-extras:has(.photo-due-days) #photoPreview { grid-row: 1 / span 2; }
  .customer-modal:has(#storeForm:not([data-id=""])) .photo-field-with-extras:has(.photo-due-days) .photo-due-days { grid-column: 2; }
  .customer-modal:has(#storeForm:not([data-id=""])) .photo-inline-notes { grid-column: 1 / -1; }
  .customer-modal:has(#storeForm:not([data-id=""])) #storeForm > .form-section:nth-child(2) { display: block; overflow: visible; min-height: 305px; }
  .customer-modal:has(#storeForm:not([data-id=""])) #activityLog,
  .customer-modal:has(#storeForm:not([data-id=""])) .detail-log { display: block; min-height: 0; }
  .customer-modal:has(#storeForm:not([data-id=""])) .detail-log .table-scroll { max-height: none; overflow-x: auto; }
  .customer-modal .detail-log-table { min-width: 660px; }
  #collectForm > .form-grid > .form-field:has(#paidAmount),
  #collectForm > .form-grid > .form-field:has(#paidRebate) { padding: 9px; }
}

/* Headquarters sees the branch entrance and credentials as one readable card. */
.branch-list { gap: 14px; }
.branch-card { display: block; padding: 17px 18px 15px; border: 1px solid #d3e6eb; border-radius: 14px; background: linear-gradient(150deg, #ffffff 65%, #f3fafb); box-shadow: 0 7px 20px #184d6610, inset 0 1px 0 #fff; }
.branch-card-main > strong { display: block; margin-bottom: 11px; color: #165474; font-size: 16px; font-weight: 800; }
.branch-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 13px; }
.branch-overview > span { display: block; min-width: 0; min-height: 43px; padding: 9px 11px; border: 1px solid #dcebe9; border-radius: 9px; background: linear-gradient(145deg, #f6fcfa, #fbfefe); color: #4d6877; font-size: 12px; line-height: 1.4; }
.branch-overview > span:nth-child(2) { border-color: #dbe9f3; background: linear-gradient(145deg, #f5faff, #fcfdff); }
.branch-overview > span:nth-child(3) { border-color: #e6e7f2; background: linear-gradient(145deg, #f8f9ff, #fdfdff); }
.branch-overview b { color: #176b92; font-weight: 800; font-variant-numeric: tabular-nums; }
.branch-credentials { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(125px, .72fr) minmax(190px, 1fr); gap: 10px; }
.branch-credentials > label { display: grid; align-content: start; gap: 5px; min-width: 0; color: #496a7a; font-size: 12px; font-weight: 750; }
.branch-credentials .control { width: 100%; min-width: 0; height: 37px; border-color: #d3e5e9; color: #234b64; background: #f8fcfd; font-size: 12px; font-weight: 650; }
.branch-credentials .control:focus { background: #fff; border-color: #8cc7d4; }
.branch-credentials .branch-link { max-width: none; height: 37px; overflow: hidden; text-overflow: ellipsis; }
.branch-secret-line { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.branch-secret-line .branch-password { flex: 1 1 auto; }
.branch-secret-line .button { flex: none; padding-inline: 9px; min-height: 37px; }
.branch-card-actions { justify-content: flex-end; gap: 8px; padding-top: 12px; margin-top: 13px; border-top: 1px solid #dce9ed; }
.branch-card-actions .button { white-space: nowrap; }
@media (max-width: 1100px) {
  .branch-overview { grid-template-columns: 1fr 1fr; }
  .branch-overview > span:last-child { grid-column: 1 / -1; }
  .branch-credentials { grid-template-columns: 1fr 1fr; }
  .branch-credentials > label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .branch-card { padding: 14px; }
  .branch-card-main > strong { font-size: 15px; }
  .branch-overview { grid-template-columns: 1fr; gap: 6px; }
  .branch-overview > span:last-child { grid-column: auto; }
  .branch-credentials { grid-template-columns: minmax(0, 1fr); }
  .branch-credentials > label:first-child { grid-column: auto; }
  .branch-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .branch-card-actions .button { min-width: 0; white-space: normal; line-height: 1.25; }
}

/* Headquarters palette. A branch URL never receives hq-theme, so every branch
   keeps its existing colours even when the headquarters design changes. */
.hq-theme {
  --navy: #28185e;
  --navy-2: #362078;
  --blue: #6045d8;
  --blue-dark: #4b31bd;
  --blue-light: #eeeaff;
  --ink: #1d2945;
  --muted: #56647c;
  --line: #e2dff1;
  --page: #f6f4ff;
  --red: #c93e55;
  --red-light: #fff0f2;
  --green: #128b7b;
  --green-light: #e8f9f5;
  --stat-tint: #eeeaff;
  --stat-color: #5e44d3;
  --shadow: 0 16px 42px #36226c1c;
}
.hq-theme body { background: radial-gradient(circle at 82% 8%, #e8f9ff 0, transparent 28%), radial-gradient(circle at 4% 58%, #eee7ff 0, transparent 38%), #f6f5fc; color: #1d2945; }
.hq-theme .sidebar { background: linear-gradient(163deg, #382078 0%, #29205f 53%, #172b60 100%); border-right: 1px solid #6c58b9; box-shadow: 7px 0 28px #28196820, inset -1px 0 0 #ffffff1c; }
.hq-theme .sidebar .brand-mark { background: linear-gradient(145deg, #40daed, #5a69ec); border-color: #b7fbff8a; box-shadow: 0 7px 22px #14c8e06b, inset 0 1px 0 #ffffff9e; }
.hq-theme .sidebar .brand span,
.hq-theme .sidebar .sidebar-bottom { color: #d1cbf4; }
.hq-theme .sidebar .company-section-head,
.hq-theme .sidebar .sidebar-caption { color: #c1b9ec; }
.hq-theme .sidebar .company-workspace.expanded { background: linear-gradient(145deg, #ffffff19, #5c42d21a); border-color: #b8abff4d; }
.hq-theme .sidebar .company-workspace.active { border-color: #8beeff82; box-shadow: 0 8px 21px #100b3e45, inset 3px 0 0 #56d9ee; }
.hq-theme .sidebar .company-row.active { background: linear-gradient(90deg, #9c89ff3e, #ffffff0d); }
.hq-theme .sidebar .company-initial { background: linear-gradient(145deg, #5e4aab, #3a367f); color: #fff; }
.hq-theme .sidebar .company-row.active .company-initial { background: linear-gradient(145deg, #5bd9ed, #6c53dc); border-color: #b7f4ff; color: #fff; }
.hq-theme .sidebar .company-select,
.hq-theme .sidebar .company-nav-item,
.hq-theme .sidebar .nav-item { color: #dad4f6; }
.hq-theme .sidebar .company-select:hover,
.hq-theme .sidebar .company-nav-item:hover,
.hq-theme .sidebar .nav-item:hover { color: #fff; background: #ffffff1c; }
.hq-theme .sidebar .company-nav-item.active,
.hq-theme .sidebar .nav-item.active { color: #fff; background: linear-gradient(105deg, #704de0, #4f56d6); border-color: #aca2ff7d; box-shadow: 0 5px 15px #180b685c, inset 0 1px 0 #ffffff57; }
.hq-theme .sidebar .company-nav { border-left-color: #a6a2e58a; }
.hq-theme .sidebar .company-due-count,
.hq-theme .sidebar .nav-count { background: #ce4365; }
.hq-theme .topbar:not(.has-custom-background):not([data-custom-background]) { background: linear-gradient(110deg, #fff 8%, #f2eeff 68%, #eafaff); border-bottom-color: #d9d0f5; box-shadow: 0 4px 18px #513e8c14; }
.hq-theme .date-display { border-color: #d8cef4; background: linear-gradient(145deg, #fff, #f1ecff); color: #3c3476; }
.hq-theme .date-icon { background: linear-gradient(145deg, #7961eb, #4c43c2); box-shadow: 0 4px 11px #6045d85b; }
.hq-theme .icon-button { border-color: #d9d0f0; color: #5546a3; background: #fff; }
.hq-theme .icon-button:hover { color: #4430aa; background: #efebff; }
.hq-theme .top-account { color: #433d71; }
.hq-theme .page-title h1 { color: #201b4c; }
.hq-theme .page-company { color: #5133b8; background: #ece7ff; border-color: #d2c7fa; }
.hq-theme .demo-banner { color: #41368d; background: linear-gradient(110deg, #ede9ff, #eafaff); border-color: #d1cafa; }
.hq-theme .demo-banner strong,
.hq-theme .demo-banner button { color: #4430a5; }
.hq-theme .button-primary { color: #fff; background: linear-gradient(135deg, #7353e3, #5135c3); box-shadow: 0 6px 15px #5537c63d, inset 0 1px 0 #ffffff5c; }
.hq-theme .button-primary:hover:not(:disabled) { color: #fff; background: linear-gradient(135deg, #6245d7, #4025aa); box-shadow: 0 8px 18px #5131bb57; }
.hq-theme .button-outline { color: #483686; border-color: #d4cbec; background: #fff; }
.hq-theme .button-outline:hover:not(:disabled) { border-color: #a998e2; background: #f5f1ff; }
.hq-theme .button-soft { color: #4c34b1; background: #eeeaff; }
.hq-theme .button-soft:hover:not(:disabled) { background: #e0d9ff; }
.hq-theme .button-text,
.hq-theme .section-link { color: #4c31b3; }
.hq-theme .panel { border-color: #dfdbef; background: #fff; box-shadow: 0 7px 24px #3e318616, 0 1px 3px #35275b0c; }
.hq-theme .panel-head h2,
.hq-theme .settings-panel h2 { color: #292359; }
.hq-theme .stat-card { border-color: #ddd7f2; background: linear-gradient(150deg, #fff 54%, #f6f2ff); color: #1e2946; box-shadow: inset 0 3px 0 var(--stat-color), 0 8px 22px #3e318318; }
.hq-theme .stat-card:nth-child(4n + 2) { background: linear-gradient(150deg, #fff 54%, #f0fbfd); }
.hq-theme .stat-card:nth-child(4n + 3) { background: linear-gradient(150deg, #fff 54%, #fff5f1); }
.hq-theme .stat-card:nth-child(4n + 4) { background: linear-gradient(150deg, #fff 54%, #f0f9f5); }
.hq-theme .stat-card:hover { border-color: #a69ae6; box-shadow: inset 0 3px 0 var(--stat-color), 0 15px 32px #3e31842c; }
.hq-theme .stat-card .stat-icon { box-shadow: inset 0 1px 0 #fff9; }
.hq-theme .stat-label { color: #4e5971; }
.hq-theme .stat-value { color: #22284e; }
.hq-theme .stat-note,
.hq-theme .mini-metric .small-title,
.hq-theme .mini-metric p { color: #5f6d83; }
.hq-theme .chart-bar { background: #d9d2fa; }
.hq-theme .chart-item.current .chart-bar { background: linear-gradient(180deg, #5ad8e7, #6349d8); }
.hq-theme .chart-item.current .chart-amount { color: #4c32b8; }
.hq-theme .mix-track { background: #ece9f6; }
.hq-theme .mix-row:first-child .mix-fill { background: #6447d8; }
.hq-theme .store-avatar { background: #eeeaff; color: #543bb3; }
.hq-theme .urgent-row,
.hq-theme .recent-row { border-top-color: #ece9f6; }
.hq-theme .control { border-color: #d6d2e8; color: #202c48; background: #fff; }
.hq-theme .control:focus { border-color: #8d78dc; box-shadow: 0 0 0 3px #684fdb27; }
.hq-theme .filter-chip { color: #4b5875; border-color: #d8d3e9; background: #fff; }
.hq-theme .filter-chip.active { color: #4b30ad; border-color: #a998e5; background: #eee9ff; }
.hq-theme .data-table th { color: #354264; border-bottom-color: #dcd8ee; background: #f0edfc; }
.hq-theme .data-table td { color: #25314d; border-bottom-color: #ebe8f4; }
.hq-theme .data-table tbody tr:nth-child(even) { background: #fdfcff; }
.hq-theme .data-table tbody tr:hover { background: #f4f0ff; }
.hq-theme .store-data-table th:last-child { background: #f0edfc; }
.hq-theme .store-data-table td:last-child { background: #fff; }
.hq-theme .store-data-table tbody tr:nth-child(even) td:last-child { background: #fdfcff; }
.hq-theme .store-data-table tbody tr:hover td:last-child,
.hq-theme .store-data-table tbody tr:has(.store-check:checked) td:last-child { background: #f4f0ff; }
.hq-theme .store-data-table tbody tr:has(.store-check:checked) { background: #f4f0ff; }
.hq-theme .store-data-table .table-name-link { color: #26316a; }
.hq-theme .store-data-table .table-name-link:hover { color: #5136c3; }
.hq-theme .store-data-table .column-sort:hover,
.hq-theme .store-data-table .column-sort[aria-sort]:not([aria-sort="none"]) { color: #4c31b9; }
.hq-theme .store-data-table .column-menu-button { background: #e3def7; color: #554792; }
.hq-theme .store-data-table .column-menu-button:hover,
.hq-theme .store-data-table .column-menu-button[aria-expanded="true"] { color: #4730aa; background: #d3c9fa; }
.hq-theme .store-data-table .column-menu-button.filtered { color: #fff; background: #6346d0; }
.hq-theme .store-data-table .sort-direction,
.hq-theme .store-data-table .column-sort .sort-indicator { color: #5c41c7; }
.hq-theme .column-popover { border-color: #cfc7ed; color: #273353; box-shadow: 0 18px 40px #2e226d38; }
.hq-theme .column-popover .filter-option:hover,
.hq-theme .column-popover .filter-option.active,
.hq-theme .column-popover .filter-option[aria-selected="true"] { background: #f0ebff; color: #4a30aa; }
.hq-theme .store-month-summary,
.hq-theme .payment-period-summary { border-color: #d6cafa; background: linear-gradient(110deg, #f0ebff, #f4fbff); color: #453b77; }
.hq-theme .store-month-summary strong,
.hq-theme .payment-summary-period { color: #292356; }
.hq-theme .store-month-summary span b,
.hq-theme .payment-period-summary span strong { color: #4b30b7; }
.hq-theme .payment-toolbar { border-color: #ddd5f4; background: linear-gradient(145deg, #fbf9ff, #f1faff); }
.hq-theme .reminder-card { border-color: #e0daf0; box-shadow: 0 5px 16px #37237110; }
.hq-theme .reminder-widget { border-color: #d7cff3; box-shadow: 0 20px 55px #30216438; }
.hq-theme .reminder-widget .widget-head { background: linear-gradient(105deg, #39207d, #5741bd); }
.hq-theme .reminder-widget.is-nudging .widget-head { background: linear-gradient(105deg, #7d356f, #e05f86 62%, #fa8876); }
.hq-theme .widget-footer { color: #4b31b4; background: #f2eeff; border-top-color: #e3dcfa; }
.hq-theme .field-row { border-color: #e5e0f2; background: #fdfcff; }
.hq-theme .branch-card { border-color: #d8d0ee; background: linear-gradient(150deg, #fff 62%, #f7f3ff); }
.hq-theme .branch-overview > span { border-color: #e1daf5; background: #f8f6ff; }
.hq-theme .branch-overview b { color: #4d35b3; }
.hq-theme .auth-root:not(:empty) { background: radial-gradient(circle at 78% 12%, #64ddeb8a 0, transparent 27%), linear-gradient(145deg, #27165f 0%, #4c37a3 44%, #f2efff 44.1%, #f9f8ff 100%); }
.hq-theme .auth-card { border-color: #d8cff2; box-shadow: 0 26px 70px #27175b52; }
.hq-theme .auth-card h1,
.hq-theme .auth-card h2 { color: #292056; }
.hq-theme .modal-backdrop { background: #20155291; }
.hq-theme .modal-box { border: 1px solid #d6ccef; box-shadow: 0 30px 80px #2113575c; }
.hq-theme .modal-header,
.hq-theme .customer-modal .modal-header,
.hq-theme .modal-box:has(#collectForm) .modal-header { background: linear-gradient(110deg, #ece7ff, #f5f2ff 60%, #fff); border-bottom-color: #ddd4f4; }
.hq-theme .modal-header h2,
.hq-theme .customer-modal .modal-header h2,
.hq-theme .modal-box:has(#collectForm) .modal-header h2 { color: #34266c; }
.hq-theme .customer-modal .modal-body,
.hq-theme .modal-box:has(#collectForm) .modal-body { background: #f8f6ff; }
.hq-theme .customer-modal .detail-form .form-section,
.hq-theme #collectForm > .form-grid,
.hq-theme #collectForm > .form-section { border-color: #e0d8f4; box-shadow: 0 6px 18px #432a8913; }
.hq-theme .customer-modal .detail-form .form-section > h3::before,
.hq-theme #collectForm > .form-section h3::before { background: linear-gradient(#5bd2e6, #694bda); }
.hq-theme .customer-modal .detail-log-table th { background: #eeebfa; color: #41446c; }
.hq-theme .customer-modal .detail-log-table td { color: #273451; }
.hq-theme .customer-modal .period-date-readonly .computed-field-output { color: #493c8a; background: #f2efff; border-color: #dcd4f4; box-shadow: inset 3px 0 0 #8c78dd; }
.hq-theme .modal-footer,
.hq-theme .customer-modal .modal-footer,
.hq-theme .modal-box:has(#collectForm) .modal-footer { background: linear-gradient(180deg, #fff, #f8f6ff); border-top-color: #e0d9f1; }
.hq-theme .toast { background: #36237a; }
.hq-theme .toast.error { background: #ad3652; }
.hq-theme .toast.success { background: #087d77; }
@media (max-width: 700px) {
  .hq-theme .mobile-nav { border-top-color: #d9d0ee; background: #fbfaff; box-shadow: 0 -9px 25px #34257625; }
  .hq-theme .mobile-nav button { color: #68718c; }
  .hq-theme .mobile-nav button.active { color: #4c32ba; }
  .hq-theme .mobile-brand-mark { background: linear-gradient(145deg, #6d50df, #4c3dbb); box-shadow: 0 3px 8px #5d42cb42; }
  .hq-theme .mobile-company-switch > svg { color: #55479b; }
}
