:root {
  --ink: #19211d;
  --muted: #66716b;
  --line: #dce2de;
  --soft: #f4f6f4;
  --panel: #ffffff;
  --green: #176b45;
  --green-soft: #eaf5ef;
  --amber: #9a5b08;
  --amber-soft: #fff4df;
  --red: #a63232;
  --red-soft: #fff0ef;
  --blue: #255ca8;
  --shadow: 0 16px 38px rgba(29, 44, 36, .12);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #eef1ef; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 14px; letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; cursor: pointer; }
button:hover { border-color: #abb7b0; background: #f8faf8; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { color: #fff; border-color: var(--green); background: var(--green); }
button.danger { color: #fff; border-color: var(--red); background: var(--red); }
input, select { width: 100%; height: 38px; border: 1px solid #cfd7d2; border-radius: 4px; padding: 0 10px; color: var(--ink); background: #fff; }
input:focus, select:focus { border-color: var(--green); outline: 2px solid rgba(23,107,69,.12); }
.hidden { display: none !important; }

/* New merchant management mirrors the production admin information architecture. */
.merchant-page { margin: 0; overflow-x: hidden; border-top: 4px solid #1f73c9; background: #f5f6f8; color: #202327; }
.merchant-shell { width: 100%; min-height: calc(100vh - 4px); display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.merchant-sidebar { position: sticky; top: 0; height: calc(100vh - 4px); overflow-y: auto; border-right: 1px solid #dde2e8; background: #fff; }
.merchant-brand { min-height: 66px; display: flex; align-items: center; gap: 11px; padding: 0 18px; border-bottom: 1px solid #edf0f4; }
.merchant-brand strong { font-size: 15px; white-space: nowrap; }
.merchant-brand-icon { width: 20px; height: 20px; display: grid; grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 3px; flex: 0 0 auto; }
.merchant-brand-icon i { background: #5e6368; }
.merchant-sidebar nav { display: grid; padding: 10px 0 24px; }
.merchant-sidebar nav a, .merchant-nav-item { min-height: 46px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 18px; color: #2f3439; text-decoration: none; }
.merchant-sidebar nav a:hover { background: #f4f7fb; }
.merchant-sidebar nav a.active { color: #1d67b3; background: #eaf2fd; font-weight: 700; }
.merchant-nav-item { color: #42474c; }
.merchant-nav-icon { width: 24px; color: #686d72; text-align: center; font-size: 12px; font-weight: 700; }
.merchant-nav-label { min-width: 0; display: flex; align-items: baseline; column-gap: 2px; flex-wrap: wrap; line-height: 1.35; }
.merchant-nav-status { color: #8a929a; font-size: 11px; white-space: nowrap; }
.merchant-sidebar nav a.active .merchant-nav-icon { color: #1f73c9; }
.merchant-sidebar nav b { min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; border-radius: 11px; color: #fff; background: #df3030; font-size: 11px; }
.merchant-main { min-width: 0; padding: 28px clamp(24px, 2.5vw, 42px) 50px; }
.merchant-header { min-height: 82px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.merchant-title { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.merchant-title-icon { width: 28px; height: 28px; display: grid; place-items: center; margin-top: 2px; border-radius: 4px; color: #fff; background: #1f73c9; font-size: 13px; font-weight: 800; }
.merchant-header h1 { margin: 0 0 10px; font-size: 30px; }
.merchant-header p { margin: 0; color: #747b84; font-size: 14px; }
.merchant-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.merchant-actions button { border-color: #94bde9; color: #1f69b7; }
.merchant-actions .merchant-materials-trigger { display: inline-flex; align-items: center; gap: 7px; }
.merchant-materials-trigger svg { width: 17px; height: 17px; }
.merchant-actions button.primary { color: #fff; border-color: #1f73c9; background: #1f73c9; box-shadow: 0 2px 5px rgba(31, 92, 157, .22); }
.access-settings-main { max-width: 1640px; width: 100%; }
.access-settings-header { align-items: center; }
.access-current-user { min-width: 170px; display: grid; gap: 5px; padding: 10px 14px; border-left: 3px solid #1f73c9; background: #eef5fd; }
.access-current-user span { color: #6f7984; font-size: 11px; }
.access-current-user strong { color: #29333d; font-size: 14px; }
.access-settings-section { margin-top: 18px; border: 1px solid #dce1e7; border-radius: 7px; background: #fff; box-shadow: 0 1px 3px rgba(25, 38, 52, .08); }
.access-section-heading { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 22px; border-bottom: 1px solid #e5e9ee; }
.access-section-heading h2 { margin: 0; font-size: 18px; }
.access-section-heading p { margin: 6px 0 0; color: #747e88; font-size: 12px; }
.access-security-note { padding: 7px 10px; border: 1px solid #d8e5f2; border-radius: 4px; color: #316695; background: #f5f9fd; font-size: 11px; white-space: nowrap; }
.access-password-form { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)) auto; align-items: end; gap: 12px; padding: 18px 22px 4px; }
.access-password-form label { min-width: 0; display: grid; gap: 7px; color: #59636e; font-size: 12px; font-weight: 650; }
.access-password-form input, .access-password-form button { height: 41px; }
.access-new-user { padding: 18px 22px 4px; }
.access-new-user fieldset { min-height: 0; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(340px, 1.5fr) minmax(170px, 1fr) auto auto; align-items: end; gap: 12px; padding: 15px; border-color: #dbe3ec; background: #f8fafc; }
.access-new-user label, .access-role-field { min-width: 0; display: grid; gap: 7px; color: #59636e !important; font-size: 12px; font-weight: 650; }
.access-new-user input, .access-new-user select { height: 41px; }
.access-account-role-choices { min-height: 41px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 13px; padding: 7px 10px; border: 1px solid #cbd4dd; border-radius: 4px; background: #fff; }
.access-account-role-choices label { display: inline-flex; align-items: center; gap: 5px; color: #3f4953 !important; font-size: 12px; font-weight: 500; white-space: nowrap; }
.access-account-role-choices input { width: 15px; height: 15px; margin: 0; }
.access-new-user .access-active-choice { min-height: 41px; display: flex; align-items: center; gap: 8px; padding: 0 6px; white-space: nowrap; }
.access-active-choice input { width: 17px; height: 17px; margin: 0; }
.access-new-user button { min-height: 41px; }
.access-form-error { min-height: 20px; margin: 4px 22px 8px; color: #bd2f2f; font-size: 12px; }
.access-user-table-wrap { overflow-x: auto; }
.access-user-table { width: 100%; min-width: 940px; border-collapse: collapse; }
.access-user-table th { padding: 13px 16px; color: #4b5560; background: #f7f9fb; text-align: left; font-size: 12px; }
.access-user-table td { padding: 13px 16px; border-top: 1px solid #e8ecf0; }
.access-user-table td:first-child strong { display: block; font-size: 13px; }
.access-user-table td:first-child span { display: block; margin-top: 4px; color: #2773bd; font-size: 10px; }
.access-user-table select, .access-user-table input { height: 38px; }
.access-user-role-choices { min-width: 280px; padding: 6px 8px; }
.access-user-role-choices input { height: 15px; }
.access-user-table button { color: #176fc8; border-color: #8bb8e6; font-weight: 650; }
.access-status-toggle { display: flex; align-items: center; gap: 8px; color: #4b5660; white-space: nowrap; }
.access-status-toggle input { width: 17px; height: 17px; }
.access-role-permissions { display: grid; }
.access-role-row { display: grid; grid-template-columns: 140px minmax(0, 1.5fr) minmax(300px, .7fr); gap: 16px; align-items: stretch; padding: 18px 22px; border-top: 1px solid #e8ecf0; }
.access-role-row:first-child { border-top: 0; }
.access-role-row > header { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding-right: 14px; border-right: 1px solid #e2e7ec; }
.access-role-row > header strong { font-size: 16px; }
.access-role-row > header span { color: #7b848d; font-size: 11px; line-height: 1.5; }
.access-role-row fieldset { min-height: 0; display: block; padding: 10px 12px 12px; border-color: #dfe5eb; background: #fafbfc; }
.access-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)); gap: 8px 10px; }
.access-detail-choice-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
.access-choice-grid label { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 5px 2px; color: #3f4953 !important; font-size: 12px; }
.access-choice-grid input { width: 16px; height: 16px; margin: 0; }
.access-choice-grid input:disabled + span { color: #7a838d; }
.access-save-row { display: flex; justify-content: flex-end; padding: 16px 22px 22px; border-top: 1px solid #e8ecf0; }
.access-save-row button { min-height: 41px; }
.access-settings-fatal { width: min(520px, calc(100vw - 32px)); display: grid; gap: 10px; margin: 90px auto; padding: 26px; border: 1px solid #e1e6eb; border-radius: 7px; background: #fff; box-shadow: 0 12px 30px rgba(28, 39, 50, .12); }
.access-settings-fatal strong { font-size: 18px; }
.access-settings-fatal span { color: #69737d; }
.access-settings-fatal a { width: fit-content; margin-top: 6px; color: #176fc8; }
.sync-state { margin: 5px 0 0; color: #858b92; font-size: 12px; }
.merchant-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.merchant-stat { min-height: 122px; padding: 21px 22px; border: 1px solid #dbe2ea; border-radius: 7px; background: #fff; box-shadow: 0 1px 3px rgba(25, 38, 52, .08); }
.merchant-stat span { display: block; color: #5f6670; font-size: 13px; font-weight: 650; }
.merchant-stat strong { display: block; margin-top: 8px; font-size: 27px; }
.merchant-stat p { margin: 12px 0 0; color: #747b84; font-size: 12px; }
.merchant-stat p.sync-failed { color: #b3312d; font-weight: 650; }
.merchant-stat-blue { background: #f7faff; }
.merchant-stat-blue strong { color: #2373ce; }
.merchant-stat-teal { background: #f5fbfa; }
.merchant-stat-teal strong { color: #0b8878; }
.merchant-stat-green { background: #f7fbf8; }
.merchant-stat-green strong { color: #18a04c; }
.merchant-stat-purple { background: #fbf8fd; }
.merchant-stat-purple strong { color: #8739a8; }
.merchant-stat-orange { background: #fffaf7; }
.merchant-stat-orange strong { color: #ec6500; }
.merchant-list-section { margin-top: 18px; overflow: hidden; border: 1px solid #dce1e7; border-radius: 7px; background: #fff; box-shadow: 0 1px 3px rgba(25, 38, 52, .08); }
.merchant-section-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 22px; border-bottom: 1px solid #edf0f4; }
.merchant-section-heading .sync-state { margin: 0; }
.merchant-directory-controls { padding: 20px 22px 0; background: #fff; }
.merchant-filter-grid { display: grid; grid-template-columns: minmax(180px, 1.15fr) minmax(125px, .7fr) minmax(125px, .75fr) minmax(120px, .7fr) minmax(125px, .8fr) minmax(125px, .8fr) 104px; align-items: center; gap: 8px; }
.merchant-filter-grid label { min-width: 0; }
.merchant-filter-grid input, .merchant-filter-grid select { height: 44px; border-color: #d6dde7; border-radius: 5px; color: #3f4751; background-color: #fff; }
.merchant-filter-grid input::placeholder { color: #7a8390; }
.merchant-filter-date { position: relative; }
.merchant-filter-date span { position: absolute; z-index: 1; top: -7px; left: 9px; padding: 0 4px; color: #66717e; background: #fff; font-size: 10px; line-height: 14px; }
.merchant-filter-date input { width: 100%; }
.merchant-filter-submit { min-height: 44px; border-color: #0878ef; color: #fff; background: #0878ef; font-weight: 700; }
.merchant-filter-submit:hover { border-color: #006cdb; color: #fff; background: #006cdb; }
.merchant-stage-tabs { display: grid; grid-template-columns: repeat(var(--merchant-stage-columns, 6), minmax(145px, 1fr)); grid-auto-rows: 52px; column-gap: 10px; margin-top: 19px; padding: 5px 8px 6px; overflow-x: auto; overflow-y: hidden; border-top: 1px solid #e7ebf0; border-bottom: 1px solid #dfe5ec; background: #fafbfc; scrollbar-width: thin; }
.merchant-stage-tabs button { width: 100%; min-width: 0; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-bottom: 1px solid #e8edf2; border-radius: 4px 4px 0 0; padding: 0 12px; color: #323941; background: transparent; white-space: nowrap; }
.merchant-stage-tabs button:hover { background: #f1f5f9; }
.merchant-stage-tabs button.active { color: #0878ef; background: #eef6ff; box-shadow: inset 0 -3px #0878ef; font-weight: 700; }
.merchant-stage-tabs button span { min-width: 25px; height: 20px; display: grid; place-items: center; padding: 0 7px; border-radius: 999px; color: #b85a00; background: #fff1df; box-shadow: inset 0 0 0 1px #ffddb2; font-size: 11px; font-weight: 700; line-height: 20px; }
.merchant-stage-tabs button.huifu-alert,
.merchant-stage-tabs button.deposit-alert,
.merchant-stage-tabs button.finance-alert,
.merchant-stage-tabs button.cashier-alert,
.merchant-stage-tabs button.provider-alert { color: #d83232; }
.merchant-stage-tabs button.reminder-alert { color: #b62929; }
.merchant-stage-tabs button.huifu-alert.active,
.merchant-stage-tabs button.deposit-alert.active,
.merchant-stage-tabs button.finance-alert.active,
.merchant-stage-tabs button.cashier-alert.active,
.merchant-stage-tabs button.provider-alert.active { color: #c82020; box-shadow: inset 0 -3px #d83232; }
.merchant-stage-tabs button.reminder-alert.active { color: #a91f1f; background: #fff4f4; box-shadow: inset 0 -3px #cf3030; }
.merchant-stage-tabs button.huifu-alert span,
.merchant-stage-tabs button.deposit-alert span,
.merchant-stage-tabs button.finance-alert span,
.merchant-stage-tabs button.cashier-alert span,
.merchant-stage-tabs button.provider-alert span { color: #c82b2b; background: #fff0f0; box-shadow: inset 0 0 0 1px #ffd0d0; }
.merchant-stage-tabs button.reminder-alert span { color: #b72828; background: #fff0f0; box-shadow: inset 0 0 0 1px #ffcaca; }
.merchant-stage-tabs button.closed-stores { color: #3f4751; }
.merchant-stage-tabs button.closed-stores.active { color: #343b44; background: #f2f4f6; box-shadow: inset 0 -3px #4b5563; }
.merchant-stage-tabs button.closed-stores span { color: #3f4751; background: #f1f3f5; box-shadow: inset 0 0 0 1px #cfd5dc; }
.merchant-stage-tabs button.expiry-alert { color: #168bd2; }
.merchant-stage-tabs button.expiry-alert.active { color: #087fc4; box-shadow: inset 0 -3px #2aa8e8; }
.merchant-stage-tabs button.expiry-alert span { color: #087fc4; background: #eaf7ff; box-shadow: inset 0 0 0 1px #bfe8ff; }
.merchant-stage-tabs button.opening-completed { color: #18743a; }
.merchant-stage-tabs button.opening-completed.active { color: #126531; box-shadow: inset 0 -3px #26944c; }
.merchant-stage-tabs button.opening-completed span { color: #18743a; background: #eaf8ef; box-shadow: inset 0 0 0 1px #bfe7cc; }
.merchant-table-wrap { position: relative; min-height: 280px; overflow-x: auto; background: #fff; }
.merchant-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.merchant-table th { position: relative; padding: 16px 18px 16px 14px; color: #323941; background: #f7f9fb; text-align: left; font-size: 12px; font-weight: 700; white-space: nowrap; }
.merchant-table td { max-width: 220px; padding: 20px 14px; border-top: 1px solid #e9edf2; color: #555d66; font-size: 12px; vertical-align: middle; overflow-wrap: anywhere; }
.merchant-table td strong, .merchant-table td span, .merchant-table td small { display: block; }
.merchant-table td strong { color: #23272b; font-size: 13px; }
.merchant-table td strong + span, .merchant-table td > span + small, .merchant-table td > strong + span { margin-top: 5px; color: #7a8189; }
.merchant-identity { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; }
.merchant-avatar { width: 36px; height: 36px; display: grid !important; place-items: center; border-radius: 50%; color: #fff !important; background: #ef6c00; font-weight: 750; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04); }
.merchant-avatar.tone-1 { background: #7b1fa2; }
.merchant-avatar.tone-2 { background: #087f8c; }
.merchant-avatar.tone-3 { background: #2874c3; }
.merchant-avatar.tone-4 { background: #c53f78; }
.merchant-status, .merchant-stage { display: inline-block !important; width: fit-content; padding: 4px 7px; border-radius: 4px; background: #eef1f4; color: #59616a; }
.merchant-status.success { color: #167a3c; background: #e9f7ed; }
.merchant-status.warning { color: #985c00; background: #fff2da; }
.merchant-status.danger { color: #b22a2a; background: #fff0ef; }
.merchant-stage { color: #2369a9; background: #eaf3fc; }
.merchant-directory-table { min-width: 1580px; }
.merchant-directory-table th:nth-child(1) { width: 260px; }
.merchant-directory-table th:nth-child(2) { width: 190px; }
.merchant-directory-table th:nth-child(3) { width: 190px; }
.merchant-directory-table th:nth-child(4) { width: 220px; }
.merchant-directory-table th:nth-child(5) { width: 200px; }
.merchant-directory-table th:nth-child(6) { width: 230px; }
.merchant-version { display: inline-block !important; width: fit-content; max-width: 100%; margin-bottom: 7px; padding: 4px 7px; border-radius: 4px; color: #8a4f00; background: #fff1d8; font-weight: 700; }
.merchant-mini-progress { width: 145px; max-width: 100%; height: 5px; display: block; margin-top: 9px; overflow: hidden; border-radius: 3px; background: #e6e9ee; }
.merchant-mini-progress i { display: block; height: 100%; border-radius: inherit; background: #2874c3; }
.merchant-config-flags { display: flex; align-items: flex-start; gap: 5px; flex-wrap: wrap; }
.merchant-config-flags span { display: inline-block; width: fit-content; padding: 4px 6px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.merchant-config-flags .on { color: #176b45; background: #e9f6ef; }
.merchant-config-flags .off { color: #6d747c; background: #edf0f2; }
.merchant-config-flags .pending { color: #965c0a; background: #fff3df; }
.merchant-source-label { display: inline-block !important; width: fit-content; padding: 5px 7px; border-radius: 4px; color: #53606b; background: #eef1f3; white-space: nowrap; }
.merchant-information-table { min-width: 1870px; table-layout: fixed; }
.merchant-information-table th:nth-child(1) { width: 110px; }
.merchant-information-table th:nth-child(2) { width: 245px; }
.merchant-information-table th:nth-child(3) { width: 280px; }
.merchant-information-table th:nth-child(4) { width: 240px; }
.merchant-information-table th:nth-child(5), .merchant-information-table th:nth-child(6), .merchant-information-table th:nth-child(7) { width: 125px; }
.merchant-information-table th:nth-child(8) { width: 175px; }
.merchant-information-table th:nth-child(9) { width: 150px; }
.merchant-information-table th:nth-child(10) { width: 230px; }
.merchant-information-table td { max-width: none; }
.merchant-information-table tr.merchant-closed-row td { background: #fafafa; }
.merchant-information-table tr.merchant-closed-row .merchant-avatar { filter: grayscale(.75); opacity: .8; }
.merchant-column-resizer { position: absolute; top: 0; right: -5px; z-index: 3; width: 10px; height: 100%; cursor: col-resize; touch-action: none; outline: 0; }
.merchant-column-resizer::after { content: ""; position: absolute; top: 22%; bottom: 22%; left: 4px; width: 2px; border-radius: 1px; background: #d6dce4; }
.merchant-column-resizer:hover::after, .merchant-column-resizer:focus-visible::after { background: #2680d9; }
.merchant-column-resizing { cursor: col-resize !important; user-select: none !important; }
.merchant-column-resizing * { cursor: col-resize !important; }
.merchant-id-value { color: #7a8189 !important; font-size: 12px !important; font-weight: 400; white-space: nowrap; }
.merchant-service-profile { display: grid; justify-items: start; gap: 8px; }
.merchant-service-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.merchant-service-tag { display: inline-block !important; width: fit-content; padding: 5px 10px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.merchant-service-tag.trial { color: #0f766e; background: #dff6f3; }
.merchant-service-tag.base { color: #0878c8; background: #e6f5ff; }
.merchant-service-tag.material { color: #e76000; background: #fff0dc; }
.merchant-service-tag.private { color: #9233a6; background: #f7e9fa; }
.merchant-service-tag.shared { color: #d60068; background: #ffe8f2; }
.merchant-service-tag.independent { color: #fff; background: #ed0b79; }
.merchant-service-tag.sync { color: #23603e; background: #e6f4ea; }
.merchant-service-tag.alliance { color: #72520b; background: #fff3c4; }
.merchant-service-tag.pending { color: #717b87; background: #eff2f5; }
.merchant-service-paid { color: #4f5965; font-weight: 700; }
.merchant-risk-cell { display: grid; gap: 10px; align-content: start; }
.merchant-opening-progress { --opening-progress-color: #1683d8; width: 100%; min-width: 190px; display: grid; gap: 6px; }
.merchant-opening-progress.pending { --opening-progress-color: #768291; }
.merchant-opening-progress.waiting { --opening-progress-color: #d97706; }
.merchant-opening-progress.failed { --opening-progress-color: #d83232; }
.merchant-opening-progress.completed { --opening-progress-color: #26944c; }
.merchant-opening-progress-heading { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; color: #3f4852; }
.merchant-opening-progress-heading > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-opening-progress-heading > strong { flex: 0 0 auto; color: var(--opening-progress-color) !important; font-size: 12px !important; }
.merchant-opening-progress-track { width: 100%; height: 8px; overflow: hidden; border-radius: 4px; background: #e4e9ef; }
.merchant-opening-progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--opening-progress-color); transition: width .25s ease; }
.merchant-opening-progress > small { color: #7a8491; }
.merchant-risks { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
.merchant-risk { display: inline-block !important; width: fit-content; padding: 5px 10px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.merchant-risk.danger { color: #fff; background: #d83232; }
.merchant-risk.warning { color: #fff; background: #ef6500; }
.merchant-risk.neutral { color: #717b87; background: #eff2f5; }
.merchant-risk.success { color: #167a3c; background: #e9f7ed; }
.merchant-risk.progress { color: #0878b8; background: #e5f5ff; }
.merchant-risk[title] { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.merchant-unlinked { color: #8a929b; }
.merchant-ownership, .merchant-referrer { display: grid; gap: 7px; }
.merchant-referrer > strong { font-weight: 400; }
.merchant-ownership span, .merchant-referrer span, .merchant-referrer small { color: #7a8491; }
.merchant-row-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.merchant-icon-action { width: 34px; min-width: 34px; height: 34px; min-height: 34px; display: grid; place-items: center; padding: 0; border: 0; color: #0878ef; background: transparent; text-decoration: none; font-size: 19px; font-weight: 700; }
.merchant-icon-action:hover { color: #006cdb; background: #edf6ff; }
.merchant-icon-action.danger { border-color: transparent; color: #ed2424; background: transparent; }
.merchant-icon-action.danger:hover { color: #d81919; background: #fff0f0; }
.merchant-icon-action.warning { color: #ee7200; }
.merchant-icon-action.success { color: #23833d; }
.merchant-action-icon { width: 25px; height: 25px; display: block; }
.merchant-icon-action:disabled { color: #8eb9e8; opacity: .78; }
.merchant-icon-action.danger:disabled { color: #f06c6c; }
.merchant-review-action { min-width: 58px; height: 34px; min-height: 34px; padding: 0 12px; border-color: #0878ef; color: #fff; background: #0878ef; font-size: 13px; font-weight: 700; }
.merchant-review-action:hover { border-color: #006cdb; background: #006cdb; }
.merchant-more-action { grid-column: 1 / -1; min-height: 30px; display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px; padding: 0; border: 0; color: #0878ef; background: transparent; font-weight: 700; }
.merchant-more-action:disabled { color: #6aa9e8; opacity: .85; }
.merchant-detail-link { color: #1f69b7; font-weight: 700; text-decoration: none; white-space: nowrap; }
.merchant-detail-link:hover { text-decoration: underline; }
.merchant-empty { position: absolute; inset: 42px 0 0; display: grid; place-content: center; gap: 5px; color: #7b828a; text-align: center; }
.merchant-empty strong { color: #3c4248; }
.merchant-pagination { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 10px 18px; border-top: 1px solid #e6e9ed; color: #66707b; font-size: 12px; }
.merchant-pagination-summary, .merchant-pagination-actions, .merchant-page-size, .merchant-page-jump, .merchant-page-controls { display: flex; align-items: center; }
.merchant-pagination-summary { gap: 18px; white-space: nowrap; }
.merchant-pagination-actions { min-width: 0; justify-content: flex-end; gap: 16px; }
.merchant-pagination strong { color: #3e464f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.merchant-page-size, .merchant-page-jump { gap: 6px; white-space: nowrap; }
.merchant-page-jump input { height: 34px; border: 1px solid #d5dce5; border-radius: 5px; color: #3e4751; background: #fff; font: inherit; }
.merchant-page-size-control { position: relative; width: 76px; min-width: 76px; height: 34px; display: inline-flex; }
.merchant-page-size-control select { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.merchant-page-size-display { width: 100%; height: 34px; display: flex; align-items: center; padding: 0 30px 0 12px; border: 1px solid #d5dce5; border-radius: 5px; color: #3e4751; background: #fff; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.merchant-page-size-display::after { content: ""; position: absolute; top: 12px; right: 13px; width: 7px; height: 7px; border-right: 1.5px solid #3e4751; border-bottom: 1.5px solid #3e4751; transform: rotate(45deg); }
.merchant-page-size-control select:focus-visible + .merchant-page-size-display { outline: 2px solid #0878ef; outline-offset: 2px; }
.merchant-page-jump input { width: 52px; padding: 0 7px; text-align: center; font-variant-numeric: tabular-nums; }
.merchant-page-controls { gap: 5px; }
.merchant-page-controls button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; display: grid; place-items: center; padding: 0; border-color: #d5dce5; border-radius: 5px; color: #4f5964; background: #fff; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.merchant-page-controls button:hover:not(:disabled) { border-color: #7bb5ef; color: #0878ef; background: #f3f8fe; }
.merchant-page-controls button.active { border-color: #0878ef; color: #fff; background: #0878ef; }
.merchant-page-controls button:disabled { color: #aeb6c0; background: #f5f7f9; cursor: not-allowed; }
.merchant-page-controls .merchant-action-icon { width: 15px; height: 15px; }
.merchant-page-ellipsis { width: 24px; color: #89919a; text-align: center; }
.merchant-error { margin: 48px auto; width: min(560px, calc(100% - 40px)); padding: 18px; border-left: 4px solid #c7483d; background: #fff; color: #8b2c26; }
.merchant-qr-dialog { width: min(590px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 0; border-radius: 7px; color: #24282d; background: #fff; box-shadow: 0 20px 56px rgba(20, 27, 35, .28); }
.merchant-qr-dialog::backdrop { background: rgba(21, 25, 29, .56); }
.merchant-qr-head { min-height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; }
.merchant-qr-head h2 { margin: 0; font-size: 24px; }
.merchant-qr-head button { width: 38px; min-width: 38px; padding: 0; border: 0; color: #777d84; background: transparent; font-size: 30px; line-height: 1; }
.merchant-qr-head button:hover { color: #22272d; background: #f3f5f7; }
.merchant-qr-body { display: grid; justify-items: center; padding: 12px 30px 20px; text-align: center; }
.merchant-qr-body img { width: 220px; height: 220px; padding: 12px; border: 2px solid #d9dde2; border-radius: 7px; image-rendering: pixelated; }
.merchant-qr-body strong { margin-top: 20px; font-size: 17px; }
.merchant-qr-body p { margin: 7px 0 0; color: #6b727a; font-size: 14px; }
.merchant-qr-actions { display: grid; gap: 12px; padding: 0 30px 30px; }
.merchant-qr-actions > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.merchant-qr-primary, .merchant-qr-secondary { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 5px; text-decoration: none; font-weight: 700; }
.merchant-qr-primary { border: 1px solid #1f73c9; color: #fff; background: #1f73c9; box-shadow: 0 2px 5px rgba(31, 92, 157, .22); }
.merchant-qr-primary:hover { background: #1769b9; }
.merchant-qr-secondary { border: 1px solid #80b6ef; color: #1f73c9; background: #fff; }
button.merchant-qr-secondary { min-height: 46px; padding: 0 14px; }
.merchant-qr-secondary:hover { border-color: #438fdc; background: #f5f9fe; }
.merchant-materials-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 0; border-radius: 7px; color: #24282d; background: #fff; box-shadow: 0 20px 56px rgba(20, 27, 35, .28); }
.merchant-materials-dialog::backdrop { background: rgba(21, 25, 29, .56); }
.merchant-sync-settings-dialog { width: min(720px, calc(100vw - 32px)); }
.merchant-sync-settings-body { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 22px 26px 10px; }
.merchant-sync-settings-body section { min-width: 0; display: grid; gap: 13px; padding: 17px; border: 1px solid #dde5ed; background: #f8fafc; }
.merchant-sync-settings-body h3 { margin: 0; font-size: 15px; }
.merchant-sync-settings-body label { display: grid; gap: 7px; color: #596571; font-size: 12px; font-weight: 650; }
.merchant-sync-settings-body > p { grid-column: 1 / -1; margin: 0; color: #77818b; font-size: 12px; }
.merchant-materials-body { padding: 22px 26px 4px; }
.merchant-materials-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.merchant-materials-link { display: grid; gap: 8px; color: #4b535c; font-weight: 650; }
.merchant-materials-link input { height: 43px; }
.merchant-materials-body section { margin-top: 24px; border-top: 1px solid #e6ebef; }
.merchant-materials-body section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 20px 0 10px; }
.merchant-materials-body h3 { margin: 0; font-size: 15px; }
.merchant-materials-body header p { margin: 0; color: #7a838d; font-size: 12px; }
.merchant-delivery-document-list { display: grid; }
.merchant-delivery-document { min-height: 68px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; border-top: 1px solid #edf0f3; }
.merchant-delivery-document:first-child { border-top: 0; }
.merchant-delivery-document-info { min-width: 0; display: grid; gap: 5px; }
.merchant-delivery-document-info > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.merchant-delivery-document-info strong, .merchant-delivery-document-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-delivery-document-info span { color: #7a838d; font-size: 12px; }
.merchant-delivery-document-info .merchant-material-scope { flex: 0 0 auto; padding: 2px 6px; border: 1px solid #bfd3e8; border-radius: 3px; color: #356b9e; background: #f5f9fd; font-size: 11px; font-weight: 650; }
.merchant-delivery-document-info .merchant-material-scope.required { border-color: #acd6bb; color: #277b45; background: #f2faf5; }
.merchant-delivery-document-actions { display: flex; align-items: center; gap: 7px; }
.merchant-delivery-document-actions button, .merchant-delivery-document-actions a { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 11px; border: 1px solid #cdd9e6; border-radius: 4px; color: #1f69b7; background: #fff; text-decoration: none; font-size: 12px; }
.merchant-delivery-document-actions button:hover, .merchant-delivery-document-actions a:hover { border-color: #75a9df; background: #f4f9fe; }
.merchant-delivery-document-actions button.danger { border-color: #efb6b6; color: #d52e2e; background: #fff; }
.merchant-delivery-document-actions input { display: none; }
.merchant-service-dialog { width: min(940px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 0; border-radius: 7px; color: #24282d; background: #fff; box-shadow: 0 20px 56px rgba(20, 27, 35, .28); }
.merchant-service-dialog::backdrop { background: rgba(21, 25, 29, .56); }
.merchant-service-head { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 26px; border-bottom: 1px solid #e7ebef; }
.merchant-service-head h2 { margin: 0; font-size: 21px; }
.merchant-service-head p { margin: 6px 0 0; color: #737c86; }
.merchant-service-head button { width: 38px; min-width: 38px; padding: 0; border: 0; color: #777d84; background: transparent; font-size: 28px; line-height: 1; }
.merchant-service-head-actions { display: flex; align-items: center; gap: 8px; }
.merchant-service-head .merchant-personnel-trigger { width: auto; min-width: 0; height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #cfd8e4; color: #1f73c9; background: #fff; font-size: 13px; line-height: 1; font-weight: 700; }
.merchant-service-head .merchant-personnel-trigger:hover { border-color: #78ace2; background: #f3f8fe; }
.merchant-personnel-trigger svg { width: 17px; height: 17px; }
.merchant-application-review { padding: 22px 26px 0; }
.merchant-review-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #dfe6ed; background: #f7f9fb; }
.merchant-review-meta div { min-width: 0; padding: 13px 15px; border-right: 1px solid #dfe6ed; }
.merchant-review-meta div:last-child { border-right: 0; }
.merchant-review-meta span, .merchant-review-grid span { display: block; color: #7a838d; font-size: 12px; }
.merchant-review-meta strong, .merchant-review-grid strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.merchant-review-section { padding: 21px 0; border-bottom: 1px solid #e7ecf0; }
.merchant-review-section h3, .merchant-review-form-title h3 { margin: 0 0 14px; font-size: 15px; }
.merchant-review-section-head { min-height: 34px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.merchant-review-section-head h3 { margin: 6px 0 0; }
.merchant-review-section-head button { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-color: #85b5e5; color: #176fc8; background: #fff; font-size: 12px; font-weight: 700; }
.merchant-review-section-head button:hover { border-color: #2680d9; background: #f3f8fe; }
.merchant-review-section-head button:disabled { cursor: not-allowed; opacity: .52; }
.merchant-review-section-head .merchant-action-icon { width: 15px; height: 15px; }
.merchant-review-section-head button > span[aria-hidden] { font-size: 20px; line-height: 1; font-weight: 400; }
.merchant-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px 24px; }
.merchant-review-edit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 18px; padding: 16px; border: 1px solid #dbe6f1; background: #f8fbfe; }
.merchant-review-edit-field { min-width: 0; display: grid; align-content: start; gap: 7px; color: #65717d; font-size: 12px; font-weight: 650; }
.merchant-review-edit-field-wide { grid-column: 1 / -1; }
.merchant-review-edit-field input, .merchant-review-edit-field textarea { width: 100%; color: #252b31; background: #fff; }
.merchant-review-edit-field input { height: 40px; }
.merchant-review-edit-field textarea { min-height: 76px; resize: vertical; }
.merchant-review-field-hint { color: #7a838d; font-size: 12px; font-weight: 400; line-height: 1.5; }
.merchant-review-checkbox { min-height: 40px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 9px; color: #65717d; font-size: 12px; font-weight: 650; }
.merchant-review-checkbox > span { grid-column: 1 / -1; margin-bottom: 7px; }
.merchant-review-checkbox input { width: 18px; height: 18px; margin: 0; }
.merchant-review-checkbox strong { color: #252b31; font-size: 13px; }
.merchant-review-issues { margin-top: 16px; padding: 13px 15px; border-left: 4px solid #d64941; color: #8d2723; background: #fff2f1; }
.merchant-review-issues ul { margin: 8px 0 0; padding-left: 20px; }
.merchant-review-attachments { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.merchant-review-attachment { min-width: 0; display: grid; grid-template-rows: 92px auto 32px; gap: 7px; padding: 8px; border: 1px solid #dfe5eb; color: #2f3943; background: #fff; }
.merchant-review-attachment-preview { display: block; min-width: 0; height: 92px; background: #f2f4f6; text-decoration: none; }
.merchant-review-attachment-preview:hover { outline: 2px solid #65a7e8; outline-offset: -2px; }
.merchant-review-attachments img { width: 100%; height: 92px; object-fit: contain; background: #f2f4f6; }
.merchant-review-attachment > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.merchant-review-attachment.unavailable { color: #858e97; background: #f7f8f9; }
.merchant-review-attachment-missing { height: 92px; display: grid; place-items: center; background: #eef1f4; text-align: center; }
.merchant-review-attachment-missing strong { color: #858e97; font-size: 11px; }
.merchant-review-attachment-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.merchant-review-attachment-actions.single { grid-template-columns: 1fr; }
.merchant-review-attachment-actions button { min-width: 0; min-height: 32px; padding: 0 8px; border-color: #7cb2e9; color: #176fc8; background: #fff; font-size: 11px; font-weight: 700; }
.merchant-review-attachment-actions button:hover { border-color: #2680d9; background: #f3f8fe; }
.merchant-review-attachment-actions button.danger { border-color: #e4a0a0; color: #c83232; }
.merchant-review-attachment-actions button.danger:hover { border-color: #d94c4c; background: #fff3f3; }
.merchant-review-form-title { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 21px 0 0; }
.merchant-review-form-title p { margin: 0; color: #7a838d; font-size: 12px; }
.merchant-opening-decisions { padding-bottom: 22px; border-bottom: 1px solid #e7ecf0; }
.merchant-opening-decision-grid, .merchant-opening-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 18px; }
.merchant-opening-decision-grid { padding: 17px; border: 1px solid #dce5ee; background: #f7f9fb; }
.merchant-opening-decision-grid > label { min-width: 0; display: grid; align-content: start; gap: 7px; color: #4b535c; font-size: 12px; font-weight: 700; }
.merchant-opening-decision-grid input, .merchant-opening-decision-grid select { width: 100%; height: 41px; background: #fff; }
.merchant-opening-decision-grid small { color: #7b858f; line-height: 1.5; font-weight: 400; }
.merchant-opening-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.merchant-opening-choice-wide { grid-column: 1 / -1; }
.merchant-opening-choice legend { margin-bottom: 7px; color: #4b535c; font-size: 12px; font-weight: 700; }
.merchant-segmented-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.merchant-segmented-choice label { position: relative; min-width: 0; }
.merchant-segmented-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.merchant-segmented-choice span { min-height: 41px; display: grid; place-items: center; padding: 0 10px; border: 1px solid #ced8e3; color: #596470; background: #fff; cursor: pointer; font-size: 13px; font-weight: 650; }
.merchant-segmented-choice label:first-child span { border-radius: 4px 0 0 4px; }
.merchant-segmented-choice label:last-child span { margin-left: -1px; border-radius: 0 4px 4px 0; }
.merchant-segmented-choice input:checked + span { position: relative; z-index: 1; border-color: #2680d9; color: #176fc8; background: #eaf4fe; }
.merchant-segmented-choice input:focus-visible + span { outline: 2px solid #2680d9; outline-offset: 2px; }
.merchant-basic-configuration { margin-top: 14px; padding: 17px; border: 1px solid #cfe0ef; background: #f8fbfe; }
.merchant-basic-configuration-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.merchant-basic-configuration-head > div:first-child { min-width: 0; display: grid; gap: 5px; }
.merchant-basic-configuration-head strong { font-size: 14px; }
.merchant-basic-configuration-head span { color: #77828d; font-size: 12px; }
.merchant-feature-policy-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.merchant-feature-policy-actions button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-color: #85b5e5; color: #176fc8; background: #fff; font-size: 12px; font-weight: 700; }
.merchant-feature-policy-actions button:hover { border-color: #2680d9; background: #f3f8fe; }
.merchant-feature-policy-actions button:disabled { cursor: not-allowed; opacity: .5; }
.merchant-feature-policy-actions svg { width: 15px; height: 15px; }
.merchant-template-choices { min-height: 41px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 7px 10px; border: 1px solid #ced8e3; border-radius: 4px; background: #fff; }
.merchant-template-choices label { display: inline-flex; align-items: center; gap: 6px; color: #4f5a65; font-size: 12px; }
.merchant-template-choices input { width: 16px; height: 16px; margin: 0; }
.merchant-version-policy { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid #ced8e3; border-radius: 4px; background: #fff; }
.merchant-version-policy div { min-width: 0; padding: 11px 12px; border-right: 1px solid #e1e7ed; }
.merchant-version-policy div:last-child { border-right: 0; }
.merchant-version-policy span, .merchant-version-policy strong { display: block; }
.merchant-version-policy span { color: #69747f; font-size: 11px; }
.merchant-version-policy strong { margin-top: 4px; color: #7a8590; font-size: 13px; }
.merchant-version-policy strong.enabled { color: #176fc8; }
.merchant-feature-toggle { min-height: 30px; display: inline-flex; align-items: center; gap: 7px; margin-top: 7px; cursor: pointer; }
.merchant-feature-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.merchant-feature-toggle i { position: relative; width: 34px; height: 20px; flex: 0 0 auto; border-radius: 10px; background: #b8c1ca; transition: background .16s ease; }
.merchant-feature-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(34, 47, 59, .25); transition: transform .16s ease; }
.merchant-feature-toggle input:checked + i { background: #2680d9; }
.merchant-feature-toggle input:checked + i::after { transform: translateX(14px); }
.merchant-feature-toggle input:focus-visible + i { outline: 2px solid #2680d9; outline-offset: 2px; }
.merchant-feature-toggle em { color: #596470; font-size: 12px; font-style: normal; font-weight: 700; }
.merchant-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 24px 26px 8px; }
.merchant-service-grid label { display: grid; align-content: start; gap: 8px; color: #4b535c; font-weight: 650; }
.merchant-service-grid input, .merchant-service-grid select { height: 43px; }
.merchant-service-grid .merchant-service-wide { grid-column: 1 / -1; }
.merchant-service-grid textarea { min-height: 112px; resize: vertical; padding: 10px 12px; border: 1px solid #cbd4dd; border-radius: 4px; font: inherit; line-height: 1.6; }
.merchant-service-grid textarea:focus { border-color: #2680d9; outline: 2px solid rgba(38, 128, 217, .12); }
.merchant-service-grid small { color: #737d87; font-size: 12px; font-weight: 400; line-height: 1.5; }
.merchant-service-grid select:disabled { color: #6c7680; background: #f2f4f6; cursor: not-allowed; }
.deposit-not-required { grid-column: 1 / -1; display: grid; gap: 5px; padding: 13px 15px; border-left: 4px solid #5d6b78; background: #f3f6f8; }
.deposit-not-required strong { color: #3d4954; }
.deposit-not-required span { color: #6e7882; font-size: 12px; }
.merchant-payment-section { margin-top: 18px; padding: 22px 26px 8px; border-top: 1px solid #e4e9ee; }
.merchant-payment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.merchant-payment-head h3 { margin: 0; font-size: 17px; }
.merchant-payment-head p { margin: 6px 0 0; color: #737d87; font-size: 12px; }
.merchant-payment-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 16px; border: 1px solid #dfe5eb; background: #f7f9fb; }
.merchant-payment-summary div { min-width: 0; padding: 13px 15px; border-right: 1px solid #dfe5eb; }
.merchant-payment-summary div:last-child { border-right: 0; }
.merchant-payment-summary span { display: block; color: #78818b; font-size: 11px; }
.merchant-payment-summary strong { display: block; margin-top: 5px; color: #252b31; font-size: 18px; overflow-wrap: anywhere; }
.merchant-payment-entry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.merchant-payment-entry label { display: grid; align-content: start; gap: 7px; color: #4b535c; font-size: 12px; font-weight: 650; }
.merchant-payment-entry input, .merchant-payment-entry select { min-width: 0; height: 41px; }
.merchant-payment-note { grid-column: 1 / -1; }
.merchant-payment-note textarea { min-height: 72px; resize: vertical; padding: 10px 12px; border: 1px solid #cbd4dd; border-radius: 4px; font: inherit; line-height: 1.5; }
.merchant-payment-note textarea:focus { border-color: #2680d9; outline: 2px solid rgba(38, 128, 217, .12); }
.merchant-payment-hint { grid-column: 1 / -1; padding: 10px 12px; border-left: 3px solid #637384; color: #66717c; background: #f3f6f8; font-size: 12px; }
.merchant-payment-add-row { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.merchant-payment-add-row button { min-height: 40px; border-color: #69a3df; color: #176fc8; background: #fff; font-weight: 700; }
.merchant-payment-add-row button:hover { border-color: #2680d9; background: #f3f8fe; }
.merchant-payment-list { margin-top: 18px; border-top: 1px solid #e3e8ed; }
.merchant-payment-record { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px; gap: 18px; align-items: start; padding: 15px 0; border-bottom: 1px solid #e8edf1; }
.merchant-payment-record-type { display: grid; gap: 5px; }
.merchant-payment-record-type strong { color: #30373e; }
.merchant-payment-record-type time { color: #7b848e; font-size: 11px; }
.merchant-payment-record-amounts { display: flex; gap: 8px 16px; flex-wrap: wrap; }
.merchant-payment-record-amounts span { color: #616b75; font-size: 12px; }
.merchant-payment-record-amounts strong { color: #2874c3; font-size: 12px; }
.merchant-payment-record-note { grid-column: 2; margin: 7px 0 0; color: #3f474f; line-height: 1.55; }
.merchant-payment-record-meta { color: #7b848e; text-align: right; font-size: 11px; }
.merchant-payment-record-meta span { display: block; margin-top: 5px; }
.merchant-payment-status { display: inline-flex; align-items: center; min-height: 25px; margin-bottom: 7px; padding: 0 9px; border-radius: 3px; color: #48535e; background: #edf1f4; font-size: 11px; font-weight: 700; }
.merchant-payment-status.pending { color: #a65300; background: #fff0dd; }
.merchant-payment-status.approved { color: #17713b; background: #e8f6ed; }
.merchant-payment-status.rejected { color: #b12626; background: #fdeaea; }
.merchant-payment-record-review { margin-top: 8px; color: #67727d; font-size: 11px; line-height: 1.55; }
.merchant-payment-record-review strong { color: #303840; }
.merchant-payment-record-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.merchant-payment-record-actions button { min-width: 0; min-height: 30px; padding: 0 10px; border-color: #81b4e8; color: #176fc8; background: #fff; font-size: 11px; font-weight: 700; }
.merchant-payment-record-actions button:hover { border-color: #2680d9; background: #f1f7fd; }
.merchant-payment-list-empty { min-height: 70px; display: grid; place-items: center; color: #858e97; }
.merchant-payment-detail-summary { margin-bottom: 8px; }
.merchant-detail-panel .merchant-payment-list { margin-top: 8px; }
.merchant-service-error { min-height: 20px; margin: 10px 26px 0; color: #c82d2d; }
.merchant-service-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 26px 24px; }
.merchant-service-actions button { min-width: 92px; }
.merchant-service-actions button.primary { border-color: #0878ef; background: #0878ef; }
.merchant-detail-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 0; border-radius: 7px; color: #24282d; background: #fff; box-shadow: 0 20px 56px rgba(20, 27, 35, .28); }
.merchant-detail-dialog::backdrop, .merchant-compact-dialog::backdrop, .merchant-confirm-dialog::backdrop, .merchant-personnel-dialog::backdrop, .merchant-materials-dialog::backdrop { background: rgba(21, 25, 29, .56); }
.merchant-detail-head, .merchant-compact-head { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 26px; border-bottom: 1px solid #e7ebef; }
.merchant-detail-head h2, .merchant-compact-head h2 { margin: 0; font-size: 21px; }
.merchant-detail-head p, .merchant-compact-head p { margin: 6px 0 0; color: #737c86; }
.merchant-detail-head > button, .merchant-compact-head > button { width: 38px; min-width: 38px; padding: 0; border: 0; color: #777d84; background: transparent; font-size: 28px; line-height: 1; }
.merchant-detail-tabs { display: flex; gap: 22px; overflow-x: auto; padding: 0 26px; border-bottom: 1px solid #e1e6eb; }
.merchant-detail-tabs button { min-height: 52px; border: 0; border-radius: 0; padding: 0 4px; background: transparent; white-space: nowrap; }
.merchant-detail-tabs button[aria-selected="true"] { color: #0878ef; box-shadow: inset 0 -3px #0878ef; font-weight: 700; }
.merchant-detail-panel { padding: 0 26px 12px; }
.merchant-detail-section { padding: 22px 0; border-bottom: 1px solid #e9edf1; }
.merchant-detail-section:last-child { border-bottom: 0; }
.merchant-detail-section h3 { margin: 0 0 16px; font-size: 15px; }
.merchant-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px 24px; }
.merchant-detail-grid div { min-width: 0; }
.merchant-detail-grid span { display: block; color: #7a838d; font-size: 12px; }
.merchant-detail-grid strong { display: block; margin-top: 6px; color: #2d3339; overflow-wrap: anywhere; }
.merchant-material-list { display: grid; }
.merchant-material-list div { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #edf0f3; }
.merchant-material-list div:first-child { border-top: 0; }
.merchant-material-list span { color: #8a929a; font-size: 12px; }
.merchant-material-list a { color: #1f69b7; font-size: 12px; font-weight: 700; text-decoration: none; }
.merchant-material-list a:hover { text-decoration: underline; }
.merchant-followup-list { display: grid; gap: 0; margin: 0; padding: 8px 0; list-style: none; }
.merchant-followup-list li { padding: 16px 0; border-bottom: 1px solid #e9edf1; }
.merchant-followup-list p { margin: 8px 0 0; color: #343a40; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.merchant-followup-saved-images { display: grid; grid-template-columns: repeat(4, 88px); gap: 10px; margin-top: 12px; }
.merchant-followup-saved-images a { width: 88px; aspect-ratio: 1; overflow: hidden; border: 1px solid #dce3ea; border-radius: 4px; background: #f5f7f9; }
.merchant-followup-saved-images img { width: 100%; height: 100%; display: block; object-fit: cover; }
.merchant-followup-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #7b848d; font-size: 12px; }
.merchant-followup-meta time { color: #4f5963; font-weight: 700; }
.merchant-followup-meta span { margin: 0; color: #7b848d; font-size: 12px; }
.merchant-detail-empty { min-height: 200px; display: grid; place-items: center; color: #818a93; }
.merchant-detail-actions { display: flex; justify-content: flex-end; padding: 0 26px 24px; }
.merchant-reminder-form { padding-top: 18px; }
.merchant-reminder-metric { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 13px 16px; border-left: 4px solid #1685d1; background: #f1f8fd; }
.merchant-reminder-metric.error { border-left-color: #cf3030; background: #fff3f3; }
.merchant-reminder-metric span { display: block; color: #64717d; font-size: 12px; }
.merchant-reminder-metric strong { display: block; margin-top: 3px; color: #172b3d; font-size: 22px; }
.merchant-reminder-metric p { margin: 0; color: #64717d; text-align: right; font-size: 12px; }
.merchant-reminder-rule { padding: 20px 0; border-bottom: 1px solid #e4e9ee; }
.merchant-reminder-rule > header, .merchant-reminder-history > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.merchant-reminder-rule h3, .merchant-reminder-history h3 { margin: 0; font-size: 15px; }
.merchant-reminder-rule header p { margin: 5px 0 0; color: #77818b; font-size: 12px; }
.merchant-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.merchant-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.merchant-toggle span { position: relative; width: 40px; height: 22px; border-radius: 11px; background: #cdd4dc; transition: background .16s ease; }
.merchant-toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.24); transition: transform .16s ease; }
.merchant-toggle input:checked + span { background: #1685d1; }
.merchant-toggle input:checked + span::after { transform: translateX(18px); }
.merchant-toggle input:focus-visible + span { outline: 2px solid #0878ef; outline-offset: 2px; }
.merchant-toggle input:disabled + span { opacity: .6; }
.merchant-toggle em { min-width: 42px; color: #65717d; font-size: 12px; font-style: normal; }
.merchant-reminder-fields { display: grid; grid-template-columns: minmax(145px, .55fr) minmax(260px, 1.45fr); gap: 14px; margin-top: 15px; }
.merchant-reminder-fields-wide { grid-template-columns: minmax(130px, .42fr) minmax(220px, .75fr) minmax(320px, 1.5fr); }
.merchant-reminder-fields label { display: grid; gap: 6px; color: #4d5863; font-size: 12px; font-weight: 700; }
.merchant-reminder-fields input { width: 100%; height: 40px; box-sizing: border-box; }
.merchant-reminder-fields textarea, .merchant-custom-reminder-grid textarea { width: 100%; min-height: 72px; padding: 10px 12px; resize: vertical; border: 1px solid #cbd4dd; border-radius: 4px; color: #27313a; background: #fff; font: inherit; line-height: 1.5; }
.merchant-reminder-fields textarea:disabled { color: #69747f; background: #f4f6f8; }
.merchant-reminder-resolution { margin: 12px 0 0; color: #9b4c00; font-size: 12px; }
.merchant-reminder-error { min-height: 20px; margin: 10px 0 0; color: #c82d2d; font-size: 12px; }
.merchant-reminder-actions { display: flex; justify-content: flex-end; padding: 2px 0 8px; }
.merchant-reminder-actions button { min-width: 118px; }
.merchant-reminder-history { padding: 20px 0 4px; }
.merchant-reminder-history > header span { color: #69747f; font-size: 12px; }
.merchant-custom-reminder-form { padding: 20px 0; border-bottom: 1px solid #e4e9ee; }
.merchant-custom-reminder-form > header h3 { margin: 0; font-size: 15px; }
.merchant-custom-reminder-form > header p { margin: 5px 0 0; color: #77818b; font-size: 12px; }
.merchant-custom-reminder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 15px; }
.merchant-custom-reminder-grid label { min-width: 0; display: grid; gap: 6px; color: #4d5863; font-size: 12px; font-weight: 700; }
.merchant-custom-reminder-grid label.wide { grid-column: 1 / -1; }
.merchant-custom-reminder-grid input { width: 100%; height: 40px; box-sizing: border-box; }
.merchant-reminder-list { display: grid; gap: 10px; margin: 15px 0 0; padding: 0; list-style: none; }
.merchant-reminder-list li { padding: 14px 15px; border: 1px solid #e0e6ec; border-left: 4px solid #9aa4ae; border-radius: 4px; background: #fff; }
.merchant-reminder-list li.pending { border-left-color: #d83b3b; background: #fffafa; }
.merchant-reminder-list li.scheduled { border-left-color: #1685d1; background: #f8fbfe; }
.merchant-reminder-record-head, .merchant-reminder-list footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.merchant-reminder-record-head strong { color: #29323a; font-size: 13px; }
.merchant-reminder-record-head span { padding: 3px 8px; border-radius: 3px; color: #6a747e; background: #eef1f4; font-size: 11px; }
.merchant-reminder-list li.pending .merchant-reminder-record-head span { color: #b32626; background: #ffe8e8; }
.merchant-reminder-list li.scheduled .merchant-reminder-record-head span { color: #176fc8; background: #e7f3ff; }
.merchant-reminder-list p { margin: 9px 0; color: #505b65; font-size: 12px; line-height: 1.6; }
.merchant-reminder-list small { color: #77818b; }
.merchant-reminder-list button { min-width: 0; min-height: 30px; padding: 0 10px; border-color: #7eafe0; color: #176fc8; background: #fff; font-size: 11px; font-weight: 700; }
.merchant-reminder-empty { min-height: 100px; }
.merchant-compact-dialog { width: min(650px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 0; border-radius: 7px; color: #24282d; background: #fff; box-shadow: 0 20px 56px rgba(20, 27, 35, .28); }
.merchant-pending-materials-dialog { width: min(760px, calc(100vw - 32px)); }
.merchant-pending-materials-grid { padding-bottom: 18px; }
.merchant-pending-materials-grid label { min-width: 0; display: grid; align-content: start; gap: 7px; color: #4b535c; font-size: 12px; font-weight: 700; }
.merchant-pending-materials-grid input, .merchant-pending-materials-grid select { width: 100%; }
.merchant-pending-materials-grid input[type="file"] { height: auto; min-height: 41px; padding: 8px 10px; }
.merchant-pending-materials-grid textarea { min-height: 76px; padding: 10px 12px; resize: vertical; border: 1px solid #cbd4dd; border-radius: 4px; font: inherit; line-height: 1.5; }
.merchant-pending-materials-grid small { color: #7a838d; font-weight: 400; }
.merchant-pending-materials-wide { grid-column: 1 / -1; }
.merchant-pending-materials-tip { margin: 0 26px 8px; padding: 11px 13px; border-left: 3px solid #2f80d0; color: #526170; background: #f3f8fd; font-size: 12px; line-height: 1.55; }
.merchant-finance-dialog { width: min(780px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 0; border-radius: 7px; color: #24282d; background: #fff; box-shadow: 0 20px 56px rgba(20, 27, 35, .28); }
.merchant-finance-dialog::backdrop { background: rgba(21, 25, 29, .56); }
.merchant-finance-body { padding: 22px 26px 0; }
.merchant-finance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.merchant-finance-grid label { min-width: 0; display: grid; align-content: start; gap: 7px; color: #4b535c; font-size: 12px; font-weight: 700; }
.merchant-finance-grid input, .merchant-finance-grid select { width: 100%; height: 41px; }
.merchant-finance-grid textarea { min-height: 74px; resize: vertical; padding: 10px 12px; border: 1px solid #cbd4dd; border-radius: 4px; font: inherit; line-height: 1.5; }
.merchant-finance-grid textarea:focus { border-color: #2680d9; outline: 2px solid rgba(38, 128, 217, .12); }
.merchant-finance-grid select:disabled, .merchant-finance-grid input:disabled, .merchant-finance-grid textarea:disabled { color: #4f5963; background: #f2f4f6; opacity: 1; }
.merchant-finance-wide { grid-column: 1 / -1; }
.merchant-personnel-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: hidden; padding: 0; border: 0; border-radius: 7px; color: #24282d; background: #fff; box-shadow: 0 20px 56px rgba(20, 27, 35, .28); }
.merchant-personnel-dialog form { height: min(820px, calc(100vh - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.merchant-personnel-groups { overflow: auto; padding: 0 26px; }
.merchant-personnel-dialog .merchant-service-actions { border-top: 1px solid #e8edf2; background: #fff; }
.merchant-personnel-groups section { padding: 20px 0; border-bottom: 1px solid #e8edf2; }
.merchant-personnel-groups section:last-child { border-bottom: 0; }
.merchant-personnel-groups header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.merchant-personnel-groups h3 { margin: 0; font-size: 15px; }
.merchant-personnel-groups header p { margin: 5px 0 0; color: #7a838d; font-size: 12px; }
.merchant-personnel-groups header button { min-width: 68px; min-height: 34px; border-color: #80b6ef; color: #1f73c9; background: #fff; }
.merchant-personnel-list { display: grid; gap: 9px; }
.merchant-personnel-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 38px); align-items: center; gap: 6px; }
.merchant-personnel-row input { height: 40px; }
.merchant-personnel-row button { width: 38px; min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; color: #347cc5; background: transparent; }
.merchant-personnel-row button:hover { background: #edf6ff; }
.merchant-personnel-row button[data-personnel-remove] { color: #dc3030; }
.merchant-personnel-row button[data-personnel-remove]:hover { background: #fff0f0; }
.merchant-personnel-row button:disabled { opacity: .28; cursor: not-allowed; background: transparent; }
.merchant-personnel-row .merchant-action-icon { width: 20px; height: 20px; }
.merchant-compact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 24px 26px 8px; }
.merchant-compact-grid label, .merchant-followup-field label { display: grid; gap: 8px; color: #4b535c; font-weight: 650; }
.merchant-followup-field { padding: 24px 26px 8px; }
.merchant-followup-field textarea { min-height: 150px; resize: vertical; border: 1px solid #cfd7d2; border-radius: 4px; padding: 12px; font: inherit; line-height: 1.6; }
.merchant-followup-field textarea:focus { border-color: var(--green); outline: 2px solid rgba(23,107,69,.12); }
.merchant-followup-upload { margin: 12px 26px 8px; padding-top: 16px; border-top: 1px solid #e7ebef; }
.merchant-followup-upload-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.merchant-followup-upload-head > div { min-width: 0; display: grid; gap: 4px; }
.merchant-followup-upload-head strong { color: #4b535c; font-size: 14px; }
.merchant-followup-upload-head small, .merchant-followup-image-count { color: #7a838d; font-size: 11px; }
.merchant-followup-upload-head button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-color: #84b9ed; color: #1e72c7; background: #fff; }
.merchant-followup-upload-head .merchant-action-icon { width: 18px; height: 18px; }
.merchant-followup-image-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.merchant-followup-image-preview:empty { display: none; }
.merchant-followup-image-preview figure { position: relative; min-width: 0; margin: 0; }
.merchant-followup-image-preview img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; border: 1px solid #dce3ea; border-radius: 4px; background: #f5f7f9; }
.merchant-followup-image-preview button { position: absolute; top: 5px; right: 5px; width: 26px; min-width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(25, 31, 38, .78); font-size: 19px; line-height: 24px; }
.merchant-followup-image-preview figcaption { margin-top: 5px; overflow: hidden; color: #68727c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.merchant-followup-image-count { display: block; margin-top: 9px; }
.merchant-confirm-dialog { width: min(470px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 7px; color: #24282d; background: #fff; box-shadow: 0 20px 56px rgba(20, 27, 35, .28); }
.merchant-confirm-body { padding: 26px 26px 8px; }
.merchant-confirm-body h2 { margin: 0; font-size: 20px; }
.merchant-confirm-body p { margin: 14px 0 0; color: #68717a; line-height: 1.7; }
.merchant-confirm-checklist { display: grid; gap: 13px; margin: 20px 0 4px; padding: 0; list-style: none; }
.merchant-confirm-checklist li { display: flex; align-items: center; gap: 10px; color: #31383f; line-height: 1.5; }
.merchant-confirm-checklist .merchant-action-icon { width: 20px; height: 20px; flex: 0 0 auto; color: #35a853; }
.merchant-confirm-checklist li > span { min-width: 0; display: grid; flex: 1; }
.merchant-confirm-checklist li strong { font-size: 14px; }
.merchant-confirm-checklist li small { color: #818a93; font-size: 12px; }
.merchant-confirm-checklist li em { flex: 0 0 auto; color: #2d8250; font-size: 12px; font-style: normal; }
.merchant-confirm-checklist li.missing .merchant-action-icon, .merchant-confirm-checklist li.missing em { color: #c26a18; }
.merchant-delivery-mode-note { margin-top: 16px !important; padding: 11px 13px; border: 1px solid #dfe6ed; color: #727c86 !important; background: #f8fafc; font-size: 12px; }
.merchant-delete-password { display: grid; gap: 8px; margin-top: 20px; color: #4b535c; font-weight: 650; }
.merchant-delete-password input { height: 43px; }
.merchant-waiver-reason { display: grid; gap: 8px; margin-top: 20px; color: #4b535c; font-weight: 650; }
.merchant-waiver-reason strong { font: inherit; }
.merchant-waiver-reason strong span { color: #cf3030; }
.merchant-waiver-reason textarea { min-height: 104px; resize: vertical; padding: 11px 12px; border: 1px solid #cbd4dd; border-radius: 4px; font: inherit; line-height: 1.55; }
.merchant-waiver-reason textarea:focus { border-color: #2680d9; outline: 2px solid rgba(38, 128, 217, .12); }
.merchant-waiver-reason small { color: #78818a; font-size: 11px; font-weight: 400; line-height: 1.55; }
.merchant-service-actions .merchant-waive-button { border-color: #7d8791; color: #4c5660; background: #fff; font-weight: 700; }
.merchant-service-actions .merchant-waive-button:hover { border-color: #4f5963; background: #f3f5f7; }

@media (max-width: 1420px) {
  .merchant-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .merchant-payment-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .merchant-payment-summary div:nth-child(3) { border-right: 0; }
  .access-new-user fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-new-user button { align-self: end; }
  .access-role-row { grid-template-columns: 120px minmax(0, 1fr); }
  .access-role-row fieldset:last-child { grid-column: 2; }
}

@media (max-width: 980px) {
  .merchant-shell { grid-template-columns: 1fr; }
  .merchant-sidebar { position: static; min-width: 0; height: auto; overflow: visible; }
  .merchant-brand { min-height: 58px; }
  .merchant-sidebar nav { width: 100%; max-width: 100vw; display: flex; padding: 0 10px 8px; overflow-x: auto; }
  .merchant-sidebar nav a, .merchant-nav-item { min-width: max-content; min-height: 40px; grid-template-columns: 20px auto auto; padding: 0 10px; }
  .merchant-main { padding: 22px 18px 40px; }
  .merchant-header { min-height: 0; align-items: flex-start; flex-direction: column; }
  .merchant-actions { justify-content: flex-start; }
  .merchant-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-role-row { grid-template-columns: 1fr; }
  .access-role-row > header { padding: 0 0 10px; border-right: 0; border-bottom: 1px solid #e2e7ec; }
  .access-role-row fieldset:last-child { grid-column: auto; }
  .access-choice-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
}

@media (max-width: 600px) {
  .merchant-brand strong { font-size: 14px; }
  .merchant-header h1 { font-size: 24px; }
  .merchant-title-icon { width: 25px; height: 25px; }
  .merchant-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .merchant-actions button { min-width: 0; padding: 0 9px; }
  .merchant-actions button.primary { grid-column: 1 / -1; }
  .merchant-stat { min-height: 105px; }
  .merchant-summary { grid-template-columns: 1fr; }
  .merchant-section-heading { align-items: stretch; flex-direction: column; }
  .merchant-directory-controls { padding: 16px 16px 0; }
  .merchant-filter-grid { grid-template-columns: 1fr; }
  .merchant-filter-submit { width: 100%; }
  .access-settings-header { align-items: stretch; }
  .access-current-user { width: 100%; }
  .access-section-heading { align-items: flex-start; flex-direction: column; }
  .access-security-note { white-space: normal; }
  .access-password-form { grid-template-columns: 1fr; }
  .access-password-form button { width: 100%; }
  .access-new-user fieldset { grid-template-columns: 1fr; }
  .access-new-user button { width: 100%; }
  .access-choice-grid, .access-detail-choice-grid { grid-template-columns: 1fr; }
  .merchant-finance-grid { grid-template-columns: 1fr; }
  .merchant-finance-wide { grid-column: auto; }
  .merchant-payment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-payment-summary div:nth-child(3) { border-right: 1px solid #dfe5eb; }
  .merchant-payment-summary div:nth-child(even) { border-right: 0; }
  .merchant-pagination { align-items: stretch; flex-direction: column; }
  .merchant-pagination-summary { justify-content: space-between; }
  .merchant-pagination-actions { justify-content: space-between; flex-wrap: wrap; }
  .merchant-page-controls { max-width: 100%; overflow-x: auto; }
  .merchant-qr-head { min-height: 62px; padding: 0 20px; }
  .merchant-qr-head h2 { font-size: 20px; }
  .merchant-qr-body { padding: 8px 20px 18px; }
  .merchant-qr-body img { width: min(210px, 64vw); height: auto; aspect-ratio: 1; }
  .merchant-qr-actions { padding: 0 20px 22px; }
  .merchant-qr-actions > div { grid-template-columns: 1fr; }
  .merchant-materials-body { padding-right: 20px; padding-left: 20px; }
  .merchant-materials-links { grid-template-columns: 1fr; }
  .merchant-materials-body section > header { align-items: flex-start; flex-direction: column; gap: 6px; }
  .merchant-delivery-document { grid-template-columns: 1fr; gap: 10px; padding: 14px 0; }
  .merchant-delivery-document-actions { flex-wrap: wrap; }
  .merchant-service-head { padding: 16px 20px; }
  .merchant-service-grid { grid-template-columns: 1fr; padding: 20px 20px 6px; }
  .merchant-payment-section { padding-right: 20px; padding-left: 20px; }
  .merchant-payment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-payment-summary div:nth-child(2) { border-right: 0; }
  .merchant-payment-summary div:nth-child(-n+2) { border-bottom: 1px solid #dfe5eb; }
  .merchant-payment-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-payment-record { grid-template-columns: 90px minmax(0, 1fr); }
  .merchant-payment-record-meta { grid-column: 2; text-align: left; }
  .merchant-payment-record-note { grid-column: 2; }
  .merchant-detail-head, .merchant-compact-head { padding: 16px 20px; }
  .merchant-detail-tabs { padding: 0 20px; }
  .merchant-detail-panel { padding-right: 20px; padding-left: 20px; }
  .merchant-detail-grid, .merchant-compact-grid { grid-template-columns: 1fr; }
  .merchant-reminder-metric, .merchant-reminder-rule > header, .merchant-reminder-history > header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .merchant-reminder-metric p { text-align: left; }
  .merchant-reminder-fields, .merchant-custom-reminder-grid { grid-template-columns: 1fr; }
  .merchant-custom-reminder-grid label.wide { grid-column: auto; }
  .merchant-reminder-record-head, .merchant-reminder-list footer { align-items: flex-start; flex-direction: column; }
  .merchant-review-meta, .merchant-review-grid, .merchant-review-edit-grid, .merchant-opening-decision-grid, .merchant-opening-detail-grid, .merchant-version-policy { grid-template-columns: 1fr; }
  .merchant-version-policy div { border-right: 0; border-bottom: 1px solid #e1e7ed; }
  .merchant-version-policy div:last-child { border-bottom: 0; }
  .merchant-review-form-title, .merchant-basic-configuration-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .merchant-review-edit-field-wide { grid-column: auto; }
  .merchant-review-meta div { border-right: 0; border-bottom: 1px solid #dfe6ed; }
  .merchant-review-meta div:last-child { border-bottom: 0; }
  .merchant-review-attachments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-sync-settings-body { grid-template-columns: 1fr; padding-right: 20px; padding-left: 20px; }
  .merchant-sync-settings-body > p { grid-column: auto; }
  .merchant-compact-grid, .merchant-followup-field { padding: 20px 20px 6px; }
  .merchant-followup-upload { margin-right: 20px; margin-left: 20px; }
  .merchant-followup-saved-images { grid-template-columns: repeat(3, 76px); }
  .merchant-followup-saved-images a { width: 76px; }
  .deposit-not-required { grid-column: auto; }
  .merchant-service-error { margin-right: 20px; margin-left: 20px; }
  .merchant-service-actions { padding-right: 20px; padding-left: 20px; }
}

.public-view-page { min-height: 100vh; margin: 0; background: #f4f7f5; color: #17211d; }
.public-view-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(18px, 4vw, 56px); border-bottom: 1px solid #dce4df; background: #fff; }
.public-view-header h1 { margin-top: 4px; font-size: 24px; letter-spacing: 0; }
.public-view-status { display: flex; align-items: center; gap: 8px; color: #52605a; font-size: 13px; white-space: nowrap; }
.public-view-status i { width: 9px; height: 9px; border-radius: 50%; background: #20a366; box-shadow: 0 0 0 4px #e1f3e9; }
.public-view-main { width: min(1440px, 100%); margin: 0 auto; padding: 28px clamp(18px, 4vw, 56px) 54px; }
.public-summary { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid #dce4df; border-radius: 6px; }
.public-summary div { padding: 20px 22px; border-right: 1px solid #e6ebe8; }
.public-summary div:last-child { border-right: 0; }
.public-summary span { color: #65716b; font-size: 13px; }
.public-summary strong { display: block; margin-top: 5px; font-size: 28px; }
.public-view-section { margin-top: 28px; }
.public-view-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.public-view-tools h2 { font-size: 20px; }
.public-view-tools p { margin: 5px 0 0; color: #65716b; font-size: 12px; }
.public-view-tools label { display: flex; align-items: center; gap: 10px; color: #65716b; font-size: 13px; }
.public-view-tools input { width: min(280px, 38vw); background: #fff; }
.public-table-wrap { min-height: 220px; }
.board-main { width: 100%; overflow-x: auto; }
.merchant-board { min-width: 1320px; display: grid; grid-template-columns: repeat(7, minmax(170px, 1fr)); gap: 10px; }
.board-column { min-width: 0; min-height: calc(100vh - 150px); background: #e9eeeb; border-radius: 6px; overflow: hidden; }
.board-column header { min-height: 58px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 12px; border-top: 3px solid #188956; background: #fff; }
.board-column:nth-child(4) header { border-top-color: #c7483d; }
.board-column header > span { color: #8b9791; font-size: 11px; }
.board-column header strong { font-size: 14px; }
.board-column header b { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; background: #edf1ef; color: #52605a; font-size: 12px; }
.board-cards { display: grid; gap: 8px; padding: 9px; }
.board-card { padding: 12px; border: 1px solid #dce4df; border-radius: 5px; background: #fff; }
.board-card > strong, .board-card > span { display: block; overflow-wrap: anywhere; }
.board-card > strong { font-size: 14px; }
.board-card > span { margin-top: 5px; color: #7b8781; font-size: 12px; }
.board-card > div { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 12px; }
.board-card time { color: #8b9791; font-size: 10px; white-space: nowrap; }
.board-column-empty { padding: 28px 10px; color: #8b9791; text-align: center; font-size: 12px; }

@media (max-width: 760px) {
  .public-view-header { align-items: flex-start; flex-direction: column; }
  .public-summary { grid-template-columns: repeat(2, 1fr); }
  .public-summary div:nth-child(2) { border-right: 0; }
  .public-summary div:nth-child(-n+2) { border-bottom: 1px solid #e6ebe8; }
  .public-view-tools { align-items: flex-start; flex-direction: column; }
  .public-view-tools label, .public-view-tools input { width: 100%; }
}
.auth-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #e8ece9; }
.auth-panel { width: min(390px, 100%); padding: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.auth-panel h1 { margin: 22px 0; font-size: 22px; }
.auth-panel label { display: block; margin: 14px 0; color: var(--muted); }
.auth-panel label input { margin-top: 7px; color: var(--ink); }
.auth-panel button { width: 100%; margin-top: 8px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 5px; color: #fff; background: var(--green); font-weight: 800; }
.brand-mark.small { width: 36px; height: 36px; font-size: 12px; }
.form-error { min-height: 20px; color: var(--red); }
.app { min-height: 100vh; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); background: #fff; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand div { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 16px; }
.brand span:not(.brand-mark) { color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.configuration-warning { min-height: 40px; display: flex; align-items: center; padding: 9px 22px; border-bottom: 1px solid #efd9b8; color: var(--amber); background: var(--amber-soft); font-weight: 600; }
.app.has-configuration-warning .workspace { height: calc(100vh - 104px); }
.system-state { margin-right: 8px; color: var(--muted); white-space: nowrap; }
.system-state i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #33a369; }
.workspace { height: calc(100vh - 64px); display: grid; grid-template-columns: minmax(330px, 370px) minmax(0, 1fr); }
.queue-pane { min-width: 0; overflow: auto; border-right: 1px solid var(--line); background: #f8faf8; }
.pane-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 22px 18px 14px; }
.eyebrow { color: var(--muted); font-size: 12px; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.pane-heading h2 { margin-top: 4px; font-size: 20px; }
.queue-summary { padding: 0 18px 14px; color: var(--muted); }
.task-list { border-top: 1px solid var(--line); }
.task-row { width: 100%; min-height: 92px; display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 15px 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left; background: transparent; }
.task-row:hover, .task-row.active { background: #fff; }
.task-row.active { box-shadow: inset 3px 0 var(--green); }
.task-row strong { display: block; margin-bottom: 7px; font-size: 15px; overflow-wrap: anywhere; }
.task-row small { color: var(--muted); }
.status { align-self: start; padding: 4px 7px; border-radius: 4px; font-size: 12px; white-space: nowrap; background: #e9eeeb; }
.status.ready_for_confirmation, .status.completed { color: var(--green); background: var(--green-soft); }
.status.needs_info, .status.waiting_decision, .status.waiting_human, .status.monitoring { color: var(--amber); background: var(--amber-soft); }
.status.blocked_duplicate, .status.failed, .status.rejected { color: var(--red); background: var(--red-soft); }
.status.approved, .status.running { color: var(--blue); background: #ecf3fd; }
.empty-detail { display: grid; place-items: center; color: var(--muted); background: #fff; }
.empty-detail div { text-align: center; }
.empty-icon { display: block; margin-bottom: 12px; font-size: 40px; color: #9eaaa3; }
.empty-detail h2 { font-size: 18px; font-weight: 500; }
.detail-pane { overflow: auto; background: #fff; }
.detail-header { min-height: 118px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.detail-header h1 { margin: 6px 0 10px; font-size: 25px; overflow-wrap: anywhere; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); }
.blocking-banner { margin: 18px 28px 0; padding: 12px 14px; border-left: 3px solid var(--red); color: var(--red); background: var(--red-soft); }
.execution-notice { margin: 18px 28px 0; padding: 12px 14px; border-left: 3px solid var(--blue); color: #244d80; background: #eef5ff; font-weight: 600; }
.execution-notice.completed { border-left-color: var(--green); color: var(--green); background: var(--green-soft); }
.execution-notice.failed { border-left-color: var(--red); color: var(--red); background: var(--red-soft); }
.tabs { display: flex; gap: 18px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.tab { height: 48px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); background: transparent; }
.tab.active { color: var(--ink); border-bottom-color: var(--green); font-weight: 650; }
.tab-panel { padding: 0 28px 34px; }
.section-block { padding: 24px 0; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title h3 { font-size: 16px; }
.section-title span { color: var(--muted); font-size: 12px; }
.validation-list { display: grid; gap: 8px; }
.validation-item { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 10px 12px; border-radius: 4px; background: var(--soft); }
.validation-item.blocker { color: var(--red); background: var(--red-soft); }
.validation-item.warning { color: var(--amber); background: var(--amber-soft); }
.validation-ok { padding: 14px; color: var(--green); background: var(--green-soft); }
.decision-form { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 14px 18px; }
.decision-form > *, .decision-options > * { min-width: 0; max-width: 100%; }
.decision-form label { color: var(--muted); }
.decision-form select { margin-top: 7px; color: var(--ink); }
.decision-wide { grid-column: 1 / -1; }
.decision-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.decision-options > label { display: flex; min-height: 62px; flex-direction: column; justify-content: center; }
#supplierTemplateChoices { display: grid; gap: 8px; }
.decision-policy { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.decision-policy div { min-width: 0; padding: 11px 12px; border-right: 1px solid var(--line); }
.decision-policy div:last-child { border-right: 0; }
.decision-policy span, .decision-policy strong { display: block; }
.decision-policy span { color: var(--muted); font-size: 11px; }
.decision-policy strong { margin-top: 4px; color: var(--muted); font-size: 13px; }
.decision-policy strong.enabled { color: #176fc8; }
.decision-form fieldset small { display: block; flex: 1 0 100%; width: 100%; margin-top: 8px; color: var(--muted); line-height: 1.5; }
.decision-save { grid-column: 1 / -1; justify-self: end; }
fieldset { min-width: 0; min-height: 62px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; }
legend { padding: 0 4px; color: var(--muted); font-size: 12px; }
fieldset label { min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--ink) !important; white-space: normal; }
fieldset input { width: auto; height: auto; }
.approval-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.approval-row label { display: flex; align-items: center; gap: 8px; }
.approval-row input { width: auto; height: auto; }
.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; padding-top: 24px; }
.data-grid label { color: var(--muted); }
.data-grid input { margin-top: 7px; color: var(--ink); }
.data-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; padding: 22px 0; }
.supplement-upload-section { padding: 22px 0; border-top: 1px solid var(--line); }
.supplement-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.supplement-upload-grid label { display: grid; gap: 7px; color: var(--muted); }
.supplement-upload-grid input[type="file"] { min-height: 46px; padding: 7px; color: var(--ink); background: #fff; }
.supplement-upload-grid button { grid-column: 1 / -1; justify-self: end; }
.event-list { padding-top: 18px; }
.event-item { display: grid; grid-template-columns: 160px 170px 1fr; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.event-item time, .event-item span { color: var(--muted); }
dialog { width: min(650px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 0; border: 0; border-radius: 6px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(20, 28, 24, .42); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 19px; }
.dialog-head button { min-width: 36px; padding: 0; font-size: 22px; }
.settings-fields { display: grid; gap: 14px; padding: 20px 22px; }
.settings-fields label { color: var(--muted); }
.settings-fields input { margin-top: 6px; }
.verification-settings { padding: 0 22px 20px; border-top: 1px solid var(--line); }
.workflow-settings { display: grid; gap: 12px; padding: 0 22px 20px; border-top: 1px solid var(--line); }
.workflow-settings h3, .verification-settings h3 { margin: 18px 0 0; font-size: 15px; }
.workflow-settings label { color: var(--muted); }
.workflow-settings input { margin-top: 6px; }
.verification-settings h3 { margin-bottom: 12px; }
.verification-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.verification-status { min-height: 20px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.task-action-row { display: flex; margin: -6px 28px 14px; }
.notification-test { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 0 22px 18px; }
.notification-test span { flex: 1 0 100%; min-height: 20px; padding: 9px 10px; border-left: 3px solid var(--line); color: var(--muted); background: var(--soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(430px, calc(100vw - 44px)); padding: 12px 15px; border-radius: 5px; color: #fff; background: #27352e; box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .topbar { height: auto; min-height: 64px; align-items: flex-start; padding: 12px 14px; gap: 12px; }
  .top-actions { justify-content: flex-end; flex-wrap: wrap; }
  .system-state { width: 100%; text-align: right; }
  .workspace { height: auto; min-height: calc(100vh - 90px); grid-template-columns: 1fr; }
  .app.has-configuration-warning .workspace { height: auto; }
  .queue-pane { max-height: 42vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-pane { overflow: visible; }
  .decision-form, .decision-options, .decision-policy, .data-grid, .supplement-upload-grid { grid-template-columns: 1fr; }
  .decision-policy div { border-right: 0; border-bottom: 1px solid var(--line); }
  .decision-policy div:last-child { border-bottom: 0; }
  .decision-wide, .decision-save { grid-column: auto; }
  .supplement-upload-grid button { grid-column: auto; justify-self: stretch; }
  .data-grid .wide { grid-column: auto; }
  .approval-row, .detail-header { align-items: stretch; flex-direction: column; }
  .event-item { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
  .brand div { display: none; }
  .top-actions button { padding: 0 9px; }
  .system-state { display: none; }
  .pane-heading, .detail-header { padding-left: 16px; padding-right: 16px; }
  .configuration-warning { padding-left: 16px; padding-right: 16px; }
  .tabs, .tab-panel { padding-left: 16px; padding-right: 16px; }
  .blocking-banner, .execution-notice { margin-left: 16px; margin-right: 16px; }
  .tabs { gap: 13px; overflow-x: auto; }
  .tab { white-space: nowrap; }
}
