:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f7f9fd;
  --line: #dfe6f2;
  --line-strong: #c9d5e7;
  --text: #1b2638;
  --muted: #6f7e95;
  --accent: #2968ee;
  --accent-dark: #2055c9;
  --accent-soft: #edf3ff;
  --danger: #c53b32;
  --danger-soft: #fff1f0;
  --warning: #a15c00;
  --query-control-width: 220px;
  --query-control-wide: 260px;
  --shadow: 0 1px 2px rgba(17, 31, 38, .04), 0 8px 24px rgba(17, 31, 38, .05);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif; font-size: 14px; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { min-height: 36px; border: 1px solid var(--line-strong); background: var(--panel); color: #34444c; border-radius: 6px; padding: 7px 13px; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
button:hover { border-color: #aebbc1; background: #f8fafb; color: var(--text); }
button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(41, 104, 238, .15); outline-offset: 1px; border-color: var(--accent); }
button.primary { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 650; box-shadow: 0 3px 10px rgba(41, 104, 238, .17); }
button.primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); color: #fff; }
button.ghost { background: transparent; }
button[data-delete-user] { color: var(--danger); }
button[data-delete-user]:hover { border-color: #efc5c1; background: var(--danger-soft); }
button[data-delete-source] { color: var(--danger); }
button[data-delete-source]:hover { border-color: #efc5c1; background: var(--danger-soft); }
input, textarea, select { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; padding: 9px 11px; color: var(--text); transition: border-color .16s ease, box-shadow .16s ease; }
select { min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
input::placeholder, textarea::placeholder { color: #9aa7ad; }
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
input[type="checkbox"] { width: 15px; height: 15px; min-height: 15px; margin: 0; accent-color: var(--accent); }
textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.clearable-input { position: relative; display: block; width: 100%; min-width: 0; }
.clearable-input input, .clearable-input textarea { padding-right: 38px; }
.clearable-input.password-input input { padding-right: 78px; }
.clearable-input .clear-input-button { position: absolute; z-index: 2; top: 50%; right: 6px; width: 27px; min-width: 27px; height: 27px; min-height: 27px; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; padding: 0; color: #718087; font-size: 20px; line-height: 1; box-shadow: none; transform: translateY(-50%); }
.clearable-input .clear-input-button:hover { border: 0; background: #edf2f3; color: var(--text); }
.clearable-input .clear-input-button:active { transform: translateY(-50%); }
.clearable-input .clear-input-button:disabled { cursor: default; opacity: .3; background: transparent; }
.password-input .clear-input-button { right: 43px; }
.clearable-input .toggle-password-visibility { position: absolute; z-index: 2; top: 1px; right: 1px; width: 39px; min-width: 39px; height: calc(100% - 2px); min-height: 0; display: grid; place-items: center; border: 0; border-left: 1px solid var(--line-strong); border-radius: 0 5px 5px 0; background: #fff; padding: 0; color: #718087; line-height: 1; box-shadow: none; }
.clearable-input .toggle-password-visibility:hover { border: 0; border-left: 1px solid var(--line-strong); background: #f4f7f8; color: var(--text); }
.clearable-input .toggle-password-visibility:active { transform: none; }
.clearable-input .toggle-password-visibility svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.clearable-textarea .clear-input-button { top: 7px; transform: none; }
.clearable-textarea .clear-input-button:active { transform: none; }
.compact-search-wrap { width: 220px; min-width: 0; }
.compact-search { width: 220px; min-width: 0; }
.compact-search { min-height: 34px; padding: 6px 9px; }
.compact-date { min-width: 140px; }
.account-search-box { margin-left: auto; }
.batch-textarea { min-height: 104px; max-height: 180px; }
.import-panel { align-content: start; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background-color: #eef2f3; background-image: linear-gradient(rgba(255,255,255,.55) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px); background-size: 32px 32px; }
.login-card { position: relative; overflow: hidden; width: min(410px, 100%); gap: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 34px; box-shadow: 0 24px 70px rgba(17, 31, 38, .13); }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent); }
.login-card h1, .page h1, .panel h2, p { margin: 0; }
.login-card h1 { font-size: 21px; line-height: 1.3; }
.login-brand { display: flex; align-items: center; gap: 13px; }
.login-logo { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 7px; background: var(--accent); color: #fff; font-size: 20px; font-weight: 800; box-shadow: 0 6px 18px rgba(8, 127, 111, .2); }
.login-subtitle { margin-top: 3px; color: var(--muted); font-size: 13px; }
.login-card #login-form { gap: 17px; }
.login-card #login-form .error { margin: -5px 0 -4px; }
.login-remember { display: flex; align-items: center; gap: 8px; width: fit-content; color: #34444c; font-size: 13px; cursor: pointer; }
.login-submit { width: 100%; min-height: 42px; }
.login-secondary { min-height: 32px; margin-top: -18px; border: 0; background: transparent; color: var(--accent); box-shadow: none; }
.login-secondary:hover { border: 0; background: var(--accent-soft); color: var(--accent-dark); }
.login-card #login-reset-form { gap: 17px; }
.service-status-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background-color: #eef2f3; }
.service-status { position: relative; width: min(620px, 100%); display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 20px 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 28px; box-shadow: 0 24px 70px rgba(17, 31, 38, .13); }
.service-status::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent); }
.service-status[data-status-kind="offline"]::before, .service-status[data-status-kind="busy"]::before { background: #b67514; }
.service-status[data-status-kind="forbidden"]::before, .service-status[data-status-kind="session"]::before { background: var(--danger); }
.service-status-brand { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.service-status-brand .login-logo { width: 34px; height: 34px; flex-basis: 34px; font-size: 16px; box-shadow: none; }
.service-status-brand strong { font-size: 16px; }
.service-status-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 28px; font-weight: 700; line-height: 1; }
.service-status[data-status-kind="offline"] .service-status-icon, .service-status[data-status-kind="busy"] .service-status-icon { background: #fff5e6; color: var(--warning); }
.service-status[data-status-kind="forbidden"] .service-status-icon, .service-status[data-status-kind="session"] .service-status-icon { background: var(--danger-soft); color: var(--danger); }
.service-status-copy { display: grid; align-content: start; gap: 8px; padding-top: 2px; }
.service-status-copy .service-status-label { color: var(--accent-dark); font-size: 12px; font-weight: 750; }
.service-status-copy h1 { margin: 0; font-size: 24px; line-height: 1.3; }
.service-status-copy > p:last-child { max-width: 470px; color: #516168; line-height: 1.7; }
.service-status-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); padding: 11px 13px; color: var(--muted); font-size: 12px; }
.service-status-meta span { display: flex; align-items: center; gap: 7px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #d4932f; box-shadow: 0 0 0 3px rgba(212, 147, 47, .13); }
.service-status-actions { grid-column: 1 / -1; display: flex; gap: 9px; }
.service-status-actions button { min-width: 122px; }
.service-retry-status { grid-column: 1 / -1; min-height: 18px; color: var(--muted); font-size: 12px; }
.service-status-details { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 13px; color: var(--muted); font-size: 12px; }
.service-status-details summary { width: fit-content; cursor: pointer; color: #516168; }
.service-status-details p { margin-top: 9px; border-radius: 5px; background: var(--panel-soft); padding: 10px; overflow-wrap: anywhere; line-height: 1.55; }
.toast-region { position: fixed; z-index: 3000; top: 50%; left: 50%; width: min(390px, calc(100vw - 36px)); display: grid; gap: 9px; pointer-events: none; transform: translate(-50%, -50%); }
.toast { display: grid; grid-template-columns: 30px minmax(0, 1fr) 28px; align-items: start; gap: 10px; border: 1px solid #efc5c1; border-radius: 7px; background: #fff; padding: 12px; box-shadow: 0 14px 38px rgba(17, 31, 38, .16); pointer-events: auto; }
.toast-warning { border-color: #ead2a9; }
.toast-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--danger-soft); color: var(--danger); font-weight: 800; }
.toast-warning .toast-mark { background: #fff5e6; color: var(--warning); }
.toast strong { font-size: 13px; }
.toast p { margin-top: 3px; color: #516168; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.toast > button { width: 28px; min-width: 28px; height: 28px; min-height: 28px; border: 0; background: transparent; padding: 0; color: var(--muted); font-size: 19px; box-shadow: none; }
.toast > button:hover { border: 0; background: var(--panel-soft); }
.login-form-actions { flex-wrap: nowrap; }
.login-form-actions button { flex: 1 1 0; }
.hint, .meta, .field-help { color: var(--muted); font-size: 13px; line-height: 1.55; }
.form-grid { display: grid; gap: 14px; }
.label { display: grid; gap: 7px; color: #516168; font-size: 13px; font-weight: 550; }
.error { color: var(--danger); min-height: 18px; font-size: 13px; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #10262c; color: #eef8f6; padding: 20px 12px; border-right: 1px solid rgba(255,255,255,.05); }
.brand { position: relative; margin: 0 6px 22px; padding: 5px 4px 5px 38px; font-size: 16px; font-weight: 750; line-height: 28px; }
.brand::before { content: "P"; position: absolute; left: 0; top: 3px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 6px; background: #34b7a5; color: #092a28; font-size: 16px; font-weight: 850; }
.nav { display: grid; gap: 4px; }
.nav button { width: 100%; min-height: 42px; border: 0; background: transparent; color: #b9c9cc; text-align: left; padding: 10px 13px; border-radius: 6px; box-shadow: none; }
.nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav button.active { position: relative; background: #1b403f; color: #fff; font-weight: 650; }
.nav button.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #49c7b6; }
.main { min-width: 0; max-width: 100%; }
.topbar { position: sticky; top: 0; z-index: 30; height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 26px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.topbar strong { font-size: 14px; }
.content { width: min(1440px, calc(100vw - 268px)); margin: 0 auto; padding: 28px 0 44px; }
.page { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 18px; }
.page > * { min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head > div:first-child { display: grid; gap: 5px; }
.page h1 { font-size: 25px; line-height: 1.25; font-weight: 750; }
.page h1 + .hint { max-width: 760px; }
.grid { display: grid; min-width: 0; gap: 16px; }
.grid > * { min-width: 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .metric { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.panel { padding: 18px; }
.panel h2 { font-size: 17px; margin-bottom: 14px; line-height: 1.35; }
.metric { position: relative; overflow: hidden; padding: 18px; }
.metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); }
.metric .value { font-size: 28px; font-weight: 750; margin-top: 8px; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.table-actions { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.table-actions button { min-height: 32px; padding: 5px 10px; white-space: nowrap; }
.credential-value { font-family: Consolas, "Courier New", monospace; user-select: all; }
.select-cell { width: 42px; text-align: center; }
.form-actions { justify-content: flex-end; padding-top: 2px; }
.form-fields { display: grid; gap: 14px; }
.form-fields.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compact-field { width: min(260px, 100%); }
.config-workspace { border-left: 3px solid var(--accent); }
.config-workspace .form-fields { align-items: start; }
.config-workspace .form-fields > .label { align-self: start; width: 100%; }
.required-mark { color: var(--danger); font-style: normal; font-weight: 750; }
.panel-head-actions { flex-wrap: wrap; justify-content: flex-end; }
.action-divider { width: 1px; height: 24px; margin: 0 2px; background: var(--line); }
.source-auto-recognize { display: grid; gap: 9px; border: 1px solid #d7e3e1; border-radius: 6px; background: #f5f9f8; padding: 14px; }
.source-auto-recognize-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.source-auto-recognize-head > div { display: grid; gap: 2px; }
.source-auto-recognize-head strong { color: var(--text); font-size: 14px; }
.source-auto-recognize-head span { color: var(--muted); font-size: 12px; }
.source-auto-recognize textarea { min-height: 92px; max-height: 150px; background: #fff; font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.source-import-workspace { width: 100%; }
.source-import-top { display: flex; align-items: end; gap: 14px; }
.source-import-top .label { width: min(240px, 100%); }
.source-import-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.source-import-summary strong { color: var(--text); font-size: 14px; }
.source-import-table table { min-width: 1160px; }
.source-import-table th { white-space: nowrap; }
.source-import-table td { min-width: 125px; padding: 8px 6px; }
.source-import-table td:first-child { min-width: 210px; }
.source-import-table td:nth-child(3) { min-width: 170px; }
.source-import-table td:nth-child(6) { min-width: 150px; }
.source-import-table td:nth-child(7) { min-width: 135px; }
.source-import-table td:last-child { min-width: 52px; text-align: center; }
.source-import-table input { width: 100%; min-width: 0; height: 36px; padding: 7px 8px; }
.icon-button { width: 34px; min-width: 34px; height: 34px; padding: 0; font-size: 18px; line-height: 1; }
.import-status { display: inline-block; font-size: 12px; font-weight: 650; line-height: 1.35; }
.import-status.is-ready { color: var(--accent-dark); }
.import-status.is-error { color: var(--danger); }
.auto-recognize-state { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.auto-recognize-state[data-state="loading"] { color: #775b00; }
.auto-recognize-state[data-state="success"] { color: var(--accent-dark); font-weight: 650; }
.auto-recognize-state[data-state="warning"], .auto-recognize-state[data-state="error"] { color: var(--danger); }
.account-workspace { overflow: visible; padding: 0; }
.account-editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding: 22px 24px 20px; }
.account-editor-header > div { display: grid; gap: 5px; }
.account-editor-header h2 { margin: 0; color: var(--text); font-size: 21px; }
.account-editor-header p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.account-editor-kicker { color: var(--accent-dark); font-size: 11px; font-weight: 750; }
.account-editor-header > button { flex: 0 0 auto; }
.account-editor-body { display: grid; }
.account-editor-section { display: grid; gap: 22px; border-bottom: 1px solid var(--line); padding: 22px 24px; }
.account-editor-section:last-child { border-bottom: 0; }
.account-profile-section { padding-top: 18px; padding-bottom: 16px; }
.account-profile-fields { align-items: start; column-gap: 14px; row-gap: 10px; }
.account-profile-fields > .label { grid-template-rows: 28px 44px auto; gap: 6px; }
.account-profile-fields input, .account-profile-fields select, .account-profile-fields .clearable-input { min-height: 44px; }
.account-profile-fields .field-help { min-height: 18px; font-size: 12px; font-weight: 400; line-height: 1.45; }
.profile-field-heading { min-height: 28px; display: flex; align-items: center; }
.password-label-row { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.readonly-profile-field { min-height: 44px; display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: #f4f7f8; padding: 9px 11px; color: #34444c; font-weight: 650; }
.generate-password-button { min-height: 26px; display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 2px 4px; color: var(--accent); font-size: 12px; box-shadow: none; }
.generate-password-button:hover { border: 0; background: var(--accent-soft); color: var(--accent-dark); }
.generate-password-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.account-permission-groups { min-width: 0; display: grid; gap: 22px; }
.account-permission-group, .account-owned-merchants, .account-shared-merchants { min-width: 0; display: grid; gap: 10px; }
.account-group-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.account-group-title strong { color: #34444c; font-size: 13px; }
.account-group-title span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.account-workspace .checkbox-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.account-workspace .check { min-height: 42px; border-color: var(--line); background: var(--panel-soft); padding: 8px 10px; line-height: 1.35; }
.account-workspace .check:hover { border-color: #a9bfe8; background: #f7f9ff; }
.account-workspace .check:has(input:checked) { border-color: #a9bfe8; background: var(--accent-soft); color: #2455b0; box-shadow: inset 2px 0 0 var(--accent); }
.account-workspace .check input { flex: 0 0 auto; }
.account-merchant-section { align-items: start; }
.account-owned-merchants + .account-shared-merchants { margin-top: 8px; }
.readonly-permissions { display: grid; gap: 17px; }
.readonly-permissions > div { display: grid; gap: 8px; }
.self-permission-notice { border: 1px solid #d9e4f5; border-radius: 7px; background: #f3f7fe; padding: 11px 13px; color: #4a6287; font-size: 13px; line-height: 1.55; }
.readonly-pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.account-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: #fafcfc; padding: 16px 24px; border-radius: 0 0 8px 8px; }
.account-editor-actions button { min-width: 96px; }
.config-workspace .page-head { align-items: flex-start; }
.source-list-head { margin-bottom: 14px; }
.source-list-head h2 { margin-bottom: 2px; }
.list-filter-form { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: end; gap: 12px; margin-bottom: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-soft); }
.list-filter-form label { width: var(--query-control-width); min-width: var(--query-control-width); flex: 0 0 var(--query-control-width); display: grid; gap: 6px; color: #43535a; font-size: 12px; font-weight: 650; }
.list-filter-form input, .list-filter-form select { width: 100%; min-width: 0; background: #fff; }
.list-filter-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-left: auto; }
.list-filter-actions button { min-width: 68px; }
.workspace-only { width: min(100%, 1180px); margin-inline: auto; }
.workspace-only .config-workspace, .workspace-only .account-workspace { margin: 0; }
.empty-state { padding: 32px 16px; color: var(--muted); text-align: center; }
.detail-table-head { align-items: flex-start; margin-bottom: 14px; }
.detail-table-head h2 { margin-bottom: 2px; }
.detail-table-controls { min-width: 0; flex: 1 1 auto; display: flex; align-items: flex-start; justify-content: flex-start; gap: 8px; }
.detail-table-controls .merchant-choice-bar { width: auto; flex: 0 1 auto; }
.detail-table-controls .merchant-inline-options { flex: 0 1 auto; }
.detail-column-control { flex: 0 0 auto; display: grid; justify-items: end; gap: 3px; margin-left: auto; }
.detail-column-control .hint { font-size: 11px; white-space: nowrap; }
.column-picker { position: relative; flex: 0 0 auto; }
.column-picker-menu { position: absolute; z-index: 25; top: calc(100% + 6px); right: 0; width: min(420px, calc(100vw - 32px)); max-height: 240px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 14px 36px rgba(17, 31, 38, .16); }
.column-picker-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.column-picker-title button { min-height: 30px; padding: 4px 9px; }
.config-page #source-table-panel th:first-child,
.config-page #source-table-panel td:first-child { width: 42px; padding-left: 8px; padding-right: 8px; }
.config-page #source-table-panel th,
.config-page #source-table-panel td { vertical-align: middle; }
.source-open-date-cell { color: #2378DD; font-weight: 500; background: transparent; }
.config-page #source-table-panel tbody tr { height: 58px; }
.permission-section { display: grid; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); }
.permission-section h2 { margin: 0; }
.permission-section .meta { font-weight: 650; color: #43535a; }
.merchant-relations { display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; align-items: center; }
.merchant-relations-scroll { max-height: 150px; align-content: flex-start; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.merchant-share-picker { display: grid; gap: 8px; }
.merchant-option-list { max-height: 280px; overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; scrollbar-gutter: stable; }
.account-merchant-picker { position: relative; width: 100%; min-width: 0; }
.account-merchant-picker .merchant-inline-options { justify-content: flex-start; }
.account-merchant-picker .account-merchant-menu { width: max-content; min-width: 220px; max-width: min(320px, calc(100vw - 32px)); }
.account-merchant-picker .account-merchant-options { width: max-content; min-width: 200px; max-width: 300px; }
.account-merchant-picker .account-merchant-options .merchant-choice { width: 100%; min-width: 160px; max-width: 290px; }
.account-merchant-trigger { width: 100%; min-height: 40px; display: grid; grid-template-columns: minmax(0, 1fr) 22px; align-items: center; gap: 8px; padding: 5px 8px 5px 10px; background: #fff; text-align: left; }
.account-merchant-trigger > span { min-width: 0; display: flex; align-items: center; gap: 8px; }
.account-merchant-trigger small { color: var(--muted); font-size: 11px; }
.account-merchant-trigger strong { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 4px; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 550; white-space: nowrap; }
.account-merchant-trigger strong .pill { flex: 0 1 auto; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-merchant-trigger > b { color: var(--accent-dark); font-size: 17px; text-align: center; transition: transform .16s ease; }
.account-merchant-trigger[aria-expanded="true"] { border-color: #88a8de; box-shadow: 0 0 0 3px rgba(41, 104, 238, .09); }
.account-merchant-trigger[aria-expanded="true"] > b { transform: rotate(180deg); }
.account-merchant-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(420px, 100%); display: grid; gap: 8px; border: 1px solid #cfdadd; border-radius: 8px; background: #fff; padding: 10px; box-shadow: 0 14px 36px rgba(17, 31, 38, .16); }
.account-merchant-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-merchant-menu-head > div { display: grid; gap: 3px; }
.account-merchant-menu-head small { color: var(--muted); font-size: 11px; }
.account-merchant-menu-head button { min-height: 30px; padding: 4px 9px; }
.account-merchant-menu .compact-search-wrap { width: 100%; }
.account-merchant-options { max-height: 240px; display: grid; gap: 5px; overflow-y: auto; padding-right: 2px; scrollbar-gutter: stable; }
.account-merchant-option { min-width: 0; min-height: 40px; max-height: 44px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); padding: 4px 7px; cursor: pointer; }
.account-merchant-option:hover { border-color: #a9bfe8; background: #f4f7ff; }
.account-merchant-option.selected { border-color: #b6c9ee; background: var(--accent-soft); }
.account-merchant-option > span { min-width: 0; display: grid; gap: 0; line-height: 1.15; }
.account-merchant-option strong, .account-merchant-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-merchant-option small { color: var(--muted); font-size: 11px; }
.account-merchant-option em { border-radius: 999px; background: #eef2f3; padding: 3px 7px; color: var(--muted); font-size: 11px; font-style: normal; white-space: nowrap; }
.account-merchant-option.selected em { background: #d5eee8; color: var(--accent-dark); }
.account-merchant-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.account-merchant-pager > div { display: flex; align-items: center; gap: 7px; }
.account-merchant-pager button { min-height: 30px; padding: 4px 9px; }
.account-merchant-empty { padding: 24px 8px; text-align: center; }
.merchant-cell-summary { max-width: 410px; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.merchant-cell-summary .pill { flex: 0 1 auto; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-cell-summary .merchant-match { border-color: #779fe7; background: #edf3ff; color: #2455b0; box-shadow: inset 0 0 0 1px rgba(41, 104, 238, .09); }
.merchant-more { flex: 0 0 auto; min-height: 26px; border-color: #b8d8d2; border-radius: 999px; background: var(--accent-soft); padding: 3px 9px; color: var(--accent-dark); font-size: 12px; font-weight: 650; white-space: nowrap; }
.merchant-more:hover { border-color: var(--accent); background: #d9f0eb; }
.user-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.user-detail-head > div { display: grid; gap: 2px; }
.user-detail-head > div > span { color: var(--muted); font-size: 11px; }
.user-detail-head > div > strong { color: var(--text); font-size: 15px; }
.user-detail-section { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: start; gap: 8px; }
.user-detail-section > strong { padding-top: 5px; color: #53636a; font-size: 12px; }
.user-detail-list { min-width: 0; display: flex; flex-wrap: wrap; gap: 3px; }
.user-detail-list .pill { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.user-detail-permissions { padding-top: 8px; border-top: 1px solid #edf1f2; }
.merchant-table-scroll { max-height: 440px; overflow: auto; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; }
.check { display: flex; min-height: 34px; gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid transparent; border-radius: 5px; color: #34444c; font-size: 13px; cursor: pointer; }
.check:hover { border-color: var(--line); background: #fff; }
.check:has(input:checked) { background: var(--accent-soft); color: #2455b0; }
.check input { width: 15px; min-height: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.accounts-page > .grid.two { grid-template-columns: minmax(420px, .82fr) minmax(520px, 1.18fr); align-items: start; }
.account-form { position: sticky; top: 80px; }
.account-list { min-width: 0; }
.account-list .table-wrap { margin-top: 4px; }
.account-list table { table-layout: auto; }
.account-list th, .account-list td { padding-left: 10px; padding-right: 10px; white-space: normal; vertical-align: middle; }
.account-list th:nth-child(1), .account-list td:nth-child(1) { min-width: 86px; }
.account-list th:nth-child(2), .account-list td:nth-child(2) { min-width: 58px; white-space: nowrap; }
.account-list th:nth-child(3), .account-list td:nth-child(3) { min-width: 54px; white-space: nowrap; }
.account-list th:nth-child(4), .account-list td:nth-child(4) { min-width: 58px; white-space: nowrap; }
.account-list th:nth-child(5), .account-list td:nth-child(5) { min-width: 140px; }
.account-list th:last-child, .account-list td:last-child { min-width: 116px; }
.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 7px; background: #fff; scrollbar-color: #aab6bb transparent; scrollbar-width: thin; }
.table-wrap:focus-visible { outline: 3px solid rgba(41, 104, 238, .15); outline-offset: 2px; border-color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfc; }
th { background: #f6f8f9; color: #5a6970; font-size: 12px; font-weight: 700; text-transform: none; }
.summary-page .table-wrap th:first-child,
.summary-page .table-wrap td:first-child,
.accounts-page .table-wrap th:first-child,
.accounts-page .table-wrap td:first-child,
.details-page .table-wrap th:first-child,
.details-page .table-wrap td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 1px 0 0 var(--line); }
.summary-page .table-wrap thead th:first-child,
.accounts-page .table-wrap thead th:first-child,
.details-page .table-wrap thead th:first-child { z-index: 3; background: #f6f8f9; }
.config-page #source-table-panel th:first-child,
.config-page #source-table-panel td:first-child { position: sticky; left: 0; z-index: 3; background: #fff; }
.config-page #source-table-panel th:nth-child(2),
.config-page #source-table-panel td:nth-child(2) { position: sticky; left: 42px; z-index: 2; background: #fff; box-shadow: 1px 0 0 var(--line); }
.config-page #source-table-panel thead th:first-child,
.config-page #source-table-panel thead th:nth-child(2) { background: #f6f8f9; }
.pill { display: inline-flex; align-items: center; border: 1px solid #d9e3e5; border-radius: 999px; background: #f7fafb; padding: 3px 8px; font-size: 12px; color: #58686f; margin: 2px; }
.detail-wrap { position: relative; display: inline-flex; }
.permission-popover { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: min(420px, 70vw); gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 18px 48px rgba(17, 31, 38, .18); white-space: normal; }
.permission-popover.is-open { display: grid; }
.permission-popover.floating-detail { position: fixed; z-index: 1000; width: min(460px, calc(100vw - 24px)); max-height: min(420px, calc(100vh - 24px)); overflow: auto; }
.permission-popover.floating-detail > div { min-width: 0; overflow-wrap: anywhere; }
.status-ok { color: #08745b; }
.status-warn { color: var(--warning); }
.status-empty { border-color: #ead7a0; background: #fff9e8; color: #856100; }
.fetch-error { display: -webkit-box; max-width: 220px; margin-top: 5px; overflow: hidden; color: #a33a16; font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.fetch-status-cell { width: 142px; min-width: 142px; max-width: 142px; overflow: visible; }
.fetch-status-cell .fetch-error, .fetch-status-cell .fetch-action { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fetch-status-cell .fetch-action { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.fetch-status-summary { max-width: 100%; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
.fetch-status-summary > .pill { min-width: 0; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fetch-success-time { margin-top: 2px; white-space: nowrap; }
.status-help-wrap { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; }
.status-help-button { display: inline-grid; width: 19px; min-width: 19px; height: 19px; min-height: 19px; place-items: center; border: 1px solid #c9d7da; border-radius: 50%; background: #fff; padding: 0; color: #64767d; font-size: 12px; font-weight: 750; line-height: 1; box-shadow: none; }
.status-help-button:hover, .status-help-button:focus-visible, .status-help-button:focus { border-color: #88a8de; background: #f0f5ff; color: var(--accent-dark); box-shadow: 0 0 0 3px rgba(41, 104, 238, .11); }
.status-help-tooltip { position: absolute; top: 50%; right: calc(100% + 10px); z-index: 50; display: none; width: 264px; gap: 6px; border: 1px solid #cbd8da; border-radius: 7px; background: #fff; padding: 12px 13px; color: var(--text); font-size: 12px; font-weight: 400; line-height: 1.5; text-align: left; white-space: normal; overflow-wrap: anywhere; box-shadow: 0 16px 38px rgba(21, 43, 49, .18); transform: translateY(-50%); }
.status-help-tooltip::before { content: ""; position: absolute; top: 50%; right: -5px; width: 8px; height: 8px; border-top: 1px solid #cbd8da; border-right: 1px solid #cbd8da; background: #fff; transform: translateY(-50%) rotate(45deg); }
.status-help-tooltip strong { color: var(--text); font-size: 13px; }
.status-help-tooltip > span { display: block; }
.status-help-tooltip .status-help-action { border-top: 1px solid #edf1f2; padding-top: 6px; color: #53666d; }
.status-help-tooltip .status-help-retry { color: #7a5a00; font-variant-numeric: tabular-nums; }
.status-help-wrap:hover .status-help-tooltip, .status-help-wrap:focus-within .status-help-tooltip { display: grid; }
.config-page #source-table-panel th:last-child,
.config-page #source-table-panel td:last-child { min-width: 218px; }
.config-page #source-table-panel td:last-child .table-actions { gap: 5px; }
.config-page #source-table-panel td:last-child .table-actions button { padding-inline: 9px; }
.compare-board { display: grid; gap: 10px; }
.excel-strip { overflow: auto; border: 1px solid #222; background: #fff; }
.excel-grid { min-width: 1320px; display: grid; grid-template-columns: 100px repeat(15, 101px) 1fr; font-size: 12px; }
.excel-cell { min-height: 22px; padding: 3px 5px; border-right: 1px solid #222; border-bottom: 1px solid #222; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.excel-green { background: #c6e0b4; font-weight: 700; }
.excel-blue { background: #d9eaf7; font-weight: 700; }
.excel-yellow { background: #fff2cc; font-weight: 700; }
.excel-note { color: #f00; }
.compare-title { font-size: 28px; font-weight: 900; margin: 6px 0 2px; }
.compare-table table { border-color: #111; }
.compare-table th, .compare-table td { border: 1px solid #111; padding: 4px 8px; text-align: right; background: #fff; color: #000; }
.compare-table th { background: #f2f2f2; font-weight: 800; text-align: center; }
.compare-table .metric-head { font-size: 16px; }
.compare-table td:first-child, .compare-table th:first-child { text-align: center; position: sticky; left: 0; z-index: 2; background: #fff; }
.compare-table thead th:first-child { background: #f2f2f2; }
.compare-table .diff-pos { color: #f00; font-weight: 700; }
.compare-table .diff-neg { color: #00a000; font-weight: 700; }
.compare-table .reserved, .compare-table td.reserved { background: #e7e6e6; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; background: rgba(16, 38, 44, .42); backdrop-filter: blur(3px); }
.confirm-dialog { width: min(460px, 100%); display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 22px; box-shadow: 0 24px 70px rgba(17, 31, 38, .22); }
.confirm-dialog-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #fff5e6; color: var(--warning); font-size: 21px; font-weight: 800; }
.confirm-dialog-body { display: grid; gap: 9px; align-content: start; }
.confirm-dialog-body h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.confirm-dialog-body p { color: #34444c; line-height: 1.6; overflow-wrap: anywhere; }
.confirm-dialog-body .confirm-dialog-detail { color: var(--muted); font-size: 13px; }
.confirm-dialog-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.duplicate-source-dialog { width: min(620px, 100%); }
.duplicate-source-actions { flex-wrap: wrap; }
.danger-text { color: var(--danger); }
.compare-picker-head { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; justify-content: start; gap: 24px; }
.compare-picker-head h2 { margin-bottom: 4px; }
.compare-merchant-dropdown { position: relative; width: min(440px, 100%); flex: 0 1 440px; }
.compare-merchant-trigger { width: 100%; min-height: 52px; display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; gap: 10px; border-color: #c7d5d7; background: #fff; padding: 7px 10px 7px 12px; text-align: left; box-shadow: 0 1px 2px rgba(17, 31, 38, .04); }
.compare-merchant-trigger:hover, .compare-merchant-trigger[aria-expanded="true"] { border-color: #88a8de; background: #fbfcff; box-shadow: 0 0 0 3px rgba(41, 104, 238, .09); }
.compare-merchant-trigger-copy { min-width: 0; display: grid; gap: 3px; }
.compare-merchant-trigger-copy small { color: var(--muted); font-size: 11px; font-weight: 550; }
.compare-merchant-trigger-copy strong { overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.compare-merchant-trigger-action { display: grid; width: 24px; height: 24px; place-items: center; color: var(--accent-dark); font-size: 17px; font-weight: 650; line-height: 1; transition: transform .16s ease; }
.compare-merchant-trigger[aria-expanded="true"] .compare-merchant-trigger-action { transform: rotate(180deg); }
.compare-merchant-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 30; width: min(520px, calc(100vw - 32px)); border: 1px solid #cfdadd; border-radius: 8px; background: #fff; padding: 11px; box-shadow: 0 18px 48px rgba(17, 31, 38, .18); }
.compare-merchant-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.compare-merchant-tools .compact-search { flex: 1 1 240px; }
.compare-merchant-tools .compact-search-wrap { flex: 1 1 240px; width: auto; }
.compare-merchant-options { max-height: 300px; display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 9px; overflow-y: auto; padding-right: 2px; scrollbar-gutter: stable; }
.compare-merchant-option { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; background: var(--panel-soft); cursor: pointer; }
.compare-merchant-option:hover { border-color: #a9bfe8; background: #f4f7ff; }
.compare-merchant-option:has(input:checked) { border-color: #b6c9ee; background: var(--accent-soft); }
.compare-merchant-option span { min-width: 0; display: grid; gap: 3px; }
.compare-merchant-option strong, .compare-merchant-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-merchant-option small { color: var(--muted); font-size: 12px; }
.merchant-choice-bar { position: relative; min-width: 0; width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 7px; }
.merchant-inline-options { min-width: 0; display: flex; flex: 1 1 auto; justify-content: flex-start; gap: 7px; overflow: hidden; }
.merchant-inline-item { flex: 0 0 auto; }
.merchant-choice { width: max-content; min-width: 0; max-width: 220px; height: 40px; min-height: 40px; display: grid; grid-template-columns: 16px max-content; align-items: center; gap: 7px; border-color: var(--line); background: #fff; padding: 4px 8px; text-align: left; }
.merchant-choice:hover { border-color: #a5bce8; background: #f5f8ff; }
.merchant-choice.selected { border-color: #88a8de; background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 2px 0 0 var(--accent); }
.merchant-choice:disabled { cursor: not-allowed; opacity: .48; }
.merchant-choice-state { display: grid; width: 15px; height: 15px; place-items: center; border: 1px solid #93a2a8; border-radius: 3px; background: #fff; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.merchant-choice.selected .merchant-choice-state { border-color: var(--accent); background: var(--accent); }
.merchant-choice-copy { min-width: 0; display: grid; gap: 1px; }
.merchant-choice strong, .merchant-choice small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-choice strong { color: var(--text); font-size: 12px; }
.merchant-choice small { color: var(--muted); font-size: 10px; font-weight: 400; }
.merchant-overflow { position: relative; flex: 0 0 auto; }
.merchant-more-trigger { height: 40px; min-height: 40px; display: flex; align-items: center; gap: 7px; padding: 5px 9px; white-space: nowrap; }
.merchant-more-trigger b { color: var(--accent-dark); font-size: 15px; transition: transform .16s ease; }
.merchant-more-trigger[aria-expanded="true"] b { transform: rotate(180deg); }
.compact-merchant-menu { position: absolute; z-index: 35; top: calc(100% + 6px); right: 0; left: auto; width: max-content; min-width: 180px; max-width: min(320px, calc(100vw - 32px)); display: grid; gap: 8px; border: 1px solid #cfdadd; border-radius: 8px; background: #fff; padding: 9px; box-shadow: 0 14px 36px rgba(17, 31, 38, .16); }
.compact-merchant-menu .compact-search { width: 100%; background: var(--panel-soft); }
.compact-merchant-options { max-height: 240px; display: grid; gap: 5px; overflow-y: auto; padding-right: 2px; scrollbar-gutter: stable; }
.compact-merchant-options .merchant-choice { width: 100%; max-width: 300px; grid-template-columns: 16px minmax(0, max-content); }
.compare-table-shell { position: relative; min-width: 0; }
.data-warning { color: #a65300; }
.compare-common-time { margin: 0 0 8px; }
.data-warning { border-left: 3px solid #d58a25; background: #fff7e8; padding: 8px 10px; }
.compare-table td.missing-value { background: #fffaf0; color: #8b6a39; cursor: help; }
.compare-top-scroll { width: 100%; height: 13px; margin-bottom: 5px; overflow-x: auto; overflow-y: hidden; scrollbar-color: #8d9ba1 #eef2f3; scrollbar-width: thin; }
.compare-top-scroll span { display: block; height: 1px; }
.compare-table-shell::before, .compare-table-shell::after { content: ""; position: absolute; z-index: 7; top: 18px; bottom: 0; width: 22px; pointer-events: none; opacity: 0; transition: opacity .16s ease; }
.compare-table-shell::before { left: 74px; background: linear-gradient(90deg, rgba(20, 36, 42, .16), transparent); }
.compare-table-shell::after { right: 0; background: linear-gradient(270deg, rgba(20, 36, 42, .16), transparent); }
.compare-table-shell.can-scroll-left::before, .compare-table-shell.can-scroll-right::after { opacity: 1; }
.compare-table { max-height: min(68vh, 720px); }
.compare-table table { width: max-content; min-width: 100%; }
.compare-table th, .compare-table td { min-width: 72px; }
.compare-table thead th { position: sticky; top: 0; z-index: 4; }
.dual-merchant .compare-table thead tr:nth-child(2) th { top: 31px; }
.compare-table td:first-child, .compare-table th:first-child { width: 74px; min-width: 74px; }
.compare-table thead th:first-child { z-index: 6; }
.single-merchant .compare-table table { width: max(100%, calc(74px + var(--metric-count) * 120px)); min-width: calc(74px + var(--metric-count) * 120px); table-layout: fixed; }
.single-merchant .compare-table th:not(:first-child), .single-merchant .compare-table td:not(:first-child) { width: 120px; min-width: 120px; }
.pager { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(110px, 1fr); align-items: center; gap: 14px; margin-top: 14px; }
.pager-summary, .pager-position { color: var(--muted); font-size: 13px; white-space: nowrap; }
.pager-summary { display: flex; align-items: center; gap: 10px; }
.pager-summary label { display: inline-flex; align-items: center; gap: 6px; }
.pager-summary select { width: auto; min-width: 76px; min-height: 34px; padding: 5px 28px 5px 9px; color: #34444c; }
.pager-position { text-align: right; }
.pager-controls { max-width: 100%; display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 5px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.pager-pages { width: calc(var(--pager-slots) * 39px - 5px); min-width: calc(var(--pager-slots) * 39px - 5px); display: grid; grid-template-columns: repeat(var(--pager-slots), 34px); gap: 5px; }
.pager-controls button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; }
.pager-controls button.active { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700; }
.pager-controls button:disabled { cursor: default; opacity: .42; transform: none; }
.pager-controls button:active { transform: none; }
.pager-icon { font-size: 20px; line-height: 1; }
.pager-ellipsis { display: grid; width: 34px; height: 34px; place-items: center; color: var(--muted); text-align: center; }
.details-title-head { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; justify-content: start; gap: 24px; }
.detail-merchant-picker { position: relative; width: min(380px, 100%); flex: 0 1 380px; }
.detail-merchant-trigger { width: 100%; min-height: 52px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 24px; align-items: center; gap: 10px; border-color: #c7d5d7; background: #fff; padding: 7px 9px; text-align: left; box-shadow: 0 1px 2px rgba(17, 31, 38, .04); }
.detail-merchant-trigger:hover, .detail-merchant-trigger[aria-expanded="true"] { border-color: #88a8de; background: #fbfcff; box-shadow: 0 0 0 3px rgba(41, 104, 238, .09); }
.detail-merchant-badge, .detail-merchant-option i { display: grid; place-items: center; background: #e4f2ef; color: var(--accent-dark); font-style: normal; font-weight: 750; }
.detail-merchant-badge { width: 34px; height: 34px; border-radius: 5px; font-size: 10px; letter-spacing: 0; }
.detail-merchant-copy { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 2px 8px; }
.detail-merchant-copy small { color: var(--muted); font-size: 11px; font-weight: 550; }
.detail-merchant-copy strong { min-width: 0; overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.detail-merchant-copy em { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.detail-merchant-action { display: grid; width: 24px; height: 24px; place-items: center; color: var(--accent-dark); font-size: 17px; font-weight: 650; line-height: 1; transition: transform .16s ease; }
.detail-merchant-trigger[aria-expanded="true"] .detail-merchant-action { transform: rotate(180deg); }
.detail-merchant-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 25; width: min(380px, calc(100vw - 32px)); border: 1px solid #cfdadd; border-radius: 8px; background: #fff; padding: 11px; box-shadow: 0 18px 48px rgba(17, 31, 38, .18); }
.detail-merchant-menu-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.detail-merchant-menu-head > div { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.detail-merchant-menu-head strong { font-size: 14px; }
.detail-merchant-menu-head small { color: var(--muted); font-size: 12px; }
.detail-merchant-menu .compact-search { width: 100%; background: var(--panel-soft); }
.detail-merchant-menu .compact-search-wrap { width: 100%; }
.detail-merchant-options { max-height: 300px; display: grid; gap: 6px; margin-top: 9px; overflow-y: auto; padding-right: 2px; scrollbar-gutter: stable; }
button.detail-merchant-option { width: 100%; min-height: 56px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; align-items: center; gap: 10px; border-color: transparent; background: var(--panel-soft); padding: 8px 10px; text-align: left; }
button.detail-merchant-option:hover { border-color: #acd4cd; background: #eff8f6; }
button.detail-merchant-option.active { border-color: #91abe0; background: #f0f5ff; box-shadow: inset 3px 0 0 var(--accent); }
.detail-merchant-option i { width: 34px; height: 34px; border-radius: 5px; font-size: 11px; }
.detail-merchant-option span { min-width: 0; display: grid; gap: 3px; }
.detail-merchant-option strong, .detail-merchant-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-merchant-option strong { color: var(--text); font-size: 13px; }
.detail-merchant-option small { color: var(--muted); font-size: 12px; }
.detail-merchant-option > b { color: var(--accent); font-size: 16px; text-align: center; }
@media (max-width: 1180px) { .accounts-page > .grid.two { grid-template-columns: minmax(0, 1fr); } .account-form { position: static; } }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; padding: 12px; overflow: visible; }
  .brand { margin-bottom: 10px; }
  .nav { display: flex; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { width: auto; min-width: max-content; }
  .nav button.active::before { inset: auto 12px 0; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .topbar { top: 0; height: 58px; padding: 0 16px; }
  .content { width: min(100% - 28px, 1440px); padding-top: 20px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .form-fields.four { grid-template-columns: 1fr; }
  .form-fields.three { grid-template-columns: 1fr; }
  .account-editor-section { gap: 16px; }
  .account-workspace .checkbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-profile-fields .field-help { min-height: 0; }
  .panel-head-actions { justify-content: flex-start; }
  .action-divider { display: none; }
  .list-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-filter-actions { align-self: end; }
}
@media (max-width: 620px) {
  .service-status-page { padding: 14px; place-items: center; }
  .service-status { grid-template-columns: 46px minmax(0, 1fr); gap: 16px; padding: 20px; }
  .service-status-brand { padding-bottom: 14px; }
  .service-status-icon { width: 46px; height: 46px; font-size: 23px; }
  .service-status-copy h1 { font-size: 20px; }
  .service-status-meta { align-items: flex-start; flex-direction: column; }
  .service-status-actions { flex-direction: column; }
  .service-status-actions button { width: 100%; }
  .toast-region { width: calc(100vw - 20px); }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; gap: 4px; }
  .nav button { width: 100%; min-width: 0; min-height: 42px; justify-content: center; padding: 7px 5px; line-height: 1.3; text-align: center; white-space: normal; }
  .page-head { align-items: stretch; flex-direction: column; }
  .source-auto-recognize-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .source-import-top, .source-import-summary { align-items: stretch; flex-direction: column; }
  .page h1 { font-size: 22px; }
  .panel { padding: 14px; }
  .account-workspace { padding: 0; }
  .account-editor-header { gap: 14px; padding: 18px 16px 16px; }
  .account-editor-header h2 { font-size: 19px; }
  .account-editor-section { padding: 18px 16px; }
  .account-editor-actions { padding: 14px 16px; }
  .account-editor-actions button { flex: 1 1 0; min-width: 0; }
  .account-workspace .checkbox-grid { grid-template-columns: 1fr; }
  .account-search-box { width: 100%; margin-left: 0; }
  .compact-search { width: auto; flex: 1 1 180px; }
  .compact-search-wrap { width: 100%; flex: 1 1 180px; }
  .checkbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar .meta { display: none; }
  .topbar button { padding-inline: 10px; }
  .detail-table-head { align-items: stretch; }
  .detail-table-controls { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .detail-table-controls .merchant-choice-bar { min-width: 0; flex: 1 1 auto; }
  .detail-column-control { width: 100%; justify-items: end; margin-left: auto; }
  .column-picker { width: 100%; }
  .column-picker > button { width: 100%; }
  .column-picker-menu { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .summary-page .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .summary-page .metric { min-height: 92px; padding: 14px; }
  .summary-page .metric .value { font-size: 24px; }
  .confirm-dialog { grid-template-columns: 36px minmax(0, 1fr); padding: 18px; }
  .confirm-dialog-icon { width: 36px; height: 36px; }
  .confirm-dialog-actions button { flex: 1 1 0; }
  .compare-merchant-options { grid-template-columns: 1fr; }
  .compare-picker-head, .details-title-head { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 10px; }
  .merchant-choice-bar { width: 100%; flex-basis: auto; }
  .merchant-inline-options { justify-content: flex-start; }
  .merchant-choice { min-width: 0; max-width: 200px; }
  .compact-merchant-menu { position: absolute; top: calc(100% + 6px); right: 0; bottom: auto; left: auto; width: max-content; max-width: min(320px, calc(100vw - 32px)); max-height: min(70vh, 420px); }
  .compare-merchant-dropdown { width: 100%; flex-basis: auto; }
  .compare-merchant-menu { position: static; width: 100%; margin-top: 7px; box-shadow: var(--shadow); }
  .pager { grid-template-columns: 1fr; justify-items: center; gap: 9px; }
  .pager-summary, .pager-position { text-align: center; }
  .pager-summary { justify-content: center; flex-wrap: wrap; }
  .pager-controls { max-width: 100%; padding: 2px; }
  .detail-merchant-picker { width: 100%; flex-basis: auto; }
  .detail-merchant-menu { position: static; width: 100%; margin-top: 7px; box-shadow: var(--shadow); }
  .account-merchant-menu.compact-merchant-menu { position: absolute; width: max-content; max-width: min(320px, calc(100vw - 32px)); margin-top: 0; box-shadow: 0 14px 36px rgba(17, 31, 38, .16); }
  #source-table-panel .status-help-tooltip,
  #source-table-panel tbody tr:nth-last-child(-n+2) .status-help-tooltip { position: fixed; inset: auto 12px 12px; z-index: 1000; width: auto; max-height: min(55vh, 320px); overflow: auto; transform: none; }
  #source-table-panel .status-help-tooltip::before,
  #source-table-panel tbody tr:nth-last-child(-n+2) .status-help-tooltip::before { display: none; }
  .account-merchant-pager > div { justify-content: space-between; }
  .list-filter-form label { width: 100%; min-width: 0; flex: 1 1 100%; }
  .list-filter-actions { width: 100%; justify-content: flex-end; }
  .list-filter-actions button { flex: 0 0 auto; }
}

/* Permission center and Telegram screenshot workspace */
.segment-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line, #dfe6ef); padding: 0 4px; }
.segment-tabs button { min-height: 40px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #58677c; box-shadow: none; }
.segment-tabs button:hover { border-color: transparent; background: #f3f7fc; color: #245ec7; }
.segment-tabs button.active { border-bottom-color: #2f6df3; background: transparent; color: #245ec7; font-weight: 700; }
.page-tabs { margin-bottom: 16px; }
.permission-layout { min-height: 620px; display: grid; grid-template-columns: 260px minmax(0, 1fr); border: 1px solid #dfe6ef; border-radius: 8px; background: #fff; overflow: hidden; }
.permission-tree { position: relative; display: flex; flex-direction: column; border-right: 1px solid #e2e8f0; background: #f8fafc; padding: 12px 0 0; }
.permission-tree-search { padding: 0 12px 10px; }
.permission-tree-search input { width: 100%; min-height: 36px; background: #fff; font-size: 12px; }
.permission-tree-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 16px 12px; color: #536177; font-size: 12px; }
.permission-tree-head strong { color: #172033; font-size: 14px; }
.permission-tree-list { flex: 1; min-height: 0; overflow: auto; }
.permission-tree-total { border-top: 1px solid #e2e8f0; padding: 12px 16px; color: #69778b; font-size: 12px; }
.permission-user-entry { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: stretch; padding-left: calc(6px + var(--tree-depth) * 14px); }
.permission-branch-toggle, .permission-branch-spacer { width: 24px; min-height: 54px; display: grid; place-items: center; }
.permission-branch-toggle { border: 0; border-radius: 0; background: transparent; padding: 0; color: #748197; box-shadow: none; }
.permission-branch-toggle:hover { border-color: transparent; background: #edf3fb; color: #245ec7; }
.permission-branch-toggle .ui-icon { width: 14px; height: 14px; transition: transform .16s ease; }
.permission-branch-toggle.expanded .ui-icon { transform: rotate(90deg); }
.permission-tree-more { padding: 4px 12px 8px calc(30px + var(--tree-depth) * 14px); }
.permission-tree-more button { width: 100%; border: 0; background: transparent; color: #2f6df3; padding: 8px; box-shadow: none; text-align: left; }
.permission-tree-more button:hover { border-color: transparent; background: #edf3fb; }
.permission-user-node { width: 100%; min-width: 0; min-height: 54px; display: grid; grid-template-columns: 18px 32px minmax(0, 1fr); align-items: center; gap: 8px; border: 0; border-left: 3px solid transparent; border-radius: 0; background: transparent; padding: 7px 12px 7px 4px; color: #29374d; text-align: left; box-shadow: none; }
.permission-user-node:hover { border-color: transparent; background: #edf3fb; }
.permission-user-node.active { border-left-color: #2f6df3; background: #eaf1ff; color: #2059c5; }
.permission-user-node .tree-line { width: 12px; height: 1px; background: #b6c3d3; }
.permission-user-node > span:last-child { min-width: 0; display: grid; gap: 2px; }
.permission-user-node strong, .permission-user-node small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.permission-user-node small { color: #8591a2; font-size: 11px; }
.user-avatar-mini { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #b9cffb; border-radius: 50%; background: #fff; color: #2f6df3; font-size: 11px; font-weight: 700; }
.permission-workspace { min-width: 0; padding: 0 24px 24px; }
.resource-toolbar { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e7ebf1; padding: 24px 0 16px; }
.resource-toolbar p { margin: 5px 0 0; color: #748197; font-size: 12px; }
.resource-toolbar > span { color: #2f6df3; font-size: 12px; }
.resource-search-row { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; }
.resource-search-row input { width: var(--query-control-wide); max-width: var(--query-control-wide); }
.resource-search-row span { color: #8793a4; font-size: 12px; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 8px; max-height: 430px; overflow: auto; }
.resource-option { min-height: 62px; display: flex; align-items: center; gap: 10px; border: 1px solid #dce4ee; border-radius: 6px; background: #fff; padding: 10px 12px; cursor: pointer; }
.resource-option:has(input:checked) { border-color: #8eb2fc; background: #edf3ff; }
.resource-option:has(input:disabled) { cursor: default; opacity: .78; }
.resource-option > span { min-width: 0; display: grid; gap: 3px; }
.resource-option strong, .resource-option small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.resource-option small { color: #7a8799; font-size: 11px; }
.permission-save-row { display: flex; justify-content: flex-end; border-top: 1px solid #e7ebf1; margin-top: 18px; padding-top: 16px; }
.merchant-permission-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 12px; padding: 18px 0 12px; }
.merchant-permission-filters, .merchant-permission-actions { display: flex; align-items: center; gap: 8px; }
.merchant-permission-filters { min-width: 0; flex: 0 1 auto; flex-wrap: wrap; }
.merchant-permission-filters > .clearable-input { width: var(--query-control-wide); flex: 0 0 var(--query-control-wide); }
.merchant-permission-filters input { width: 100%; }
.merchant-permission-filters select { width: var(--query-control-width); }
.merchant-permission-actions button { white-space: nowrap; }
.merchant-permission-actions { margin-left: auto; }
.merchant-selection-summary { min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid #d9e6fd; background: #edf4ff; padding: 8px 12px; color: #37629f; font-size: 12px; }
.merchant-selection-summary > div { min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.merchant-selection-summary > div > strong { white-space: nowrap; }
.merchant-selection-chip, .merchant-selection-more { max-width: 150px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid #d3def0; border-radius: 5px; background: #fff; padding: 4px 7px; color: #546985; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.merchant-selection-chip button { min-width: 18px; min-height: 18px; border: 0; background: transparent; padding: 0; color: #7c899c; box-shadow: none; }
.merchant-selection-more { flex: 0 0 auto; }
.permission-dirty-mark { flex: 0 0 auto; border-radius: 999px; background: #fff4d8; padding: 4px 8px; color: #8f650f; font-weight: 700; }
.permission-merchant-table { margin-top: 10px; }
.permission-merchant-table table { min-width: 780px; }
.permission-merchant-table th:first-child, .permission-merchant-table td:first-child { width: 42px; text-align: center; }
.permission-merchant-table td { vertical-align: middle; }
.permission-status.pending { background: #fff3d6; color: #94650b; }
.merchant-business-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.merchant-business-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.merchant-business-status.active { color: #08745b; }
.merchant-business-status.disabled { color: #a04d4d; }
.merchant-permission-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid #e7ebf1; padding: 12px 2px 0; color: #748197; font-size: 12px; }
.merchant-permission-footer > div { display: flex; align-items: center; gap: 10px; }
.merchant-permission-footer label { display: inline-flex; align-items: center; gap: 6px; }
.merchant-permission-footer select { width: 68px; min-height: 34px; }
.merchant-permission-footer button { min-height: 34px; }
.merchant-permission-note { margin: 10px 2px 0; color: #7b8798; font-size: 11px; }
.group-permission-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 14px; padding: 18px 0 12px; }
.group-permission-search, .group-permission-actions { display: flex; align-items: center; gap: 8px; }
.group-permission-search { flex: 0 1 auto; flex-wrap: wrap; }
.group-permission-search > .clearable-input { width: var(--query-control-wide); flex: 0 0 var(--query-control-wide); }
.group-permission-search input { width: 100%; }
.group-permission-search select { width: var(--query-control-width); }
.group-permission-actions button { white-space: nowrap; }
.group-permission-actions { margin-left: auto; }
.permission-group-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid #edf0f4; padding: 10px 2px; color: #7a8799; font-size: 12px; }
.permission-group-summary strong { color: #2f6df3; }
.permission-group-table table { min-width: 820px; }
.permission-group-table th:first-child, .permission-group-table td:first-child { width: 42px; text-align: center; }
.permission-group-table td { vertical-align: middle; }
.permission-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; }
.permission-status.granted { background: #eaf8f2; color: #08745b; }
.permission-status.ungranted { background: #f2f4f7; color: #728095; }
.permission-status.suspended { background: #fff3d6; color: #94650b; }
.permission-source { display: inline-flex; border: 1px solid #cfe3d8; border-radius: 5px; background: #f2fbf6; padding: 3px 7px; color: #26765b; font-size: 11px; }
.link-button { min-height: 30px; border: 0; background: transparent; padding: 3px 5px; color: #2968ee; box-shadow: none; }
.link-button:hover { border: 0; background: #edf3ff; }
.muted-text { color: #929cac; font-size: 12px; }
.permission-chain-backdrop { position: fixed; z-index: 95; inset: 0; display: grid; place-items: center; background: rgba(18, 29, 48, .38); padding: 20px; }
.permission-chain-dialog { width: min(480px, 100%); max-height: min(680px, calc(100vh - 40px)); display: grid; grid-template-rows: auto 1fr auto; border-radius: 8px; background: #fff; box-shadow: 0 22px 60px rgba(20, 37, 65, .22); overflow: hidden; }
.permission-chain-dialog > header, .permission-chain-dialog > footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid #e4e9f0; padding: 16px 20px; }
.permission-chain-dialog > header p { margin: 4px 0 0; color: #7a8799; font-size: 11px; }
.permission-chain-dialog > header button { width: 34px; min-width: 34px; padding: 0; font-size: 20px; }
.permission-chain-dialog > footer { justify-content: flex-end; border-top: 1px solid #e4e9f0; border-bottom: 0; }
.permission-chain-steps { overflow: auto; padding: 18px 20px; }
.permission-chain-step { position: relative; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; padding-bottom: 18px; }
.permission-chain-step:not(:last-child)::after { content: ""; position: absolute; top: 30px; bottom: 0; left: 14px; width: 1px; background: #bcd0f8; }
.permission-chain-step > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #2f6df3; color: #fff; font-size: 11px; font-weight: 700; }
.permission-chain-step > div { display: grid; gap: 2px; }
.permission-chain-step small { color: #7a8799; font-size: 11px; }
.permission-chain-step.invalid > span { background: #b3bcc8; }
.permission-audit-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 2px 12px; color: #708097; font-size: 12px; }
.permission-audit-summary > div { display: grid; gap: 3px; }
.permission-audit-summary strong { color: #1d2b40; font-size: 14px; }
.permission-audit-table table { min-width: 760px; }
.permission-audit-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 2px 0; color: #748197; font-size: 12px; }
.permission-audit-footer > div { display: flex; align-items: center; gap: 10px; }
.permission-audit-footer label { display: inline-flex; align-items: center; gap: 6px; }
.permission-audit-footer select { width: 68px; min-height: 34px; }
.permission-audit-footer button { min-height: 34px; }
.readonly-banner { margin-top: 18px; border-left: 3px solid #e3a635; background: #fff8e8; padding: 12px 14px; color: #785b22; font-size: 12px; }
.permission-readonly-note { margin: 10px 2px 0; color: #7b8798; font-size: 11px; }
.chain-view { padding: 28px 0; }
.chain-view h2 { font-size: 16px; }
.chain-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.chain-summary > div { display: grid; gap: 6px; border: 1px solid #dfe6ef; border-radius: 6px; padding: 16px; }
.chain-summary span { color: #7d8999; font-size: 12px; }
.chain-summary strong { color: #1e4fa9; font-size: 22px; }
.tg-task-editor { border: 1px solid #dfe6ef; border-radius: 8px; background: #fff; overflow: hidden; }
.tg-task-editor > header { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e4e9f0; padding: 22px 24px; }
.tg-task-editor h2, .tg-task-editor h3 { margin: 4px 0; }
.tg-task-editor p { margin: 3px 0 0; color: #758197; font-size: 12px; }
.icon-text-button { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; }
.icon-text-button .ui-icon { width: 16px; height: 16px; }
.tg-task-editor form > .form-fields { padding: 22px 24px 12px; }
.tg-task-editor form > .form-fields.two { grid-template-columns: var(--query-control-width) var(--query-control-width); align-items: end; column-gap: 18px; }
.tg-task-editor form > .form-fields.two > .label { min-width: 0; }
.task-switch-row { display: flex; align-items: center; gap: 24px; border-block: 1px solid #e8ecf2; background: #fafbfd; padding: 12px 24px; color: #66748a; font-size: 12px; }
.task-copy-label { border-left: 1px solid #d8e0eb; padding-left: 24px; }
.switch-label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.destination-section { padding: 22px 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.tg-destination-row { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(240px, 1fr) minmax(300px, 1.35fr); gap: 16px; align-items: center; border-top: 1px solid #e5eaf1; padding: 14px 4px; }
.destination-group { min-width: 0; display: flex; align-items: center; gap: 10px; }
.destination-group > span:last-child { min-width: 0; display: grid; gap: 3px; }
.destination-group strong, .destination-group small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.destination-group small, .destination-selection span { color: #7d899a; font-size: 11px; }
.send-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; background: #eaf1ff; color: #2f6df3; }
.destination-mode { display: flex; gap: 12px; }
.destination-mode label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.destination-selection { min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.destination-selection > span { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.danger-link { border-color: transparent !important; background: transparent !important; color: #ba3f45 !important; box-shadow: none !important; }
.table-subline { display: block; margin-top: 3px; color: #929cac; font-size: 10px; }
.drawer-backdrop { position: fixed; z-index: 80; inset: 0; display: flex; justify-content: flex-end; background: rgba(18,29,48,.38); }
.resource-drawer { width: min(520px, 100vw); height: 100%; display: grid; grid-template-rows: auto auto auto 1fr auto; background: #fff; box-shadow: -16px 0 36px rgba(22,39,66,.16); }
.resource-drawer > header { min-height: 88px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 1px solid #e3e8ef; padding: 20px 24px; }
.resource-drawer h2 { margin: 0 0 4px; font-size: 17px; }
.resource-drawer p { margin: 0; color: #78869a; font-size: 11px; }
.resource-drawer > header .drawer-icon-button { width: 40px; min-width: 40px; height: 40px; min-height: 40px; display: grid; place-items: center; padding: 0; font-size: 20px; line-height: 1; }
.drawer-search { display: flex; align-items: stretch; justify-content: flex-start; gap: 8px; padding: 14px 24px 12px; }
.drawer-search > .clearable-input { width: var(--query-control-wide); min-width: var(--query-control-wide); flex: 0 0 var(--query-control-wide); }
.drawer-search > .clearable-input input { height: 40px; }
.drawer-search-button { width: 52px; min-width: 52px; height: 40px; min-height: 40px; padding: 0 8px; }
.drawer-search-button { margin-left: auto; }
.drawer-bulk-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 24px 10px; }
.drawer-bulk-actions button { min-height: 32px; padding: 5px 10px; }
.drawer-options { overflow: auto; padding: 0 24px 18px; }
.drawer-option { width: 100%; min-height: 58px; display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 8px; border: 1px solid #dfe6ef; border-radius: 6px; background: #fff; margin-bottom: 7px; padding: 9px 12px; text-align: left; box-shadow: none; }
.drawer-option:hover { border-color: #9ebafa; background: #f7f9fd; }
.drawer-option.selected { border-color: #7fa5f8; background: #edf3ff; color: #2259c0; }
.drawer-check { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #aebbc9; border-radius: 4px; }
.drawer-option.selected .drawer-check { border-color: #2f6df3; background: #2f6df3; color: #fff; }
.drawer-option > span:last-child { min-width: 0; display: grid; gap: 3px; }
.drawer-option strong, .drawer-option small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.drawer-option small { color: #7d8999; font-size: 11px; }
.resource-drawer > footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #e3e8ef; padding: 14px 20px; font-size: 11px; }
.resource-drawer > footer > div { display: flex; align-items: center; gap: 6px; }
.tg-bot-form { max-width: 840px; }
.tg-bot-form .readonly-profile-field { min-height: 72px; display: grid; gap: 3px; }
.tg-bot-form .readonly-profile-field span, .tg-bot-form .readonly-profile-field small { color: #7d8999; font-size: 11px; }
.task-list-actions, .tg-log-pagination, .tg-log-pagination > div { display: flex; align-items: center; gap: 8px; }
.tg-log-pagination { justify-content: space-between; border-top: 1px solid #e5eaf1; margin-top: 12px; padding-top: 12px; color: #748197; font-size: 12px; }
.hover-detail { position: relative; display: inline-flex; cursor: help; }
.hover-detail-popover { position: absolute; z-index: 20; left: 50%; bottom: calc(100% + 8px); width: max-content; min-width: 180px; max-width: 360px; max-height: 220px; overflow: auto; transform: translateX(-50%); border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; padding: 10px 12px; color: #3d4b60; font-size: 11px; line-height: 1.6; white-space: pre-wrap; box-shadow: 0 12px 28px rgba(29,45,72,.16); opacity: 0; pointer-events: none; visibility: hidden; }
.hover-detail:hover .hover-detail-popover, .hover-detail:focus .hover-detail-popover { opacity: 1; visibility: visible; }
.group-count-badge { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid #b8c7da; border-radius: 50%; background: #fff; color: #315a99; font-size: 12px; font-weight: 700; line-height: 1; }
.group-list-popover { top: calc(100% + 8px); bottom: auto; min-width: 220px; max-width: 360px; text-align: left; }
.tg-task-table-wrap { overflow: visible; }
.hover-detail-popover strong { color: #263852; font-size: 12px; }
.tg-log-filter { justify-content: flex-start; }
.tg-group-table table { min-width: 900px; }
.tg-group-table th:first-child, .tg-group-table td:first-child { width: 300px; }
.tg-group-alias-input { width: min(280px, 100%); }
.bordered { border: 1px dashed #cdd7e4; border-radius: 6px; }

@media (max-width: 1100px) {
  .resource-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .tg-destination-row { grid-template-columns: 1fr 1fr; }
  .destination-selection { grid-column: 1 / -1; justify-content: flex-start; }
  .tg-log-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .permission-layout { display: block; }
  .permission-tree { max-height: 260px; overflow: auto; border-right: 0; border-bottom: 1px solid #e2e8f0; }
  .permission-workspace { padding: 0 14px 18px; }
  .resource-grid { grid-template-columns: 1fr; }
  .chain-summary { grid-template-columns: 1fr; }
  .tg-destination-row { grid-template-columns: 1fr; }
  .tg-task-editor form > .form-fields.two { grid-template-columns: 1fr; }
  .tg-log-filter { grid-template-columns: 1fr; }
  .destination-selection { grid-column: auto; flex-wrap: wrap; }
  .task-switch-row, .section-heading, .resource-toolbar, .resource-drawer > footer { align-items: flex-start; flex-direction: column; }
  .resource-drawer > footer > div { flex-wrap: wrap; }
  .drawer-search > .clearable-input { width: auto; min-width: 0; flex: 1 1 auto; }
  .permission-workspace .segment-tabs button { min-width: 0; flex: 1; padding-inline: 5px; font-size: 11px; }
  .merchant-permission-toolbar, .merchant-permission-filters, .merchant-permission-actions, .merchant-selection-summary, .merchant-permission-footer { align-items: stretch; flex-direction: column; }
  .merchant-permission-filters > .clearable-input, .merchant-permission-filters input, .merchant-permission-filters select, .merchant-permission-actions button { width: 100%; max-width: none; }
  .merchant-selection-summary > div { flex-wrap: wrap; overflow: visible; }
  .merchant-permission-footer > div { justify-content: space-between; flex-wrap: wrap; }
  .merchant-permission-footer > div:last-child button:last-child { width: 100%; }
  .group-permission-toolbar, .group-permission-search, .group-permission-actions, .permission-group-summary { align-items: stretch; flex-direction: column; }
  .group-permission-search > .clearable-input, .group-permission-search input, .group-permission-search select, .group-permission-actions button { width: 100%; max-width: none; }
  .merchant-permission-actions, .group-permission-actions { width: 100%; flex-direction: row; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-left: 0; }
  .merchant-permission-actions button, .group-permission-actions button { width: auto; }
  .permission-audit-summary, .permission-audit-footer { align-items: stretch; flex-direction: column; }
  .permission-audit-footer > div { justify-content: space-between; }
}
@media (max-width: 350px) { .checkbox-grid { grid-template-columns: 1fr; } }

/* 2026 console visual refresh: compact, light operational workspace. */
:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f7f9fd;
  --line: #dfe6f2;
  --line-strong: #c9d5e7;
  --text: #1b2638;
  --muted: #6f7e95;
  --accent: #2968ee;
  --accent-dark: #2055c9;
  --accent-soft: #edf3ff;
  --danger: #bf4a45;
  --danger-soft: #fdf0ef;
  --warning: #9a650f;
  --shadow: 0 1px 2px rgba(45, 65, 105, .035), 0 10px 28px rgba(45, 65, 105, .065);
}

body { background: var(--bg); line-height: 1.45; }
button { border-radius: 7px; font-weight: 600; }
button.primary { box-shadow: 0 5px 14px rgba(41, 104, 238, .17); }
input, textarea, select { border-radius: 7px; background: #fff; }
.ui-icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.layout { grid-template-columns: 216px minmax(0, 1fr); background: var(--bg); }
.sidebar { display: flex; flex-direction: column; background: #fbfcff; color: var(--text); padding: 18px 12px; border-right: 1px solid #e1e7f1; box-shadow: 1px 0 0 rgba(45, 65, 105, .018); }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 29px; padding: 2px 0; color: var(--text); line-height: 1.1; }
.brand::before { display: none; }
.brand-mark { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 800; box-shadow: 0 6px 15px rgba(41, 104, 238, .18); }
.brand-copy { display: grid; gap: 2px; min-width: 0; }
.brand-copy strong { font-size: 16px; letter-spacing: 0; }
.brand-copy small { color: var(--muted); font-size: 11px; font-weight: 550; }
.nav-label { margin: 0 11px 8px; color: #93a1b6; font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.nav { gap: 5px; }
.nav button { display: flex; align-items: center; gap: 11px; min-height: 42px; border: 1px solid transparent; border-radius: 7px; color: #53627a; padding: 9px 11px; font-weight: 600; }
.nav button .ui-icon { width: 17px; height: 17px; color: #75849a; }
.nav button:hover { border-color: #dce5f2; background: #f3f7ff; color: var(--accent-dark); }
.nav button.active { background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px #cbdafd; }
.nav button.active::before { left: 0; top: 9px; bottom: 9px; width: 3px; background: var(--accent); }
.nav button.active .ui-icon { color: var(--accent); }

.topbar { height: 64px; padding: 0 30px; background: rgba(255, 255, 255, .92); border-bottom-color: #e3e9f2; box-shadow: 0 1px 0 rgba(45, 65, 105, .025); }
.topbar-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar-user > span:last-child { display: grid; gap: 1px; }
.topbar-user strong { color: #314057; font-size: 13px; font-weight: 700; }
.topbar-user small { color: var(--muted); font-size: 11px; }
.user-avatar { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #ccdafa; border-radius: 50%; background: #eef4ff; color: var(--accent-dark); }
.user-avatar .ui-icon { width: 16px; height: 16px; }
.topbar-actions { gap: 7px; }
.topbar-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 10px; color: #526178; }
.topbar-actions button:last-child { color: #8b4b47; }
.topbar-actions button:last-child:hover { border-color: #efd8d5; background: #fff7f6; color: var(--danger); }
.topbar-actions .ui-icon { width: 16px; height: 16px; }
.content { width: min(1440px, calc(100vw - 264px)); padding: 32px 0 48px; }
.page { gap: 20px; }
.page-head { align-items: flex-end; min-height: 48px; }
.page h1 { color: #17243a; font-size: 26px; font-weight: 760; }
.page-head .hint { color: #738198; }

.panel, .metric { border-color: #dfe6f1; border-radius: 8px; box-shadow: var(--shadow); }
.panel { padding: 20px; }
.panel h2 { color: #243248; font-size: 16px; }
.metric { border-radius: 8px; padding: 18px 20px; }
.metric::before { width: 3px; background: var(--accent); }
.metric .value { color: #1f3f78; }
.table-wrap { border-color: #dfe6f1; border-radius: 8px; box-shadow: 0 1px 2px rgba(45, 65, 105, .03); }
th, td { border-bottom-color: #e8edf5; }
th { background: #f6f8fc; color: #68778f; font-size: 12px; }
tbody tr:hover td { background: #f7f9fe; }
.summary-page .table-wrap thead th:first-child, .accounts-page .table-wrap thead th:first-child, .details-page .table-wrap thead th:first-child, .config-page #source-table-panel thead th:first-child, .config-page #source-table-panel thead th:nth-child(2) { background: #f6f8fc; }

.list-filter-form { border-color: #dfe6f1; border-radius: 8px; background: #f7f9fd; padding: 14px; }
.source-auto-recognize, .permission-section { border-color: #dce5f2; border-radius: 8px; background: #f5f8fe; }
.account-editor-header, .account-editor-section { border-bottom-color: #e6ebf3; }
.account-editor-actions { border-top-color: #e6ebf3; background: #fafbfe; }
.account-merchant-menu, .column-picker-menu, .compare-merchant-menu, .detail-merchant-menu, .compact-merchant-menu { border-color: #d9e2ef; border-radius: 8px; box-shadow: 0 15px 34px rgba(45, 65, 105, .13); }
.pill { border-color: #dce4ef; background: #f7f9fc; color: #586a84; }
.check:has(input:checked), .account-workspace .check:has(input:checked), .merchant-choice.selected, .compare-merchant-option:has(input:checked) { background: var(--accent-soft); }

.dialog-backdrop { background: rgba(34, 48, 76, .36); }
.confirm-dialog { border-color: #dfe6f1; border-radius: 8px; box-shadow: 0 22px 58px rgba(45, 65, 105, .21); }
.toast { border-color: #f0d2cf; border-radius: 8px; box-shadow: 0 16px 42px rgba(45, 65, 105, .17); }
.status-help-tooltip, .permission-popover { border-color: #d9e2ef; border-radius: 8px; box-shadow: 0 14px 34px rgba(45, 65, 105, .15); }

.login-page { background: #f2f6f5; background-image: none; }
.login-card { border-color: #e1e9e7; border-radius: 8px; box-shadow: 0 18px 50px rgba(18, 44, 39, .11); }
.login-card::before { height: 4px; background: var(--accent); }
.login-logo { border-radius: 8px; background: var(--accent); box-shadow: 0 6px 16px rgba(11, 138, 120, .16); }
.service-status-page { background: #f3f6fb; }
.service-status { border-color: #dfe6f1; border-radius: 8px; box-shadow: 0 18px 50px rgba(45, 65, 105, .12); }

@media (max-width: 900px) {
  .sidebar { padding: 12px 14px 10px; background: #fbfcff; }
  .brand { margin: 0 2px 11px; }
  .nav-label { display: none; }
  .nav { gap: 5px; }
  .nav button { min-height: 40px; }
  .nav button.active::before { inset: auto 11px 0; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .topbar { padding: 0 18px; }
  .content { width: min(100% - 32px, 1440px); }
}

@media (max-width: 620px) {
  .brand-copy small { display: none; }
  .brand { margin-bottom: 9px; }
  .nav button { flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 6px 4px; font-size: 12px; }
  .nav button .ui-icon { width: 16px; height: 16px; }
  .topbar { height: 58px; padding: 0 14px; }
  .topbar-user small { display: none; }
  .topbar-actions button { width: 34px; min-width: 34px; justify-content: center; padding: 0; }
  .topbar-actions button span { display: none; }
  .content { width: min(100% - 24px, 1440px); padding-top: 22px; }
  .page { gap: 16px; }
  .page h1 { font-size: 23px; }
  .panel { padding: 16px; }
}

/* Navigation grouping, density controls, and report refinements. */
.layout.sidebar-collapsed { grid-template-columns: 72px minmax(0, 1fr); }
.nav { align-content: start; }
.nav-section { display: grid; gap: 5px; }
.nav-section + .nav-section { margin-top: 22px; }
.nav-section-label { margin: 0 11px 4px; color: #98a6a3; font-size: 11px; font-weight: 750; white-space: nowrap; }
.sidebar-collapse-button { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 10px; margin-top: auto; border-color: transparent; background: transparent; padding: 8px 11px; color: #74847f; box-shadow: none; }
.sidebar-collapse-button:hover { border-color: #dce5f2; background: #f3f7ff; color: var(--accent-dark); }
.sidebar-collapse-button .ui-icon { width: 17px; height: 17px; }
.sidebar-collapse-button span { white-space: nowrap; }
.sidebar-collapsed .sidebar { padding-inline: 10px; }
.sidebar-collapsed .brand { justify-content: center; margin-inline: 0; }
.sidebar-collapsed .brand-copy, .sidebar-collapsed .nav-section-label, .sidebar-collapsed .nav button span, .sidebar-collapsed .sidebar-collapse-button span { display: none; }
.sidebar-collapsed .nav button, .sidebar-collapsed .sidebar-collapse-button { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .nav button.active::before { left: -1px; }
.mobile-nav-toggle, .sidebar-backdrop { display: none; }
.content { width: min(1440px, calc(100% - 48px)); }

.grid.three.summary-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.summary-metrics .metric { min-height: 108px; display: grid; align-content: space-between; padding: 16px 17px; }
.summary-metrics .metric .value { margin-top: 10px; font-size: 26px; }

.compare-table table { border: 0; border-collapse: separate; border-spacing: 0; }
.compare-table th, .compare-table td { border: 0; border-right: 1px solid #e4ebe9; border-bottom: 1px solid #e4ebe9; background: #fff; padding: 7px 10px; color: #273a36; text-align: center; }
.compare-table th:last-child, .compare-table td:last-child { border-right: 0; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table th { background: #f6f9f8; color: #5e706c; font-weight: 700; }
.compare-table .metric-head { color: #263b36; font-size: 14px; }
.compare-table td:first-child, .compare-table th:first-child { background: #fbfcfc; }
.compare-table thead th:first-child { background: #f6f9f8; }
.compare-table .diff-pos { color: #b33d38; }
.compare-table .diff-neg { color: #16816f; }
.compare-table .reserved, .compare-table td.reserved { background: #f2f5f4; color: #80908c; }
.compare-table td.missing-value { background: #fffaf0; color: #8b6a39; }
.compare-empty-state { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 8px; background: #fafcfb; color: var(--muted); text-align: center; }
.compare-empty-state .ui-icon { width: 30px; height: 30px; margin-bottom: 4px; color: #8a9b97; }
.compare-empty-state strong { color: #40534e; font-size: 15px; }
.compare-empty-state span { font-size: 13px; }

@media (max-width: 1440px) {
  .grid.three.summary-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .layout, .layout.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .sidebar-collapsed .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 90; width: min(280px, calc(100vw - 48px)); height: 100vh; display: flex; padding: 18px 12px; overflow-y: auto; transform: translateX(-102%); transition: transform .2s ease; }
  .layout.nav-open .sidebar { transform: translateX(0); }
  .sidebar-collapsed .brand { justify-content: flex-start; margin-inline: 8px; }
  .sidebar-collapsed .brand-copy, .sidebar-collapsed .nav-section-label, .sidebar-collapsed .nav button span { display: grid; }
  .sidebar-collapsed .nav button { justify-content: flex-start; padding-inline: 11px; }
  .sidebar .nav { display: grid; overflow: visible; }
  .sidebar .nav-section + .nav-section { margin-top: 22px; }
  .sidebar .nav button { width: 100%; min-height: 42px; flex-direction: row; justify-content: flex-start; gap: 11px; padding: 9px 11px; text-align: left; font-size: 14px; }
  .sidebar .nav button.active::before { inset: 9px auto 9px 0; width: 3px; height: auto; }
  .sidebar-collapse-button { display: none; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 85; border: 0; border-radius: 0; background: rgba(25, 45, 41, .34); padding: 0; }
  .layout.nav-open .sidebar-backdrop { display: block; }
  .mobile-nav-toggle { width: 34px; min-width: 34px; height: 34px; min-height: 34px; display: grid; place-items: center; padding: 0; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .content { width: min(100% - 32px, 1440px); }
}

@media (max-width: 620px) {
  .grid.three.summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .summary-metrics .metric { min-height: 94px; padding: 14px; }
  .summary-metrics .metric .value { font-size: 23px; }
  .sidebar .brand-copy small { display: block; }
}

/* Full-screen light blue authentication composition. */
.login-page { position: relative; min-height: 100vh; overflow: hidden; display: grid; place-items: center; background-color: #f0f7ff; background-image: linear-gradient(125deg, rgba(255,255,255,.96) 0 12%, rgba(218,237,255,.66) 30%, rgba(255,255,255,.88) 47%, rgba(190,225,255,.52) 67%, rgba(249,252,255,.94) 88%), radial-gradient(ellipse at 14% 76%, rgba(64,150,255,.22), transparent 42%), radial-gradient(ellipse at 83% 20%, rgba(137,207,255,.24), transparent 38%); padding: 32px 44px; color: #1f2a3d; -webkit-font-smoothing: antialiased; }
.login-page::before, .login-page::after { content: ""; position: fixed; z-index: 0; width: 62vw; height: 118vh; border-radius: 48% 52% 42% 58%; pointer-events: none; filter: blur(.2px); }
.login-page::before { left: 29%; top: -56%; background: linear-gradient(110deg, rgba(255,255,255,.13), rgba(255,255,255,.88) 46%, rgba(154,208,255,.18) 66%, rgba(255,255,255,.05)); box-shadow: inset -18px 0 44px rgba(126,189,243,.12); transform: rotate(18deg); }
.login-page::after { right: -34%; bottom: -75%; background: linear-gradient(122deg, rgba(112,194,250,.09), rgba(255,255,255,.86) 48%, rgba(95,181,244,.22)); box-shadow: inset 22px 0 54px rgba(91,176,241,.1); transform: rotate(-22deg); }
.login-stage { position: relative; z-index: 1; width: min(1180px, calc(100vw - 88px)); }
.login-showcase { min-height: min(680px, calc(100vh - 64px)); display: grid; grid-template-columns: minmax(0, 60%) minmax(360px, 40%); align-items: center; overflow: visible; }
.login-illustration { position: relative; min-width: 0; height: 560px; isolation: isolate; }
.login-illustration::before { content: ""; position: absolute; z-index: -2; inset: 3% 1% 2% 0; border-radius: 48% 52% 45% 55%; background: radial-gradient(ellipse at 38% 42%, rgba(255,255,255,.74) 0 20%, rgba(204,232,255,.44) 46%, transparent 72%), linear-gradient(145deg, rgba(173,218,255,.1), rgba(255,255,255,.48) 47%, rgba(164,215,255,.16)); }
.login-illustration::after { content: ""; position: absolute; z-index: -1; left: 3%; right: 4%; bottom: 4%; height: 45%; border-radius: 56% 44% 48% 52%; background: linear-gradient(154deg, rgba(134,201,255,.12), rgba(255,255,255,.54) 48%, rgba(130,203,255,.18)); transform: rotate(-5deg); }
.login-art-scene { position: absolute; left: 50%; top: 50%; width: 650px; height: 520px; transform: translate(-50%, -50%); }
.login-art-scene::before { content: ""; position: absolute; left: 70px; right: 28px; top: 92px; height: 280px; border-radius: 44% 56% 49% 51%; background: radial-gradient(ellipse, rgba(140,204,255,.16), rgba(255,255,255,.08) 66%, transparent 70%); }
.login-browser-window { position: absolute; z-index: 3; overflow: hidden; border: 6px solid #fff; border-radius: 18px; background: #fafdff; box-shadow: 0 20px 36px rgba(68,131,197,.14), inset 0 0 0 1px rgba(117,177,235,.16); }
.login-browser-window.window-back { left: 198px; top: 46px; width: 340px; height: 252px; opacity: .46; transform: translate(34px, -16px); }
.login-browser-window.window-middle { left: 168px; top: 66px; width: 370px; height: 274px; opacity: .68; transform: translate(14px, -6px); }
.login-browser-window.window-front { left: 124px; top: 88px; width: 412px; height: 304px; }
.browser-toolbar { height: 40px; display: flex; align-items: center; gap: 7px; background: linear-gradient(90deg, #52adff, #4096ff); padding: 0 15px; }
.browser-toolbar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.96); }
.browser-toolbar span { width: 138px; height: 11px; margin-left: 5px; border-radius: 999px; background: rgba(255,255,255,.58); }
.browser-content { position: relative; height: calc(100% - 40px); background: linear-gradient(135deg, #fff, #edf8ff); }
.browser-kpi-row { position: absolute; left: 20px; right: 20px; top: 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.browser-kpi-row span { display: grid; gap: 2px; min-width: 0; border: 1px solid rgba(143,199,244,.22); border-radius: 8px; background: rgba(224,243,255,.66); padding: 7px 8px; }
.browser-kpi-row small { overflow: hidden; color: #7597b5; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.browser-kpi-row strong { color: #347fc9; font-size: 12px; line-height: 1.2; }
.browser-dashboard { position: absolute; left: 20px; right: 20px; top: 72px; bottom: 14px; border-radius: 9px; background: rgba(250,253,255,.62); }
.browser-bars { position: absolute; left: 8px; bottom: 8px; width: 156px; height: 104px; display: flex; align-items: end; gap: 7px; border-bottom: 1px solid rgba(114,169,217,.24); background: repeating-linear-gradient(to bottom, rgba(109,173,226,.13) 0 1px, transparent 1px 26px); padding: 0 7px; }
.browser-bars i { flex: 1; border-radius: 4px 4px 1px 1px; background: linear-gradient(#7adbf0, #4c9df5); opacity: .82; }
.browser-bars i:nth-child(1) { height: 34%; }
.browser-bars i:nth-child(2) { height: 57%; }
.browser-bars i:nth-child(3) { height: 46%; }
.browser-bars i:nth-child(4) { height: 78%; background: linear-gradient(#68c7f4, #3588ed); opacity: 1; }
.browser-bars i:nth-child(5) { height: 64%; }
.browser-bars i:nth-child(6) { height: 88%; }
.browser-orbits { position: absolute; right: 8px; top: 12px; width: 130px; height: 112px; }
.browser-orbits i { position: absolute; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#4c9df5 0 68%, rgba(93,170,236,.15) 68% 100%); }
.browser-orbits i::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: rgba(250,253,255,.96); }
.browser-orbits i:first-child { left: 2px; top: 4px; }
.browser-orbits i:nth-child(2) { right: 2px; top: 24px; background: conic-gradient(#62cfe3 0 42%, rgba(94,200,221,.16) 42% 100%); }
.browser-orbits em { position: relative; z-index: 1; color: #4f8cc7; font-size: 9px; font-style: normal; font-weight: 700; }
.browser-orbits small { position: absolute; right: 16px; bottom: 0; color: #91acc3; font-size: 7px; }
.browser-glass { position: absolute; right: 22px; bottom: 28px; width: 104px; height: 62px; border-radius: 12px; background: rgba(190,232,255,.42); }
.login-frosted-panel { position: absolute; z-index: 6; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: repeat(2, 1fr); align-items: center; border: 1px solid #d4ecff; border-radius: 13px; background: #eef8ff; padding: 13px 14px; box-shadow: 0 14px 28px rgba(60,130,203,.13); }
.login-frosted-panel i { grid-row: 1 / 3; width: 20px; height: 20px; border-radius: 5px; background: linear-gradient(135deg, #63d1e8, #4096ff); }
.login-frosted-panel span { align-self: end; color: #6e91af; font-size: 8px; }
.login-frosted-panel strong { align-self: start; color: #3479bc; font-size: 12px; }
.login-frosted-panel.panel-a { left: 56px; top: 238px; width: 140px; height: 78px; }
.login-frosted-panel.panel-b { right: 25px; top: 176px; width: 116px; height: 72px; }
.login-platform { position: absolute; z-index: 2; left: 95px; bottom: 63px; width: 486px; height: 51px; border: 1px solid rgba(63,143,242,.5); border-radius: 9px; background: linear-gradient(165deg, #5caaff, #348cff 72%); box-shadow: inset 0 9px 15px rgba(255,255,255,.24), 0 18px 30px rgba(54,128,213,.18); transform: perspective(380px) rotateX(57deg); }
.login-platform::before { content: ""; position: absolute; left: 24px; right: 24px; bottom: -36px; height: 42px; border-radius: 6px; background: linear-gradient(#338cff, #66b3ff); box-shadow: inset 0 1px rgba(255,255,255,.45); }
.login-platform::after { content: ""; position: absolute; left: 62px; right: 62px; bottom: -55px; height: 24px; border-radius: 0 0 7px 7px; background: linear-gradient(#ffffff, #e5f3ff); }
.login-platform span { position: absolute; z-index: 2; bottom: -49px; width: 8px; height: 18px; border-radius: 2px; background: #fff; }
.login-platform span:first-child { left: 90px; }
.login-platform span:last-child { right: 90px; }
.login-platform-shadow { position: absolute; z-index: 1; left: 120px; right: 35px; bottom: 18px; height: 42px; border-radius: 50%; background: rgba(54,127,202,.14); filter: blur(9px); }
.login-card { width: min(380px, calc(100% - 44px)); min-width: 0; justify-self: center; gap: 20px; overflow: visible; border: 1px solid #e2effa; border-radius: 24px; background: rgba(255,255,255,.96); margin: 0; padding: 34px 44px 32px; box-shadow: 0 24px 56px rgba(56,122,186,.13); }
.login-card::before { display: none; }
.login-brand-lockup { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #e6eef7; }
.login-brand-lockup .login-logo { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: #2f6df3; color: #fff; font-size: 17px; box-shadow: 0 8px 18px rgba(47,109,243,.22); }
.login-brand-lockup > span:last-child { display: grid; gap: 2px; }
.login-brand-lockup strong { color: #172033; font-size: 17px; line-height: 1.25; font-weight: 750; }
.login-brand-lockup small { color: #7f8da0; font-size: 11px; }
.login-form-heading { display: grid; place-items: center; gap: 11px; border: 0; padding: 0 0 10px; }
.login-form-heading h1 { margin: 0; color: #182234; font-size: 25px; line-height: 1.35; font-weight: 750; }
.login-form-heading > span { width: 38px; height: 4px; border-radius: 999px; background: #4096ff; }
.login-card #login-form { gap: 16px; }
.login-card #login-form .login-field { display: block; }
.login-field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.login-card #login-form input:not([type="checkbox"]), .login-card #login-reset-form input { min-height: 48px; border: 1px solid transparent; border-radius: 14px; background: rgba(224,240,255,.82); color: #1c2b42; padding-inline: 17px 42px; box-shadow: inset 0 1px 2px rgba(64,125,190,.035); }
.login-card #login-form input:not([type="checkbox"]):hover, .login-card #login-reset-form input:hover { border-color: rgba(64,150,255,.18); background: #e9f5ff; }
.login-card #login-form input:not([type="checkbox"]):focus, .login-card #login-reset-form input:focus { border-color: rgba(64,150,255,.42); background: #f4faff; box-shadow: 0 0 0 3px rgba(64,150,255,.1); }
.login-card .clearable-input .clear-input-button { right: 7px; color: #8da5bd; }
.login-card .clearable-input.password-input .clear-input-button { right: 42px; }
.login-card .clearable-input .toggle-password-visibility { top: 6px; right: 6px; width: 38px; height: 36px; border: 0; border-radius: 10px; background: transparent; }
.login-card .clearable-input .toggle-password-visibility:hover { border: 0; background: rgba(64,150,255,.1); color: #4096ff; }
.login-page button:focus-visible, .login-page input:focus-visible, .login-page a:focus-visible { outline: 3px solid rgba(64,150,255,.2); outline-offset: 2px; }
.login-caps-lock { display: block; margin: 7px 3px 0; color: #b57521; font-size: 11px; font-weight: 550; }
.login-caps-lock[hidden] { display: none; }
.login-remember { position: relative; display: inline-flex; align-items: center; gap: 7px; width: fit-content; min-height: 18px; margin: 1px 3px 0; color: #344358; font-size: 12px; cursor: pointer; }
.login-remember input { position: absolute; width: 1px; height: 1px; min-height: 0; overflow: hidden; opacity: 0; pointer-events: none; }
.login-remember > span { display: inline-flex; align-items: center; gap: 7px; line-height: 18px; }
.login-remember > span::before { content: ""; width: 14px; height: 14px; flex: 0 0 14px; border: 1px solid #7db4ee; border-radius: 50%; background: #fff; box-sizing: border-box; }
.login-remember input:checked + span::before { border-color: #4096ff; background: radial-gradient(circle, #4096ff 0 3px, #fff 3.5px); }
.login-remember input:focus-visible + span::before { outline: 3px solid rgba(64,150,255,.2); outline-offset: 2px; }
.login-card #login-form .error { min-height: 18px; margin: -7px 2px -9px; color: #cf3f45; font-size: 12px; line-height: 18px; }
.login-submit { position: relative; min-height: 48px; margin-top: 2px; border: 0 !important; border-radius: 14px; background: #4096ff !important; color: #fff; font-weight: 700; letter-spacing: 0; box-shadow: 0 10px 22px rgba(64,150,255,.25) !important; }
.login-submit:hover { border: 0 !important; background: #247fe8 !important; transform: translateY(-1px); box-shadow: 0 13px 25px rgba(54,134,230,.28) !important; }
.login-submit.is-loading { cursor: wait; }
.login-submit.is-loading::before { content: ""; width: 14px; height: 14px; display: inline-block; margin-right: 8px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; vertical-align: -2px; animation: login-spin .75s linear infinite; }
.login-agreement { color: #9aa8b8; font-size: 10px; text-align: center; }
.login-agreement a { color: #4096ff; text-decoration: none; }
.login-agreement a:hover { color: #247fe8; text-decoration: underline; }
.login-secondary { width: fit-content; min-height: 30px; margin: -16px auto 0; border: 0; background: transparent; padding-inline: 10px; color: #4096ff; font-size: 12px; box-shadow: none; }
.login-secondary:hover { border: 0; background: rgba(64,150,255,.08); color: #247fe8; }
.login-card #login-reset-form { gap: 15px; }
.login-card #login-reset-form .label { gap: 7px; color: #43536a; font-size: 12px; }
.login-system-status { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 0; border-top: 1px solid rgba(141,177,210,.22); padding-top: 16px; color: #91a0b1; font-size: 11px; }
.login-system-status .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a2aaa8; box-shadow: 0 0 0 3px rgba(113,129,126,.1); }
.login-system-status .status-dot.is-ok { background: #33b5cf; box-shadow: 0 0 0 3px rgba(51,181,207,.12); }
.login-system-status .status-dot.is-error { background: var(--danger); box-shadow: 0 0 0 3px rgba(191,74,69,.12); }
@keyframes login-spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .login-page { padding: 28px; }
  .login-stage { width: min(440px, 100%); }
  .login-showcase { min-height: 0; display: block; }
  .login-illustration { display: none; }
  .login-card { width: 100%; }
}

@media (max-width: 620px) {
  .login-page { padding: 18px; }
  .login-card { padding: 38px 28px 30px; }
}
.credential-input-row{display:flex;align-items:center;gap:8px}.credential-input-row input{min-width:0;flex:1}.credential-input-row button{flex:0 0 auto;white-space:nowrap}

.interface-manage-page { height: calc(100vh - 142px); min-height: 500px; }
.interface-manage-frame { width: 100%; height: 100%; border: 0; background: transparent; }
.embedded-management-page { min-height: 320px; }
.embedded-management-frame { display:block; width:100%; min-height:320px; height:480px; border:0; background:transparent; }
