:root {
    color-scheme: light;
    --background: #f4f6f8;
    --surface: #ffffff;
    --surface-muted: #f8fafb;
    --text: #18212b;
    --muted: #687481;
    --line: #dfe4e8;
    --primary: #1769aa;
    --primary-hover: #0e568f;
    --success: #14835d;
    --warning: #b15c16;
    --danger: #bc3c3c;
    --sidebar: #20282f;
    --sidebar-text: #d9e0e5;
}

* { box-sizing: border-box; }
html, body, #admin-app { min-height: 100%; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--background); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[v-cloak] { display: none; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eef2f4; }
.login-panel { width: min(400px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 18px 50px rgba(24, 33, 43, .1); }
.login-logo { display: block; width: 122px; height: 44px; margin: 0 auto 22px; object-fit: contain; }
.login-heading { margin-bottom: 26px; text-align: center; }
.login-heading h1 { margin: 0; font-size: 24px; }
.login-heading p { margin: 7px 0 0; color: var(--muted); }
.form-error { margin: 16px 0 0; color: var(--danger); text-align: center; }

.app-shell { --header-height: 64px; min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: var(--header-height) 1fr; }
.global-header { position: sticky; top: 0; z-index: 25; grid-column: 1 / -1; display: flex; min-width: 0; height: var(--header-height); color: #fff; background: #18232e; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand { flex: 0 0 232px; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.brand img { width: 86px; height: 34px; object-fit: contain; filter: brightness(0) invert(1); }
.brand span { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.22); color: #fff; font-size: 13px; overflow-wrap: anywhere; }
.primary-nav { display: flex; align-items: stretch; gap: 8px; min-width: 0; overflow-x: auto; padding: 0 20px; }
.primary-nav button { position: relative; flex-shrink: 0; border: 0; padding: 0 22px; color: #bfcbd6; background: transparent; font-weight: 650; white-space: nowrap; }
.primary-nav button:hover { color: #fff; background: rgba(255,255,255,.05); }
.primary-nav button.active { color: #fff; background: rgba(71,159,237,.12); }
.primary-nav button.active::after { position: absolute; bottom: 0; left: 22px; right: 22px; height: 3px; background: #53b3ff; content: ''; }
.primary-nav button:focus-visible, .sidebar button:focus-visible { outline: 2px solid #79c4ff; outline-offset: -3px; }
.sidebar { position: sticky; top: var(--header-height); align-self: start; z-index: 20; height: calc(100vh - var(--header-height)); height: calc(100dvh - var(--header-height)); display: flex; flex-direction: column; color: var(--sidebar-text); background: var(--sidebar); }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; min-height: 64px; padding: 16px 24px; color: #f1f5f8; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-heading strong { font-size: 14px; }
.nav-list { display: grid; align-content: start; gap: 6px; overflow-y: auto; padding: 16px 12px; }
.nav-list button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 6px; padding: 10px 12px; color: #bfc9d0; background: transparent; text-align: left; }
.nav-list button:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-list button.active { color: #fff; background: #1769aa; }
.nav-list button.selected { color: #fff; }
.nav-chevron { margin-left: auto; font-size: 23px; line-height: 1; transition: transform .15s ease; }
.nav-chevron.expanded { transform: rotate(90deg); }
.nav-children { display: grid; gap: 4px; margin: 6px 0 8px 23px; padding-left: 10px; border-left: 1px solid #46525c; }
.nav-children button { min-height: 40px; padding: 10px 12px; font-size: 13px; }
.nav-mark { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 5px; font-size: 11px; font-weight: 700; }
.sidebar-account { flex-shrink: 0; margin-top: auto; min-height: 74px; display: grid; grid-template-columns: minmax(0,1fr) 32px; align-items: center; gap: 6px; padding: 9px 10px; border-top: 1px solid rgba(255,255,255,.09); }
.account-profile { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 4px; border: 0; border-radius: 6px; background: transparent; color: inherit; text-align: left; }
.account-profile:hover { background: rgba(255,255,255,.08); }
.account-profile .avatar { flex-shrink: 0; }
.account-name { min-width: 0; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #14835d; font-weight: 700; }
.sidebar-account strong, .sidebar-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account strong { color: #fff; font-size: 13px; }
.sidebar-account small { margin-top: 3px; color: #94a2ad; font-size: 11px; }
.sidebar-account .icon-button { color: #bfc9d0; border-color: transparent; background: transparent; }

.workspace { min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; gap: 14px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar > div { min-width: 0; flex: 1; }
.topbar h1 { margin: 0; font-size: 19px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.topbar .breadcrumb { display: flex; gap: 9px; margin: 0 0 6px; font-size: 11px; }
.breadcrumb span { color: #a4adb6; }
.content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 24px 28px 42px; }
.content[aria-busy="true"] { opacity: .72; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat { min-height: 116px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.stat span, .stat small { display: block; color: var(--muted); }
.stat strong { display: block; margin: 8px 0 7px; font-size: 28px; line-height: 1; }
.stat small { font-size: 12px; }
.stat.warning { border-left: 3px solid var(--warning); }

.panel-section { margin-top: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.panel-section.flush { margin-top: 14px; }
.section-head { min-height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; font-size: 16px; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th { height: 42px; padding: 0 16px; color: #596571; background: var(--surface-muted); font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; }
td { height: 58px; padding: 9px 16px; border-top: 1px solid #edf0f2; vertical-align: middle; }
td strong, td small { display: block; }
td strong { font-weight: 650; }
td small { margin-top: 4px; color: var(--muted); font-size: 11px; }
tbody tr:hover { background: #fafcfd; }
.actions { text-align: right; white-space: nowrap; }
.empty { height: 120px; color: var(--muted); text-align: center; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; }
.status { display: inline-flex; align-items: center; min-width: 54px; justify-content: center; padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.status.good { color: #0f6f4d; background: #e7f5ef; }
.status.off { color: #6d7680; background: #edf0f2; }
.status.wait { color: #935018; background: #fff0e3; }
.status.bad { color: #a12f2f; background: #fdeaea; }
.text-good { color: var(--success); }
.text-warn { color: var(--warning); }

.toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toolbar-copy strong, .toolbar-copy span { display: block; }
.toolbar-copy strong { font-size: 16px; }
.toolbar-copy span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 8px; }
.filters input { width: 250px; }
input, select, textarea { border: 1px solid #cfd6dc; border-radius: 5px; color: var(--text); background: #fff; outline: none; }
input, select { height: 40px; padding: 0 11px; }
textarea { width: 100%; min-height: 118px; padding: 10px 11px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23,105,170,.1); }
.button { min-height: 40px; border: 1px solid transparent; border-radius: 5px; padding: 0 16px; font-weight: 650; }
.button.primary { color: #fff; background: var(--primary); }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { color: #34414d; border-color: #cfd6dc; background: #fff; }
.button.full { width: 100%; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid #d4dade; border-radius: 5px; color: #46525e; background: #fff; font-size: 18px; line-height: 1; }
.menu-button { display: none; }
.text-button { border: 0; padding: 6px 7px; color: var(--primary); background: transparent; }
.text-button:hover { color: var(--primary-hover); text-decoration: underline; }
.pagination { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.pagination > div { display: flex; align-items: center; gap: 10px; }

.field { display: block; }
.field > span { display: block; margin-bottom: 7px; color: #3e4a55; font-size: 13px; font-weight: 650; }
.field input, .field select { width: 100%; }
.field-note { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.login-panel .field { margin-bottom: 17px; }

.settings-layout { display: grid; gap: 18px; }
.integration-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.integration-tabs [role="tab"] { min-height: 40px; padding: 9px 17px; border: 1px solid transparent; border-radius: 5px; color: var(--muted); background: transparent; font-weight: 650; cursor: pointer; }
.integration-tabs [role="tab"]:hover { color: var(--primary); background: var(--surface-muted); }
.integration-tabs [aria-selected="true"] { color: #fff; background: var(--primary); }
.integration-tabs [aria-selected="true"]:hover { color: #fff; background: var(--primary-hover); }
.integration-tabs [role="tab"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 600px) {
    .integration-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .integration-tabs [role="tab"] { padding: 9px 8px; }
}
.settings-toolbar { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.settings-toolbar strong, .settings-toolbar small { display: block; }
.settings-toolbar strong { font-size: 17px; }
.settings-toolbar small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.settings-section { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.settings-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 18px; padding: 22px; }
.eventbridge-settings-body { padding: 18px 22px 22px; }
.eventbridge-settings-body .settings-form-grid { padding: 16px 0; }
.eventbridge-settings-body > .field-note { display: block; margin: 10px 0; }
.eventbridge-settings-body summary { cursor: pointer; margin: 14px 0; }
.sqs-settings-body { padding: 18px 22px 22px; }
.sqs-settings-body .settings-form-grid { padding: 18px 0; }
.sqs-region-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sqs-region-tabs button { min-height: 38px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: var(--surface); cursor: pointer; }
.sqs-region-tabs button[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); background: var(--surface-muted); font-weight: 650; }
.settings-wide { grid-column: 1 / -1; }
.encryption-key-setting { min-width: 0; overflow-wrap: anywhere; }
.encryption-key-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.integration-readiness { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 6px; background: var(--surface-muted); }
.integration-readiness.ready { border-left-color: #159669; }
.integration-readiness.blocked { border-left-color: #d48b18; }
.integration-readiness strong, .integration-readiness small { display: block; }
.integration-readiness strong { font-size: 14px; }
.integration-readiness small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.amazon-connection-test { display: grid; gap: 12px; }
.amazon-connection-test .encryption-key-actions { align-items: flex-end; margin-top: 0; }
.amazon-connection-test .integration-readiness { overflow-wrap: anywhere; }
.setting-toggle { min-height: 66px; display: flex; align-items: flex-start; gap: 12px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); cursor: pointer; }
.setting-toggle input { width: 18px; height: 18px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--primary); }
.setting-toggle strong, .setting-toggle small { display: block; }
.setting-toggle strong { font-size: 13px; }
.setting-toggle small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.asset-settings { padding: 0 22px; }
.asset-setting-row { min-height: 122px; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 20px 0; }
.asset-setting-row + .asset-setting-row { border-top: 1px solid #edf0f2; }
.asset-preview { display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); }
.asset-preview img { display: block; max-width: calc(100% - 18px); max-height: calc(100% - 18px); object-fit: contain; }
.logo-preview { width: 112px; height: 72px; }
.favicon-preview { width: 72px; height: 72px; margin-left: 20px; }
.asset-setting-info { min-width: 0; }
.asset-setting-info strong, .asset-setting-info small, .asset-url { display: block; }
.asset-setting-info strong { font-size: 14px; }
.asset-setting-info small { margin-top: 6px; color: var(--muted); font-size: 12px; }
.asset-url { max-width: 680px; margin-top: 8px; overflow: hidden; color: #687481; font: 11px/1.5 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.asset-actions { display: flex; align-items: center; gap: 5px; }
.upload-button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.upload-button.disabled { cursor: not-allowed; opacity: .55; }
.upload-button input { display: none; }
.text-button.danger { color: var(--danger); }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(17,24,31,.45); }
.modal { width: min(600px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; border-radius: 8px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.2); }
.modal.wide { width: min(720px, 100%); }
.password-modal { width: min(480px, 100%); max-height: calc(100dvh - 36px); }
.password-body { padding: 20px; }
.password-body .field { margin-bottom: 16px; }
.password-body > p:first-child { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.password-body .form-error { text-align: left; }
.modal-head { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 16px; padding: 20px; }
.check-row { padding: 0 20px 18px; color: #3e4a55; }
.check-row input { width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -3px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-muted); }
.migration-body { padding: 20px; }
.migration-summary { margin: 0 0 20px; }
.migration-summary > div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf0f2; }
.migration-summary dt { color: var(--muted); }
.migration-summary dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.migration-warning { margin: 16px 0 0; color: var(--warning); font-size: 12px; line-height: 1.6; }
.toast { position: fixed; z-index: 70; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 48px)); padding: 12px 16px; border-radius: 6px; color: #fff; background: #2f3a44; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.audit-detail { max-width: 360px; color: #56626d; font-size: 12px; word-break: break-word; }
.mobile-mask { display: none; }

.sync-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.sync-eyebrow { color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; }
.sync-heading h2 { margin: 8px 0; font-size: 25px; letter-spacing: -.5px; }
.sync-heading p { margin: 0; color: var(--muted); line-height: 1.6; }
.sync-refresh { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.sync-refresh label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.sync-refresh small { flex-basis: 100%; text-align: right; color: var(--muted); }
.sync-stats em { font-style: normal; font-size: 17px; color: var(--muted); font-weight: 400; }
.sync-alert { display: grid; gap: 6px; padding: 14px 18px; margin-bottom: 14px; border: 1px solid #f0d5ae; border-radius: 7px; color: #86501c; background: #fff9f0; font-size: 13px; line-height: 1.6; }
.sync-alert.danger { background: #fff3f3; color: #9c3434; border-color: #f1caca; }
.sync-placeholder { padding: 70px 20px; text-align: center; color: var(--muted); }
.sync-node-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(320px,100%),1fr)); gap: 16px; margin-top: 18px; }
.sync-node-card { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 18px; }
.sync-node-title { display: flex; align-items: center; gap: 11px; }
.sync-node-icon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; color: var(--primary); background: #eaf2fa; font-weight: 700; }
.sync-node-title > div { min-width: 0; flex: 1; }
.sync-node-title strong { display: block; overflow-wrap: anywhere; }
.sync-node-title small { display: block; margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.sync-node-title .status { flex-shrink: 0; }
.sync-node-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 22px 0 18px; }
.sync-node-metrics strong { display: block; font-size: 23px; margin-bottom: 5px; }
.sync-node-metrics small { color: var(--muted); font-size: 11px; }
.sync-node-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; color: var(--muted); }
.sync-process-table { min-width: 1030px; }
.sync-process-table td:first-child { max-width: 240px; overflow-wrap: anywhere; }
.sync-job-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) auto; align-items: end; gap: 12px; padding: 18px; background: var(--surface-muted); }
.sync-job-filters .field { margin: 0; }
.sync-filter-actions { display: flex; gap: 8px; padding-bottom: 1px; }
.sync-task-heading { flex-wrap: wrap; gap: 12px; }
.sync-task-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sync-task-actions .button { white-space: nowrap; }
.sync-error-cell { max-width: 260px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.node-test-result { min-width: 190px; max-width: 300px; overflow-wrap: anywhere; }
.node-health-result { min-width: 210px; max-width: 310px; overflow-wrap: anywhere; }
.error-logs-panel .sync-job-filters { grid-template-columns: minmax(150px,1fr) minmax(120px,1fr) minmax(180px,2fr) auto; }
.error-log-message { max-width: 420px; overflow-wrap: anywhere; white-space: pre-wrap; }
.error-log-dialog .sync-detail-body { min-height: 0; overflow-y: auto; }
.error-log-dialog p, .error-log-dialog dd { overflow-wrap: anywhere; }
.error-log-dialog pre { padding: 12px; background: var(--surface-muted); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
@media (max-width: 760px) { .error-logs-panel .sync-job-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } .error-log-keyword { grid-column: 1 / -1; } }
.sync-pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.sync-pagination > div { display: flex; gap: 8px; }
.sync-detail-body { padding: 20px; }
.order-sync-settings-form { margin-bottom: 32px; }
.order-sync-settings-form > .field-note { margin: 16px 22px 0; }
.order-sync-settings-form > .encryption-key-actions { margin: 18px 22px 0; }
.modal[aria-labelledby="sync-detail-title"] { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100dvh - 36px); }
.modal[aria-labelledby="sync-detail-title"] .sync-detail-body { min-height: 0; overflow-y: auto; }
.modal[aria-labelledby="sync-detail-title"] .modal-head,
.modal[aria-labelledby="sync-detail-title"] .modal-actions { flex-shrink: 0; }
.sync-detail-note { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.sync-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 0; }
.sync-detail-grid dt { color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.sync-detail-grid dd { margin: 0; overflow-wrap: anywhere; }
.sync-detail-grid small { display: block; color: var(--muted); margin-top: 5px; }
.sync-detail-wide { grid-column: 1 / -1; }
.sync-user-search { display: flex; align-items: flex-end; gap: 12px; padding: 18px; background: var(--surface-muted); }
.sync-user-search .field { width: min(350px, 100%); min-width: 0; margin: 0; }
.sync-user-search .button { flex-shrink: 0; }
.sync-user-actions { white-space: nowrap; }
.sync-user-actions .text-button { display: block; }
.sync-control-actions { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; }
.sync-control-reason { max-width: 240px; overflow-wrap: anywhere; }

@media (max-width: 1100px) { .sync-job-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) {
    .sync-heading { align-items: flex-start; flex-direction: column; }
    .sync-refresh { justify-content: flex-start; }
    .sync-refresh small { text-align: left; }
    .sync-job-filters { padding: 14px; gap: 10px; }
    .sync-pagination { align-items: flex-start; flex-direction: column; }
    .sync-detail-grid { grid-template-columns: 1fr; }
    .sync-node-grid + .panel-section .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (max-width: 1050px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
    .app-shell { --header-height: 104px; display: block; }
    .global-header { flex-direction: column; }
    .brand { flex: 0 0 56px; padding: 0 16px; }
    .brand img { width: 78px; height: 30px; }
    .primary-nav { flex: 1; gap: 0; padding: 0 6px; }
    .primary-nav button { flex: 1 0 auto; padding: 0 18px; }
    .primary-nav button.active::after { left: 18px; right: 18px; }
    .sidebar { position: fixed; top: 0; z-index: 40; left: 0; height: 100vh; height: 100dvh; transform: translateX(-100%); width: min(280px, 85vw); transition: transform .18s ease; }
    .sidebar.open { transform: translateX(0); }
    .mobile-mask { position: fixed; inset: 0; z-index: 35; display: block; background: rgba(17,24,31,.35); }
    .menu-button { display: inline-grid; }
    .topbar { height: 66px; padding: 0 15px; }
    .topbar .breadcrumb { gap: 5px; font-size: 10px; }
    .content { padding: 16px 14px 30px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .stat { min-height: 102px; padding: 15px; }
    .stat strong { font-size: 24px; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .filters { display: grid; grid-template-columns: minmax(0,1fr) 110px; }
    .filters input { width: 100%; }
    .filters .button { grid-column: 1 / -1; }
    .toolbar > .button { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .settings-toolbar { align-items: stretch; flex-direction: column; }
    .settings-toolbar .button { width: 100%; }
    .settings-form-grid { grid-template-columns: 1fr; padding: 18px; }
    .settings-wide { grid-column: auto; }
    .integration-readiness { align-items: flex-start; flex-direction: column; }
    .asset-settings { padding: 0 18px; }
    .asset-setting-row { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; }
    .logo-preview { width: 92px; height: 64px; }
    .favicon-preview { width: 64px; height: 64px; margin-left: 14px; }
    .asset-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .asset-url { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 420px) {
    .stat-grid { grid-template-columns: 1fr; }
    .login-panel { padding: 27px 22px; }
}

/* Sync center: choose the business first, then its operational view. */
.sync-workspace { --primary: #167854; --primary-hover: #105e41; --sync-soft: #edf7f1; --sync-border: #bad8c7; min-width: 0; }
.sync-workspace button:focus-visible, .sync-workspace summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.sync-workspace input:focus, .sync-workspace select:focus { box-shadow: 0 0 0 3px rgba(22,120,84,.1); }
.sync-domains { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 26px; }
.sync-domain { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 80px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); text-align: left; transition: border-color .15s ease, background-color .15s ease; }
.sync-domain:hover { border-color: #a9bbb0; background: #fafcfb; }
.sync-domain.active { border-color: #80b498; background: var(--sync-soft); box-shadow: inset 0 0 0 1px rgba(22,120,84,.07); }
.sync-domain-mark { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border: 1px solid #e2e8e4; border-radius: 8px; color: #687b70; background: #f4f7f5; font-size: 12px; font-weight: 750; letter-spacing: .4px; }
.sync-domain.active .sync-domain-mark { border-color: #cce2d5; color: var(--primary); background: #fff; }
.sync-domain-copy { min-width: 0; }
.sync-domain-copy strong, .sync-domain-copy small { display: block; }
.sync-domain-copy strong { font-size: 15px; font-weight: 700; line-height: 1.4; }
.sync-domain-copy small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.sync-domain.active .sync-domain-copy strong { color: #155e43; }
.sync-domain-arrow { flex-shrink: 0; margin-left: auto; color: #a2aea7; font-size: 18px; }
.sync-domain.active .sync-domain-arrow { color: var(--primary); }
.sync-workspace .sync-heading { gap: 24px; margin-bottom: 18px; }
.sync-workspace .sync-heading > div:first-child { min-width: 0; }
.sync-workspace .sync-eyebrow { font-size: 10px; letter-spacing: 1.1px; }
.sync-workspace .sync-heading h2 { margin: 7px 0; font-size: 24px; line-height: 1.35; letter-spacing: -.3px; }
.sync-workspace .sync-heading p { font-size: 13px; }
.sync-workspace .sync-refresh { flex: 0 0 auto; gap: 8px 12px; }
.sync-workspace .sync-refresh input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.sync-workspace .sync-refresh small { font-size: 11px; }
.sync-view-nav { display: flex; gap: 24px; margin-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.sync-view-nav button { position: relative; flex-shrink: 0; min-height: 44px; padding: 0 2px 11px; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 600; white-space: nowrap; }
.sync-view-nav button:hover { color: var(--primary); }
.sync-view-nav button.active { color: var(--primary); }
.sync-view-nav button.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); content: ''; }
.sync-workspace .sync-stats { gap: 12px; margin-bottom: 18px; }
.sync-workspace .sync-stats .stat { min-height: 120px; padding: 18px 20px; border-radius: 8px; }
.sync-workspace .sync-stats .stat > span { font-size: 12px; }
.sync-workspace .sync-stats .stat strong { margin: 12px 0 9px; font-size: 28px; letter-spacing: -.6px; }
.sync-workspace .sync-stats .stat small { font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.sync-workspace .sync-stats .stat.warning { border-left: 1px solid var(--line); }
.sync-workspace .sync-stats .stat.warning strong { color: var(--warning); }
.sync-workspace .sync-alert { padding: 12px 16px; font-size: 12px; }
.sync-overview-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); align-items: start; gap: 18px; }
.sync-overview-grid > .panel-section { min-width: 0; margin-top: 0; border-radius: 8px; }
.sync-workspace .section-head { gap: 16px; }
.sync-workspace .section-head > div { min-width: 0; }
.sync-workspace .section-head h2 { font-size: 15px; }
.sync-workspace .section-head p { line-height: 1.6; overflow-wrap: anywhere; }
.sync-workspace .section-head select { min-width: 0; max-width: 100%; }
.sync-health-list { padding: 0 18px; }
.sync-health-list > button { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 79px; padding: 16px 0; border: 0; color: var(--text); background: transparent; text-align: left; }
.sync-health-list > button + button { border-top: 1px solid #edf0ee; }
.sync-health-list > button:hover > span > strong { color: var(--primary); }
.sync-health-list > button > span { min-width: 0; }
.sync-health-list > button > span > strong, .sync-health-list > button small { display: block; }
.sync-health-list > button > span > strong { font-size: 13px; font-weight: 600; }
.sync-health-list > button small { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.sync-health-list > button > strong { flex-shrink: 0; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.sync-health-list > button > strong { display: flex; align-items: center; gap: 16px; }
.sync-health-list > button > strong > small { margin: 0; }
.sync-type-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; padding: 5px 18px 10px; }
.sync-type-list > button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 48px; padding: 12px 0; border: 0; border-bottom: 1px solid #edf0ee; color: #44524a; background: transparent; text-align: left; font-size: 12px; line-height: 1.5; }
.sync-type-list > button:hover { color: var(--primary); }
.sync-type-list > button > span:first-child { overflow-wrap: anywhere; }
.sync-type-list > button > span:last-child { flex-shrink: 0; color: #8ea097; }
.sync-overview-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 0; padding: 13px 18px; color: var(--muted); background: #fafcfb; font-size: 11px; line-height: 1.6; }
.sync-overview-footer p { margin: 0; }
.sync-overview-footer .text-button { padding: 2px 0; font-size: 12px; }
.sync-config-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 0 0 18px; }
.sync-config-links > article { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: start; gap: 12px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.sync-config-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: var(--primary); background: var(--sync-soft); font-size: 12px; font-weight: 700; }
.sync-config-links h3 { margin: 1px 0 7px; font-size: 14px; line-height: 1.5; }
.sync-config-links p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.sync-config-links > article > button { grid-column: 2; justify-self: start; min-height: 34px; margin-top: 2px; padding: 0 12px; font-size: 12px; }
.sync-config-links > article:only-child { grid-column: 1 / -1; }
.sync-shared-settings { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.sync-shared-settings > summary { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; color: #44524a; font-size: 13px; line-height: 1.6; cursor: pointer; list-style: none; }
.sync-shared-settings > summary::-webkit-details-marker { display: none; }
.sync-shared-settings > summary::after { flex: 0 0 auto; color: #7d8e83; content: '+'; font-size: 20px; font-weight: 400; line-height: 1; }
.sync-shared-settings[open] > summary { border-bottom: 1px solid var(--line); }
.sync-shared-settings[open] > summary::after { content: '\2212'; }
.sync-shared-settings > summary strong, .sync-shared-settings > summary small { display: block; }
.sync-shared-settings > summary small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.sync-shared-settings > summary > span { margin-left: auto; color: var(--muted); font-size: 11px; }
.sync-shared-settings .settings-form-grid { min-width: 0; }
.sync-workspace .sync-job-filters .field { min-width: 0; }
.sync-workspace .sync-node-icon { color: var(--primary); background: var(--sync-soft); }
.sync-workspace .sync-node-card, .sync-workspace .settings-section { border-radius: 8px; }
.sync-workspace .panel-section .sync-alert { margin: 14px 18px; }

@media (max-width: 1100px) {
    .sync-overview-grid { grid-template-columns: 1fr; }
    .sync-workspace .sync-heading { align-items: flex-start; }
    .sync-workspace .sync-refresh { max-width: 270px; }
}

@media (max-width: 760px) {
    .sync-domains { gap: 9px; margin-bottom: 22px; }
    .sync-domain { align-items: flex-start; flex-wrap: wrap; gap: 10px; min-height: 0; padding: 13px; }
    .sync-domain-mark { flex-basis: 30px; width: 30px; height: 30px; border-radius: 6px; font-size: 10px; }
    .sync-domain-copy { flex: 1 1 100%; order: 2; }
    .sync-domain-copy strong { font-size: 14px; }
    .sync-domain-copy small { font-size: 11px; }
    .sync-domain-arrow { align-self: center; font-size: 16px; }
    .sync-workspace .sync-heading { gap: 14px; margin-bottom: 14px; }
    .sync-workspace .sync-heading h2 { font-size: 22px; }
    .sync-workspace .sync-heading p { font-size: 12px; }
    .sync-workspace .sync-refresh { width: 100%; max-width: none; justify-content: space-between; gap: 8px; }
    .sync-workspace .sync-refresh small { text-align: left; }
    .sync-view-nav { justify-content: space-between; gap: 10px; margin-bottom: 18px; }
    .sync-view-nav button { min-width: 0; min-height: 42px; padding: 0 0 10px; font-size: 12px; }
    .sync-workspace .sync-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
    .sync-workspace .sync-stats .stat { min-height: 122px; padding: 15px 13px; }
    .sync-workspace .sync-stats .stat strong { margin: 11px 0 8px; font-size: 25px; }
    .sync-workspace .sync-stats em { font-size: 14px; }
    .sync-overview-grid { gap: 14px; }
    .sync-workspace .section-head { padding: 14px; }
    .sync-workspace .section-head h2 { font-size: 14px; }
    .sync-health-list { padding: 0 14px; }
    .sync-health-list > button { min-height: 76px; gap: 12px; }
    .sync-health-list > button > strong { font-size: 21px; }
    .sync-type-list { gap: 0 14px; padding: 3px 14px 10px; }
    .sync-overview-footer { padding: 12px 14px; }
    .sync-config-links { grid-template-columns: 1fr; gap: 12px; }
    .sync-config-links > article { padding: 16px; }
    .sync-shared-settings > summary { padding: 16px; }
    .sync-workspace .sync-task-actions { width: 100%; }
    .sync-workspace .sync-task-actions .button { flex: 1 1 auto; padding: 0 10px; font-size: 12px; }
    .sync-workspace .sync-user-search { padding: 14px; gap: 10px; }
    .sync-workspace .sync-user-search .button { padding: 0 12px; }
    .sync-workspace .sync-filter-actions { grid-column: 1 / -1; }
    .sync-workspace .sync-filter-actions .button { flex: 1; }
    .sync-workspace .sync-pagination { gap: 12px; padding: 14px; }
    .sync-workspace .panel-section .sync-alert { margin: 12px 14px; }
    .sync-workspace .field > span { overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
    .sync-domain { transition: none; }
}

.sync-freshness-panel { grid-column: 1 / -1; }
.sqs-destination-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sqs-destination-control input { flex: 1 1 240px; min-width: 0; }
.sqs-destination-control .button { flex: 0 0 auto; }
.sync-freshness-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(280px,100%),1fr)); }
.sync-freshness-item { min-width: 0; padding: 18px; border-right: 1px solid var(--line); }
.sync-freshness-item > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sync-freshness-item dl, .sync-stream-body dl { margin: 18px 0; display: grid; gap: 15px; }
.sync-freshness-item dt, .sync-stream-body dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.sync-freshness-item dd, .sync-stream-body dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.sync-freshness-item > small, .sync-stream-body small { color: var(--muted); font-size: 11px; }
.sync-stream-body { padding: 18px; }
.sync-stream-panel { grid-column: 1 / -1; }
.sync-stream-body dl { grid-template-columns: repeat(3,minmax(0,1fr)); }
.sync-performance { margin-top: 18px; }
.sync-performance > summary { padding: 18px; cursor: pointer; font-weight: 600; }
.sync-performance > summary span { font-size: 11px; font-weight: normal; color: var(--muted); margin-left: 12px; }
.sync-performance table { min-width: 760px; }
.modal[aria-labelledby="sync-help-title"] li { margin: 12px 0; line-height: 1.8; }
@media (max-width: 760px) { .sync-stream-body dl { grid-template-columns: repeat(2,minmax(0,1fr)); } .sync-freshness-item { border-right: 0; border-bottom: 1px solid var(--line); } }
.notification-dashboard { min-width: 0; }
.notification-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:12px 0; }
.notification-shop { margin: 20px 0; padding: 20px; border: 1px solid #dfe5ed; border-radius: 12px; background: #fff; min-width: 0; }
.notification-table { min-width: 900px; }
.notification-table td { vertical-align: top; }
.notification-table small { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.notification-table details { max-width: 320px; margin-top: 8px; font-size: 12px; }
.notification-table summary { cursor: pointer; color: #64748b; }
.notification-calibrations { line-height: 1.9; }
@media (max-width: 600px) { .notification-shop { padding: 12px; } }
