:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --white: #fff;
  --ink: #182238;
  --muted: #707b90;
  --line: #e6e9f1;
  --green: #5263db;
  --pale: #eef0ff;
  --nav: #101a2c;
  --accent: #5263db;
  --success: #167b62;
  --success-bg: #eaf6ef;
  --amber: #a06b20;
  --danger: #bb4655;
  --shadow: 0 2px 5px #17234203, 0 10px 28px #17234203;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--accent); text-underline-offset: 3px; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { transition: background-color .16s, border-color .16s, color .16s; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #aeb8ff; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:disabled:hover { transform: none; }
.hidden { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0 0 8px; font-size: clamp(26px, 2.2vw, 34px); line-height: 1.25; font-weight: 730; letter-spacing: -1.1px; }
h2 { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 700; letter-spacing: -.3px; }
.muted { color: var(--muted); margin: 7px 0; line-height: 1.65; }
.small { font-size: 12px; line-height: 1.75; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 10px; line-height: 1.6; font-weight: 750; letter-spacing: 1.3px; color: var(--muted); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: #6778ed; color: white; flex: 0 0 auto; }
.brand-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.brand-name { display: inline-flex; align-items: center; gap: 7px; font-size: 23px; line-height: 1; font-weight: 750; letter-spacing: -.9px; }
.brand-cms { color: #aeb9fd; font-size: 10px; font-weight: 750; letter-spacing: .8px; border: 1px solid #aeb9fd40; border-radius: 4px; padding: 4px 5px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 10px 15px; border: 1px solid #dfe3ed; border-radius: 8px; background: #fff; color: #35415a; font-size: 12px; font-weight: 650; line-height: 1.4; text-decoration: none; white-space: nowrap; box-shadow: 0 1px 2px #0e1f3b04; }
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: #f9faff; border-color: #c3cce3; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #4455c5; border-color: #4455c5; }
.btn.full { display: flex; width: 100%; }
.btn.danger { color: var(--danger); border-color: #efcdd3; }
.btn.danger:hover { background: #fff5f6; }
.textbtn { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 650; line-height: 1.5; text-decoration: none; }
.textbtn:hover { color: #3445b0; }
.field { display: grid; gap: 8px; margin: 20px 0; }
.field label { display: grid; gap: 8px; font-size: 12px; font-weight: 650; line-height: 1.5; color: #35415a; }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea, select { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid #dce1ed; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.5; outline: none; }
.field textarea { min-height: 90px; resize: vertical; }
input::placeholder { color: #a2aabd; font-weight: 400; }
.field input:focus, .field select:focus, .field textarea:focus, select:focus, .filters input:focus, .inlineform input:focus { border-color: #8995e9; box-shadow: 0 0 0 3px #5263db12; }
.check { display: flex; align-items: center; gap: 9px; margin: 22px 0; font-size: 13px; color: #45516a; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.error { min-height: 18px; margin: 13px 0 0; color: var(--danger); font-size: 12px; }
/* Sign in */
.auth { position: relative; display: grid; grid-template-columns: 49% 51%; min-height: 100svh; background: var(--white); }
.auth-story { display: flex; flex-direction: column; min-width: 0; padding: 45px clamp(32px, 5vw, 80px) 32px; background: #111c31; color: white; overflow: hidden; }
.auth-story > .brand .brand-name { font-size: 26px; }
.auth-story-content { width: 100%; max-width: 510px; margin: auto 0; padding: 80px 0; }
.auth-story .eyebrow { color: #a5b1dd; font-size: 10px; letter-spacing: 1.8px; }
.auth-story h2 { margin: 22px 0 25px; font-size: clamp(39px, 4.2vw, 62px); font-weight: 650; line-height: 1.13; letter-spacing: -2.3px; }
.auth-story h2 > span { color: #a3b0ff; }
.auth-story-content > p:not(.eyebrow) { max-width: 365px; margin: 0; color: #a5b1ca; font-size: 15px; line-height: 1.8; }
.auth-flow { display: flex; align-items: center; width: 100%; max-width: 400px; margin-top: 47px; }
.flow-node { display: grid; justify-items: center; gap: 10px; flex: 1; min-width: 0; padding: 17px 6px; border: 1px solid #34415b; border-radius: 12px; background: #19253c; }
.flow-node .icon { color: #a0afd6; width: 22px; height: 22px; }
.flow-node > span { font-size: 10px; color: #bec9df; white-space: nowrap; }
.flow-center { background: #293765; border-color: #5263ac; }
.flow-center .icon { color: #c2caff; }
.flow-center > span { color: #e1e5ff; }
.flow-connector { height: 1px; width: 25px; flex: 0 0 25px; background: #4b5875; position: relative; }
.flow-connector:after { content: ""; position: absolute; right: 0; top: -2px; width: 4px; height: 4px; border-right: 1px solid #71809d; border-top: 1px solid #71809d; transform: rotate(45deg); }
.auth-story-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; color: #7584a6; font-size: 8px; font-weight: 650; letter-spacing: .8px; }
.auth-story-footer > span { width: 3px; height: 3px; background: #617090; border-radius: 50%; }
.auth-form-side { display: grid; place-items: center; min-width: 0; padding: 48px 36px; }
.authbox { width: min(390px, 100%); }
.authbox h1 { font-size: 30px; letter-spacing: -.9px; margin-bottom: 34px; }
.authbox .field { margin: 20px 0; }
.authbox .field input { padding: 13px 14px; }
.authbox .btn.full { justify-content: center; min-height: 47px; margin-top: 28px; padding: 12px 16px; }
.authbox .error:empty { display: none; }
/* App shell */
.layout { min-height: 100svh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; width: 250px; padding: 31px 18px 20px; background: var(--nav); color: #fff; overflow-y: auto; }
.sidebar > .brand { padding: 0 7px 32px; }
.sidebar > .brand .brand-name { font-size: 21px; }
.sidebar .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
.sidebar .brand-cms { font-size: 8px; padding: 4px; }
.workspace-switch { width: calc(100% - 6px); margin: 0 3px 26px; padding: 10px 11px; border-color: #344159; background: #152035; color: #dce4f6; font-size: 11px; }
.nav-label { padding-left: 13px; margin: 0 0 10px; color: #677797; font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.sidebar nav { display: grid; gap: 6px; }
.nav { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 45px; padding: 12px 13px; border: 1px solid transparent; border-radius: 8px; background: none; color: #9ba9c4; font-size: 12px; font-weight: 550; text-align: left; white-space: nowrap; }
.nav .icon { width: 18px; height: 18px; }
.nav:hover { background: #1c2940; color: #e9edfb; }
.nav.active { color: #c6cdff; background: #263254; border-color: #33416b; }
.nav.active:after { content: ""; position: absolute; right: 12px; width: 4px; height: 4px; background: #aab7ff; border-radius: 50%; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #27334b; padding: 21px 5px 0; color: #b6c2d9; }
.sidebar-identity { display: flex; gap: 10px; align-items: center; }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #22314b; color: #afbee2; flex: 0 0 auto; }
.account-avatar .icon { width: 17px; height: 17px; }
.sidebar-identity > div { min-width: 0; }
.sidebar-identity small { display: block; color: #71819e; font-size: 7px; font-weight: 650; letter-spacing: .7px; margin-bottom: 3px; }
.sidebar-identity #emailLabel { display: block; font-size: 11px; color: #d0d9ed; overflow-wrap: anywhere; }
.logout { display: flex; align-items: center; gap: 8px; margin: 16px 0 0 42px; padding: 0; border: 0; color: #899ab9; background: none; font-size: 11px; }
.logout .icon { width: 14px; height: 14px; }
.logout:hover { color: #fff; }
.main { margin-left: 250px; padding: 0 40px; max-width: 1800px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 86px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 11px; color: #44516b; }
.breadcrumb-product { color: #969fb1; }
.breadcrumb-divider { color: #c7cdda; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.timezone { color: #97a0b1; font-size: 10px; }
.refresh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; min-width: 100px; padding: 9px 14px; border: 1px solid #dce1f5; border-radius: 10px; background: #eef1ff; color: #5061c5; box-shadow: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
.refresh-btn .icon { width: 17px; height: 17px; transition: transform .2s ease; }
.refresh-btn:hover { background: #e4e9ff; border-color: #bfc9f3; color: #3e4eaf; }
.refresh-btn:hover .icon { transform: rotate(25deg); }
.refresh-btn[aria-busy="true"] { opacity: .8; cursor: progress; }
.refresh-btn[aria-busy="true"] .icon { animation: refresh-spin .9s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh-btn .icon { transition: none; } .refresh-btn[aria-busy="true"] .icon { animation: none; } }
.page { display: none; min-height: calc(100svh - 222px); }
.page.active { display: block; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.pagehead > div:first-child { min-width: 0; }
.pagehead .muted { margin: 8px 0 0; font-size: 13px; }
.period-label { display: inline-block; padding: 3px 7px; border: 1px solid #dce2f0; border-radius: 5px; color: #6b7892; background: #fff; font-size: 9px; font-weight: 500; letter-spacing: 0; }
.detail-head .textbtn { margin-bottom: 15px; color: #7b87a0; }
.detail-head .muted { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.detail-head h1 { margin-bottom: 4px; }
.main-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 42px; padding: 20px 0 22px; border-top: 1px solid var(--line); color: #a0a8b8; font-size: 10px; }
.main-footer > span:first-child { font-weight: 650; }
.main-footer b { color: #8d97ad; font-size: 8px; font-weight: 600; }
/* Dashboard & site cards */
.cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 17px; margin-bottom: 26px; }
.card, .panel { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 21px 21px 18px; min-width: 0; }
.metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card small { display: block; color: #738097; font-size: 11px; font-weight: 550; line-height: 1.6; }
.metric-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px; color: #7181a6; background: #f1f4fa; }
.metric-icon .icon { width: 16px; height: 16px; }
.card strong { display: block; margin: 13px 0 4px; color: var(--ink); font-size: 34px; font-weight: 680; letter-spacing: -1px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.card em { color: #99a2b4; font-size: 10px; font-style: normal; }
.metric-redirect .metric-icon { color: var(--accent); background: var(--pale); }
.metric-redirect strong { color: var(--accent); }
.metric-original .metric-icon { color: var(--success); background: var(--success-bg); }
.metric-pending .metric-icon { color: #a88443; background: #fcf5e9; }
.panel { padding: 24px; margin-bottom: 22px; min-width: 0; }
.panelhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 21px; }
.panelhead > div { min-width: 0; }
.panelhead .small { font-size: 11px; margin: 5px 0 0; }
.panelhead select { max-width: 230px; font-size: 12px; padding: 10px; }
.panelhead .eyebrow { font-size: 8px; margin-bottom: 6px; }
.connected-sites { padding: 25px 26px 10px; }
.line { display: flex; align-items: center; gap: 22px; padding: 20px 0; border-top: 1px solid var(--line); min-width: 0; }
.line:first-child { border-top: 0; }
.line > div:first-child { flex: 1; min-width: 0; }
.line b { color: #2c3850; font-size: 13px; font-weight: 650; }
.line small, td small { display: block; margin-top: 5px; color: #8d97aa; font-size: 10px; line-height: 1.7; max-width: 330px; overflow-wrap: anywhere; }
.site.line { position: relative; padding-left: 46px; }
.site.line:before { content: ""; display: block; position: absolute; left: 0; top: 24px; width: 31px; height: 31px; border: 1px solid #e0e5f3; border-radius: 8px; background: #f7f8fc; }
.site.line:after { content: ""; display: block; position: absolute; left: 9px; top: 33px; width: 11px; height: 11px; border: 1.5px solid #9aa7c2; border-radius: 50%; }
.site.line .textbtn { margin-left: 7px; font-size: 11px; }
.sitegrid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.sitecard { margin-bottom: 0; padding: 23px; }
.sitecard:hover { border-color: #cfd6e8; box-shadow: 0 6px 22px #2b426409; }
.sitecard .panelhead { margin-bottom: 22px; }
.sitecard h2 { font-size: 19px; margin: 0 0 5px; }
.sitecard > .muted { font-size: 12px; overflow-wrap: anywhere; }
.sitefacts { display: grid; gap: 7px; padding: 23px 0; color: #8893a9; font-size: 11px; }
.sitefacts b { color: #35425c; font-size: 13px; font-weight: 650; }
.sitefacts small { font-size: 10px; }
.sitecard .btn.full { min-height: 42px; color: #56627f; font-size: 10px; background: #fafbff; }
.favicon { display: grid; place-items: center; width: 40px; height: 40px; background: var(--pale); color: #5e6fd4; border: 1px solid #e4e8ff; border-radius: 11px; font-size: 18px; font-weight: 700; }
.setup-guide { padding: 7px 2px 0; }
.setup-intro { display: flex; align-items: center; gap: 20px; margin: 0 0 21px; }
.setup-intro .eyebrow { margin: 0; font-size: 8px; color: #919cb2; }
.setup-intro h2 { font-size: 13px; font-weight: 550; color: #64718c; letter-spacing: 0; }
.setup-guide ol { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; padding: 0; margin: 0; list-style: none; }
.setup-guide li { display: flex; align-items: flex-start; gap: 12px; }
.setup-guide li > span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #dce2ed; border-radius: 8px; color: #8a96b0; font-size: 9px; flex: 0 0 auto; }
.setup-guide li b { display: block; color: #62708a; font-size: 11px; font-weight: 600; }
.setup-guide li p { margin: 3px 0 0; color: #98a1b3; font-size: 10px; line-height: 1.6; }
.tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 9px; border: 1px solid #e5e9f1; border-radius: 6px; color: #7e8aa2; background: #f5f7fb; font-size: 10px; font-weight: 550; line-height: 1.5; white-space: nowrap; }
.tag.good { color: var(--success); background: var(--success-bg); border-color: #dbecdf; }
.tag.bad { color: var(--danger); background: #fdf0f2; border-color: #f7dce0; }
.tag.pending { color: var(--amber); background: #fff8ec; border-color: #f4e9d5; }
.empty { padding: 45px 18px; color: #919bb0; text-align: center; font-size: 12px; line-height: 1.8; }
#siteCards > .empty { grid-column: 1 / -1; padding: 70px 20px; border-style: dashed; box-shadow: none; background: #ffffff70; }
/* Site detail, rules & integration */
.tabs { display: flex; gap: 30px; margin-bottom: 28px; border-bottom: 1px solid #dde3ef; overflow-x: auto; scrollbar-width: thin; }
.tab { min-height: 46px; margin-bottom: -1px; padding: 11px 0 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: #8a95aa; font-size: 12px; font-weight: 550; white-space: nowrap; }
.tab:hover { color: #5263ba; }
.tab.active { color: var(--accent); font-weight: 650; border-bottom-color: var(--accent); }
.tabpane { display: none; }
.tabpane.active { display: block; }
.destination a { display: block; overflow-wrap: anywhere; color: #818da4; font-size: 12px; line-height: 1.8; margin-top: 5px; text-decoration: none; }
.destination a:hover { color: var(--accent); text-decoration: underline; }
.rule { display: grid; grid-template-columns: 1.2fr 1fr .8fr 72px; align-items: center; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); font-size: 12px; }
.rule:first-child { border-top: 0; }
.rule b { color: #394660; font-size: 12px; font-weight: 650; }
.rule small { color: #8a95aa; font-size: 11px; }
.routingrule { grid-template-columns: minmax(120px,1fr) auto 48px 83px; }
.routingrule small { display: block; margin-top: 6px; line-height: 1.8; }
.rule .tag { font-size: 9px; }
.rule .btn { min-height: 33px; padding: 7px 11px; font-size: 10px; }
.toggle { position: relative; width: 44px; height: 40px; padding: 9px 3px; background: none; border: 0; border-radius: 8px; }
.toggle:before { position: absolute; content: ""; inset: 9px 2px; background: #dce2ed; border: 1px solid #d1d9e6; border-radius: 20px; }
.toggle > span { position: relative; display: block; width: 16px; height: 16px; margin-left: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px #2032541f; transition: transform .16s; }
.toggle.on:before { background: var(--accent); border-color: var(--accent); }
.toggle.on span { transform: translateX(17px); }
.inlineform { display: flex; align-items: flex-end; gap: 12px; margin: 20px 0 8px; }
.inlineform label { color: #7b88a1; font-size: 11px; }
.inlineform input { display: block; width: 100px; padding: 10px 12px; margin-top: 7px; border: 1px solid #dce1ed; border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; text-transform: uppercase; outline: none; }
#previewResult { margin-top: 16px; font-size: 12px; }
#integrationInstructions > .muted { font-size: 12px; line-height: 1.9; }
code { border-radius: 4px; background: #f0f3fa; color: #5466ae; padding: 2px 5px; font: 11px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.download { margin: 12px 0 4px; }
.snippet { padding: 22px; margin: 17px 0; border: 1px solid #26344b; border-radius: 11px; background: #142036; color: #bfcde8; font: 11px/1.9 ui-monospace, SFMono-Regular, Consolas, monospace; overflow: auto; white-space: pre; tab-size: 2; }
.keybox { padding: 15px 17px; margin: 7px 0; border: 1px solid #e0e6f3; border-radius: 9px; background: #f5f7fc; color: #5e6c8a; overflow-wrap: anywhere; font: 11px/1.9 ui-monospace, SFMono-Regular, Consolas, monospace; }
.integration-key-field { padding-top: 24px; margin: 24px 0 0; border-top: 1px solid var(--line); }
.rowbuttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.integration-key-field .rowbuttons { margin-top: 5px; }
.integration-test-actions { justify-content: flex-start; }
.testlink { display: block; padding: 16px; margin-top: 20px; border: 1px solid #d9dffb; border-radius: 9px; background: var(--pale); color: var(--accent); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.connection-details { margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11px; }
.callout { margin: 0 0 22px; padding: 14px 17px; border: 1px solid #dfe5fa; border-radius: 9px; background: #f0f3fe; color: #6b7b9f; font-size: 12px; line-height: 1.8; }
.callout.small { font-size: 11px; }
.message { margin-bottom: 22px; padding: 14px 17px; border: 1px solid #dbece1; border-radius: 9px; background: var(--success-bg); color: var(--success); font-size: 12px; }
/* Reports */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.3fr auto; gap: 16px; align-items: end; margin-bottom: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.filters label { display: grid; gap: 8px; color: #77839b; font-size: 10px; font-weight: 600; }
.filters input, .filters select { width: 100%; min-width: 0; min-height: 40px; padding: 10px 11px; border: 1px solid #dce2ef; border-radius: 7px; background: #fff; color: #4f5c77; font-size: 11px; outline: none; }
.filters .btn { min-height: 40px; }
.report-caption { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 7px 20px; margin: 10px 0 18px; color: #4e5d7a; font-size: 12px; }
.report-caption b { font-weight: 650; }
.report-caption small { color: #97a1b5; font-size: 9px; }
.reportcards { gap: 16px; margin-bottom: 16px; }
.reportcards .card { padding: 20px; }
.reportcards .card strong { font-size: 30px; margin-top: 15px; }
.reportcards .card:nth-child(2) strong { color: var(--accent); }
.reportcards .card:nth-child(3) strong { color: var(--success); }
.reportchips { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 25px; margin: 19px 0 26px; padding: 0 2px; color: #8793a9; font-size: 10px; }
.reportchips b { margin-left: 5px; color: #52627e; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.columns { display: grid; grid-template-columns: 1.12fr 1fr; gap: 22px; }
.columns > .panel { min-width: 0; }
.tablewrap { overflow: auto; scrollbar-width: thin; scrollbar-color: #d4dbea transparent; }
table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; }
th { padding: 12px 11px; border-top: 1px solid #edf0f7; border-bottom: 1px solid var(--line); background: #fafbfe; color: #8b96ad; font-size: 9px; font-weight: 650; letter-spacing: .4px; white-space: nowrap; }
td { max-width: 260px; padding: 17px 11px; border-bottom: 1px solid #edf0f6; color: #55637f; font-size: 11px; overflow-wrap: anywhere; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbff; }
.countrytable table { min-width: 370px; }
.countrytable th { font-size: 8px; padding: 11px 8px; }
.countrytable td { padding: 14px 8px; font-variant-numeric: tabular-nums; }
.countrytable td:first-child { color: #42516e; }
.country-code { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; margin-right: 7px; padding: 3px 4px; border: 1px solid #e4e9f3; border-radius: 4px; background: #f5f7fb; color: #8996b0; font-size: 8px; font-weight: 650; }
.countrytable, .sources { max-height: 340px; overflow: auto; scrollbar-width: thin; }
.source { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 0; border-bottom: 1px solid #edf0f7; color: #6d7b97; font-size: 11px; }
.source:first-child { padding-top: 4px; }
.source:last-child { border-bottom: 0; }
.source > span { max-width: 80%; overflow-wrap: anywhere; }
.source b { font-size: 12px; font-weight: 600; color: #4b5b7a; font-variant-numeric: tabular-nums; }
.report-target-url { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.daychart { max-height: 380px; overflow: auto; scrollbar-width: thin; }
.dayrow { display: grid; grid-template-columns: 88px 1fr 50px; gap: 18px; align-items: center; padding: 9px 0; font-size: 10px; font-variant-numeric: tabular-nums; }
.dayrow > span { color: #8a97af; font-size: 9px; }
.dayrow > b { color: #697995; font-size: 10px; font-weight: 600; text-align: right; }
.daytrack { height: 12px; display: flex; overflow: hidden; border-radius: 4px; background: #f2f5fb; }
.daytrack i { height: 100%; background: var(--accent); }
.daytrack i.original { background: #77baa4; }
.daytrack i.other { background: #d9c6a7; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #99a3b8; font-size: 9px; }
.legend i { width: 6px; height: 6px; border-radius: 2px; background: var(--accent); margin-left: 9px; }
.legend i.original { background: #77baa4; }
.legend i.other { background: #d9c6a7; }
.chart-axis { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 9px; padding-bottom: 8px; border-bottom: 1px solid #edf0f7; color: #a2abbd; font-size: 8px; font-weight: 550; letter-spacing: .5px; }
.chart-axis > span:last-child { text-align: right; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 17px; padding-top: 21px; border-top: 1px solid #edf0f7; color: #8c99b0; font-size: 10px; }
.pagination .btn { min-height: 33px; padding: 8px 12px; font-size: 10px; }
.reportnote { margin: 0 0 25px; padding: 0 3px; color: #98a3b7; font-size: 10px; line-height: 1.9; }
/* Dialogs */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: #101a2c8a; backdrop-filter: blur(4px); }
.modal { position: relative; width: min(530px,100%); max-height: min(90svh,850px); overflow-y: auto; padding: 33px; border: 1px solid #e0e5f2; border-radius: 17px; background: white; box-shadow: 0 24px 90px #0b152a33; scrollbar-width: thin; }
.modal h2 { padding-right: 22px; margin: 0 0 12px; font-size: 21px; letter-spacing: -.7px; }
.modal .muted { font-size: 12px; }
.modal .field { margin: 21px 0; }
.modal .error { font-size: 11px; }
.x { display: grid; place-items: center; position: absolute; right: 18px; top: 18px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: #f5f7fc; color: #8d99b1; font-size: 21px; line-height: 1; }
.x:hover { color: #4e5e7b; background: #e9edf7; }
.toast { position: fixed; bottom: 25px; right: 25px; z-index: 60; max-width: min(480px,calc(100vw - 40px)); padding: 15px 20px; border: 1px solid #35425e; border-radius: 10px; background: #1b2944; color: #e4ebfc; font-size: 12px; box-shadow: 0 8px 30px #19284426; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
/* Responsive */
@media (min-width: 1800px) { .main { max-width: 1760px; } }
@media (max-width: 1380px) {
  .sidebar { width: 230px; padding-right: 14px; padding-left: 14px; }
  .main { margin-left: 230px; padding: 0 30px; }
  .cards { gap: 12px; }
  .card { padding: 18px; }
  .card small { font-size: 10px; }
  .metric-icon { width: 27px; height: 27px; }
  .sitegrid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pagehead { gap: 20px; }
  #reports > .pagehead { flex-wrap: wrap; align-items: flex-start; }
  .setup-guide ol { gap: 12px; }
  .setup-guide li { gap: 9px; }
}
@media (max-width: 1180px) {
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
  .card small { font-size: 11px; }
  .columns { grid-template-columns: 1fr; gap: 0; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters .btn { justify-self: start; }
  .setup-guide ol { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 23px; }
  .setup-intro { display: block; }
  .setup-intro .eyebrow { margin-bottom: 8px; }
  .timezone { display: none; }
  .auth-story h2 { font-size: 48px; }
  .auth-story { padding: 40px 40px 28px; }
  .auth-flow { gap: 0; }
  .flow-connector { flex-basis: 18px; width: 18px; }
  .flow-node > span { font-size: 9px; }
}
@media (max-width: 960px) {
  .sidebar { width: 210px; padding: 26px 12px 18px; }
  .main { margin-left: 210px; padding: 0 24px; }
  .sidebar > .brand { gap: 8px; padding: 0 5px 29px; }
  .sidebar > .brand .brand-name { font-size: 19px; gap: 5px; }
  .sidebar .brand-mark { width: 29px; height: 29px; }
  .sidebar .brand-cms { font-size: 7px; padding: 3px; }
  .nav { padding-left: 10px; gap: 8px; font-size: 11px; }
  .sitegrid { grid-template-columns: 1fr; }
  .pagehead { align-items: flex-start; }
  .pagehead h1 { font-size: 27px; }
  .pagehead .muted { font-size: 12px; }
  .panel { padding: 22px; }
  .routingrule { grid-template-columns: minmax(100px,1fr) 44px 75px; gap: 12px; }
  .routingrule > .tag { display: none; }
  .auth-story { padding-right: 30px; padding-left: 30px; }
  .auth-story h2 { font-size: 42px; }
  .auth-story-content > p:not(.eyebrow) { font-size: 13px; }
  .auth-story-footer { font-size: 7px; gap: 7px; }
  .auth-form-side { padding: 36px; }
  .authbox h1 { font-size: 26px; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; background: var(--white); }
  .auth-story { display: none; }
  .auth-form-side { padding: 40px 24px; min-height: 100svh; }
  .authbox h1 { font-size: 28px; }
  .sidebar { position: relative; inset: auto; width: 100%; padding: 20px 20px 0; overflow: visible; }
  .sidebar > .brand { padding: 0 0 22px; }
  .sidebar > .brand .brand-name { font-size: 21px; }
  .sidebar .brand-cms { font-size: 8px; }
  .sidebar .brand-mark { width: 30px; height: 30px; }
  .workspace-switch { width: 100%; margin: 0 0 18px; padding: 10px 11px; font-size: 11px; }
  .nav-label { display: none; }
  .sidebar nav { display: flex; gap: 3px; width: 100%; overflow-x: auto; padding-bottom: 13px; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .nav { width: auto; min-height: 38px; padding: 9px 11px; gap: 7px; font-size: 10px; flex: 0 0 auto; }
  .nav.active:after { display: none; }
  .nav .icon { width: 15px; height: 15px; }
  .sidebar-bottom { display: flex; position: absolute; top: 24px; right: 20px; align-items: center; gap: 12px; margin-top: 0; padding: 0; border: 0; }
  .sidebar-identity .account-avatar, .sidebar-identity small { display: none; }
  .sidebar-identity #emailLabel { font-size: 9px; color: #8191ae; max-width: 130px; }
  .logout { gap: 5px; padding: 5px 7px; margin: 0; font-size: 9px; border: 1px solid #33405b; border-radius: 5px; }
  .logout .icon { width: 12px; height: 12px; }
  .main { margin: 0; padding: 0 20px; }
  .topbar { min-height: 65px; margin-bottom: 26px; }
  .topbar-actions { gap: 10px; }
  .breadcrumb { gap: 8px; font-size: 10px; }
  .breadcrumb-product { font-size: 9px; }
  .refresh-btn { min-height: 40px; min-width: 92px; padding: 9px 12px; font-size: 11px; }
  .page { min-height: calc(100svh - 360px); }
  .pagehead { gap: 16px; margin-bottom: 24px; }
  .pagehead h1 { font-size: 27px; }
  .pagehead > .btn { margin-top: 27px; }
  .pagehead .eyebrow { margin-bottom: 10px; font-size: 8px; }
  .pagehead .muted { font-size: 11px; }
  .cards { gap: 12px; margin-bottom: 22px; }
  .card { padding: 17px; }
  .card strong { font-size: 30px; }
  .card small { font-size: 10px; }
  .card em { font-size: 9px; }
  .panel { padding: 20px; margin-bottom: 20px; }
  .panelhead h2 { font-size: 14px; }
  .panelhead .small { font-size: 10px; }
  .sitegrid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
  .sitecard { margin-bottom: 0; }
  .sitecard .panelhead { align-items: flex-start; gap: 7px; }
  .sitecard .panelhead .tag { font-size: 8px; padding: 4px 6px; }
  .sitecard .panelhead .favicon { width: 31px; height: 31px; font-size: 14px; }
  .sitecard h2 { font-size: 17px; }
  .sitecard .btn.full { white-space: normal; font-size: 9px; }
  .sitecard .sitefacts { padding: 18px 0; }
  .tabs { gap: 25px; margin-bottom: 22px; }
  .tab { font-size: 11px; padding-bottom: 14px; }
  .line { gap: 14px; }
  .line.site { padding-left: 42px; }
  .line small { font-size: 10px; }
  .tag { font-size: 9px; }
  .line .tag { font-size: 8px; }
  .actions .btn { min-height: 37px; font-size: 11px; }
  .report-caption { display: grid; gap: 6px; }
  .report-caption b { font-size: 11px; }
  .main-footer { margin-top: 30px; font-size: 9px; }
}
@media (max-width: 480px) {
  .main { padding: 0 15px; }
  .sidebar { padding: 20px 15px 0; }
  .sidebar-bottom { right: 15px; }
  .sidebar-identity { display: none; }
  .sidebar > .brand .brand-name { font-size: 21px; }
  .workspace-switch { margin-bottom: 16px; }
  .sidebar nav { padding-bottom: 12px; }
  .nav { padding: 8px 9px; font-size: 9px; gap: 6px; }
  .nav .icon { width: 14px; height: 14px; }
  .topbar { margin-bottom: 23px; }
  .pagehead { flex-wrap: wrap; gap: 17px; }
  .pagehead h1 { font-size: 26px; }
  .pagehead > .btn { margin-top: 0; min-height: 36px; padding: 9px 12px; font-size: 11px; }
  .eyebrow { font-size: 8px; }
  .cards { gap: 10px; }
  .card { padding: 15px 14px; border-radius: 11px; }
  .card strong { margin-top: 13px; font-size: 28px; }
  .card small { font-size: 9px; }
  .metric-icon { width: 24px; height: 24px; border-radius: 6px; }
  .metric-icon .icon { width: 14px; height: 14px; }
  .card em { font-size: 8px; }
  .panel { padding: 18px 16px; border-radius: 12px; }
  .panelhead { gap: 12px; margin-bottom: 17px; }
  .panelhead .btn { min-height: 35px; font-size: 10px; padding: 8px 10px; gap: 5px; }
  .panelhead .btn .icon { width: 13px; height: 13px; }
  .panelhead select { max-width: 152px; font-size: 10px; }
  .connected-sites { padding-top: 19px; padding-bottom: 3px; }
  .connected-sites .panelhead .small { max-width: 200px; font-size: 9px; }
  .connected-sites .panelhead .textbtn { flex: 0 0 auto; font-size: 10px; }
  .line { gap: 10px; }
  .site.line { flex-wrap: wrap; gap: 7px 12px; padding-left: 39px; }
  .site.line > div:first-child { flex-basis: calc(100% - 110px); }
  .site.line .textbtn { margin-left: auto; }
  .site.line b { font-size: 12px; }
  .line small { font-size: 9px; }
  .site.line:before { top: 23px; width: 28px; height: 28px; }
  .site.line:after { top: 31px; left: 8px; width: 10px; height: 10px; }
  .sitegrid { grid-template-columns: 1fr; }
  .sitecard { padding: 21px; }
  .sitecard .panelhead .favicon { width: 36px; height: 36px; font-size: 16px; }
  .sitecard .panelhead .tag { font-size: 9px; }
  .sitecard .btn.full { font-size: 10px; }
  .setup-intro h2 { font-size: 12px; }
  .setup-guide li b { font-size: 10px; }
  .setup-guide li p { font-size: 9px; }
  .setup-guide li { gap: 9px; }
  .setup-guide li > span { width: 24px; height: 24px; font-size: 8px; }
  .setup-guide ol { gap: 22px 14px; }
  .tabs { gap: 21px; }
  .tab { font-size: 10px; }
  .routingrule { gap: 8px; grid-template-columns: minmax(100px,1fr) 44px 66px; padding: 19px 0; }
  .rule b { font-size: 11px; }
  .rule small { font-size: 10px; }
  .rule .btn { font-size: 9px; padding: 7px 8px; }
  .destination { flex-wrap: wrap; }
  .destination > div:first-child { flex-basis: 100%; }
  .destination > .btn { margin-left: auto; min-height: 34px; font-size: 10px; }
  .destination a { font-size: 11px; }
  .detail-head { flex-wrap: nowrap; align-items: flex-end; }
  .detail-head h1 { font-size: 24px; }
  .detail-head .tag { font-size: 8px; padding: 5px 6px; }
  .detail-head .muted { font-size: 10px; }
  .callout { font-size: 11px; padding: 13px; }
  .callout.small { font-size: 10px; }
  .snippet { padding: 15px; font-size: 10px; border-radius: 8px; }
  .keybox { font-size: 10px; padding: 13px; }
  .rowbuttons { gap: 7px; }
  .rowbuttons .btn { min-height: 37px; font-size: 10px; padding: 9px 10px; }
  .connection-details { font-size: 10px; }
  .filters { gap: 14px 11px; padding: 17px 15px; }
  .filters label { font-size: 9px; }
  .filters input, .filters select { min-height: 38px; padding: 9px 7px; font-size: 10px; }
  .filters .btn { grid-column: 1 / -1; width: 100%; min-height: 38px; font-size: 11px; }
  .actions { gap: 7px; }
  .actions .btn { font-size: 10px; padding: 9px 11px; gap: 5px; }
  .actions .btn .icon { width: 13px; height: 13px; }
  .reportchips { gap: 12px 18px; font-size: 9px; }
  .reportchips b { font-size: 10px; }
  .reportcards .card { padding: 16px 14px; }
  .reportcards .card strong { font-size: 27px; }
  .reportcards .card small { min-height: 27px; }
  .report-caption small { font-size: 8px; line-height: 1.9; }
  .dayrow { grid-template-columns: 66px 1fr 37px; gap: 9px; }
  .dayrow > span { font-size: 8px; }
  .dayrow > b { font-size: 9px; }
  .legend { gap: 4px; font-size: 7px; }
  .legend i { margin-left: 4px; width: 5px; height: 5px; }
  .pagination { justify-content: space-between; gap: 10px; font-size: 9px; }
  .pagination .btn { font-size: 9px; padding: 7px 9px; }
  .customer { flex-wrap: wrap; }
  .customer > div:first-child { flex-basis: 75%; }
  .customer .btn { margin-left: auto; font-size: 10px; min-height: 35px; }
  .overlay { padding: 16px; }
  .modal { padding: 27px 22px; border-radius: 14px; }
  .modal h2 { font-size: 20px; }
  .modal .field input, .modal .field select, .authbox .field input { font-size: 16px; }
  .modal .muted { font-size: 11px; }
  .toast { right: 15px; bottom: 15px; padding: 13px 16px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; }
}
@media print {
  @page { margin: 14mm; }
  body { background: white; color: black; font-size: 10px; }
  .sidebar, .topbar, .filters, .actions, .pagehead button, .toast, .overlay, #reports > .panel, #geoNotice, .main-footer { display: none !important; }
  .main { margin: 0; padding: 0; max-width: none; }
  .page { min-height: 0; }
  .page:not(.active) { display: none !important; }
  .panel, .card { box-shadow: none; border-color: #d8dce6; break-inside: avoid; }
  .panel { padding: 15px; margin-bottom: 15px; }
  .cards { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 15px; }
  .card { padding: 13px; }
  .card strong { font-size: 24px; }
  .card small { font-size: 8px; }
  .columns { grid-template-columns: 1fr 1fr; gap: 15px; }
  .countrytable, .sources, .daychart { max-height: none; overflow: visible; }
  .countrytable table { min-width: 0; }
  table { min-width: 0; }
  th, .countrytable th { font-size: 7px; padding: 8px 5px; }
  td, .countrytable td { font-size: 8px; padding: 9px 5px; }
  .country-code { font-size: 6px; min-width: 19px; margin-right: 3px; }
  .report-caption { display: grid; margin-top: 15px; }
  .reportnote { font-size: 8px; }
  .pagehead { margin-bottom: 15px; }
  .pagehead h1 { font-size: 25px; }
  .reportchips { margin-bottom: 15px; }
  .daytrack, .daytrack i, .legend i { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .dayrow { grid-template-columns: 65px 1fr 30px; gap: 10px; padding: 6px 0; }
  .legend { font-size: 7px; }
  .report-target-url { font-size: 8px; }
}
/* Site actions */
.site-card-badges { display: grid; justify-items: end; gap: 5px; }
.site-card-badges .tag { padding: 4px 7px; font-size: 9px; }
.site-card-actions { display: flex; gap: 9px; padding-top: 12px; }
.site-card-actions > .btn { flex: 1; min-height: 37px; padding: 8px 10px; font-size: 11px; }
.site-card-actions > .danger { flex: 0 0 auto; min-width: 55px; color: #ac6673; border-color: #eadbe0; background: #fff; }
.site-state-hint { margin: -4px 0 18px; color: #9b8b6f; font-size: 10px; line-height: 1.8; }
.site-row-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.site-row-controls { display: flex; align-items: center; gap: 17px; flex: 0 0 auto; }
.site.line .site-row-controls .textbtn { min-height: 36px; margin: 0; font-size: 10px; }
.site-delete-link { color: #b7848d; }
.site-delete-link:hover { color: #b4495b; }
.detail-site-actions { display: grid; justify-items: end; gap: 12px; flex: 0 0 auto; }
.site-detail-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.site-detail-lifecycle { display: flex; gap: 7px; }
.site-detail-lifecycle .btn { min-height: 34px; padding: 8px 11px; font-size: 10px; }
.site-detail-lifecycle .danger { color: #ac6673; border-color: #eadbe0; }
.delete-confirmation { margin-top: 20px; font-size: 11px; }
@media(max-width:1180px) {
  .lifecycle-site-row { flex-wrap: wrap; gap: 12px; }
  .lifecycle-site-row > div:first-child { flex-basis: calc(100% - 190px); }
  .site-row-controls { width: 100%; justify-content: flex-end; gap: 20px; padding-top: 2px; }
  .site-row-badges { max-width: 178px; }
}
@media(max-width:760px) {
  .site-card-actions { gap: 7px; }
  .site-card-actions > .btn { font-size: 10px; }
  .site-card-actions > .danger { min-width: 45px; }
  .detail-site-actions { max-width: 220px; gap: 10px; }
}
@media(max-width:480px) {
  .site-card-actions > .btn { min-height: 39px; font-size: 10px; }
  .site.line.lifecycle-site-row > div:first-child { flex-basis: calc(100% - 118px); }
  .site-row-badges { max-width: 106px; gap: 4px; }
  .site-row-badges .tag { font-size: 7px; padding: 4px 6px; }
  .site.line .site-row-controls { gap: 18px; }
  .site.line .site-row-controls .textbtn { font-size: 9px; min-height: 36px; }
  .detail-site-actions { max-width: 125px; gap: 9px; }
  .site-detail-badges { gap: 4px; }
  .site-detail-badges .tag { font-size: 7px; padding: 4px 6px; }
  .site-detail-lifecycle { gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
  .site-detail-lifecycle .btn { min-height: 35px; padding: 8px; font-size: 9px; }
}
@media print {
  .site-card-actions, .site-row-controls, .site-detail-lifecycle { display: none !important; }
}

/* Source, destination, and simple setup */
.site-field-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .65px; text-transform: uppercase; }
.sitecard h2 { overflow-wrap: anywhere; }
.site-display-name { margin: 6px 0; color: #596982; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.site-notes { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.site-targets { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.site-target { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 12px; color: var(--ink); }
.site-target > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.site-target .tag { flex: 0 0 auto; font-size: 8px; padding: 2px 6px; }
.site.line .site-targets { margin-top: 12px; padding-top: 12px; }
.site.line .site-target { max-width: 470px; font-size: 11px; }
.optional-site-details { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.optional-site-details summary { color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 550; }
.optional-site-details[open] summary { color: var(--ink); }
.step-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 0; padding: 22px 0 8px; border-top: 1px solid var(--line); }
.step-navigation > .btn:last-child { margin-left: auto; flex: 0 0 auto; }
.step-navigation-hint { display: grid; gap: 5px; margin-right: auto; }
.step-navigation-hint > span { color: var(--muted); font-size: 8px; letter-spacing: .8px; font-weight: 650; }
.step-navigation-hint > b { color: var(--ink); font-size: 11px; font-weight: 550; }
.step-navigation .btn { min-height: 42px; }
.bot-groups { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 20px; }
.bot-group { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 12px; cursor: pointer; }
.bot-group input { width: 16px; height: 16px; margin: 0; accent-color: #6173de; }
.bot-signatures-notice { margin: 12px 0 20px; }
.inlineform.routing-preview { display: grid; grid-template-columns: 90px minmax(130px,1fr) minmax(160px,1.7fr) auto; gap: 14px; align-items: end; }
.routing-preview label { display: grid; gap: 7px; min-width: 0; }
.routing-preview input, .routing-preview select { width: 100%; margin: 0; min-height: 41px; text-transform: none; }
.setup-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0; margin: 0 0 26px; list-style: none; }
.tabs.setup-tabs { display: none; }
.setup-steps li { min-width: 0; }
.setup-step { display: flex; align-items: center; width: 100%; min-height: 82px; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--muted); text-align: left; }
.setup-step .step-number { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; }
.setup-step b { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.setup-step small { display: block; margin-top: 3px; font-size: 10px; line-height: 1.6; }
.setup-step.active { background: var(--pale); border-color: #bfc9f2; }
.setup-step.active .step-number { background: var(--accent); border-color: var(--accent); color: #fff; }
.setup-step.is-complete .step-number { background: var(--success-bg); border-color: #b7daca; color: var(--success); }
.report-presets { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.report-presets button { min-height: 38px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--muted); font-size: 12px; font-weight: 550; }
.report-presets button:hover { color: var(--accent); border-color: #b8c3ef; }
.report-presets button.active { color: var(--accent); border-color: #c7cff5; background: var(--pale); }

/* Theme switch */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--muted); font-size: 11px; font-weight: 600; }
.theme-toggle:hover { color: var(--ink); border-color: #aeb9d4; }
.auth-theme-toggle { position: absolute; z-index: 2; right: 26px; top: 26px; }
.theme-toggle-icons { position: relative; display: block; width: 17px; height: 17px; }
.theme-toggle-icons .icon { position: absolute; inset: 0; width: 17px; height: 17px; transition: opacity .3s ease, transform .3s ease; }
.theme-sun { opacity: 0; transform: rotate(-100deg) scale(.6); }
.theme-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-moon { opacity: 0; transform: rotate(100deg) scale(.6); }
.theme-changing *, .theme-changing *::before, .theme-changing *::after { transition: background-color .32s ease, border-color .32s ease, color .32s ease, box-shadow .32s ease; }
.page.active, .tabpane.active { animation: panel-enter .22s ease both; }
.overlay:not(.hidden) .modal { animation: panel-enter .2s ease both; }
@keyframes panel-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Dark palette */
:root[data-theme="dark"] { color-scheme: dark; --bg: #0d1422; --white: #151f30; --ink: #e5ecf7; --muted: #a0adc3; --line: #2a374c; --pale: #243254; --nav: #090f1c; --accent: #a3b2ff; --success: #7cdab6; --success-bg: #18382f; --amber: #e5be7c; --danger: #f3a0ad; --shadow: 0 8px 28px #00000017; }
[data-theme="dark"] .card, [data-theme="dark"] .panel, [data-theme="dark"] .filters, [data-theme="dark"] .modal { background: var(--white); border-color: var(--line); }
[data-theme="dark"] .auth-form-side { background: var(--white); }
[data-theme="dark"] .auth-story { background: #090f1c; }
[data-theme="dark"] .btn:not(.primary), [data-theme="dark"] .sitecard .btn.full { background: #1b283e; border-color: #35445d; color: #c5d0e4; }
[data-theme="dark"] .btn:not(.primary):hover { background: #24344e; border-color: #596c8d; color: #e4ebf8; }
[data-theme="dark"] .btn.primary { background: #586cde; border-color: #687be7; color: #fff; }
[data-theme="dark"] .btn.primary:hover { background: #6679e7; }
[data-theme="dark"] .refresh-btn { background: #26365d; border-color: #354a78; color: #bdcaff; }
[data-theme="dark"] .refresh-btn:hover { background: #30436f; border-color: #5b70a2; }
[data-theme="dark"] .field input, [data-theme="dark"] .field textarea, [data-theme="dark"] select, [data-theme="dark"] .filters input, [data-theme="dark"] .inlineform input { background: #101a2b; border-color: #36465f; color: var(--ink); }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #7889a5; }
[data-theme="dark"] .field label, [data-theme="dark"] .line b, [data-theme="dark"] .rule b, [data-theme="dark"] .sitefacts b, [data-theme="dark"] .reportchips b, [data-theme="dark"] .source b, [data-theme="dark"] .countrytable td:first-child, [data-theme="dark"] .setup-guide li b, [data-theme="dark"] .report-caption, [data-theme="dark"] .site-display-name { color: #d3ddee; }
[data-theme="dark"] .check, [data-theme="dark"] .breadcrumb, [data-theme="dark"] .inlineform label, [data-theme="dark"] .filters label, [data-theme="dark"] .filters select, [data-theme="dark"] td { color: #b3c1d9; }
[data-theme="dark"] .tag { background: #202d43; border-color: #35465f; color: #b6c6df; }
[data-theme="dark"] .tag.good { background: var(--success-bg); border-color: #2b5748; color: var(--success); }
[data-theme="dark"] .tag.pending { background: #3a3020; border-color: #57452c; color: var(--amber); }
[data-theme="dark"] .tag.bad { background: #3c2631; border-color: #66404e; color: var(--danger); }
[data-theme="dark"] .callout, [data-theme="dark"] .keybox { background: #1b2b45; border-color: #334a6e; color: #becded; }
[data-theme="dark"] .period-label, [data-theme="dark"] code, [data-theme="dark"] .country-code { background: #23324c; border-color: #364967; color: #c2cfff; }
[data-theme="dark"] .favicon { background: var(--pale); border-color: #3b4e7b; color: #bac8ff; }
[data-theme="dark"] .metric-icon { background: #23324b; color: #b6c5e1; }
[data-theme="dark"] .metric-redirect .metric-icon { background: var(--pale); color: var(--accent); }
[data-theme="dark"] .metric-original .metric-icon { background: var(--success-bg); color: var(--success); }
[data-theme="dark"] .metric-pending .metric-icon { background: #3a3020; color: var(--amber); }
[data-theme="dark"] th { background: #1c293d; border-color: var(--line); color: #a2b3ce; }
[data-theme="dark"] td, [data-theme="dark"] .tabs { border-color: var(--line); }
[data-theme="dark"] tbody tr:hover { background: #1e2d44; }
[data-theme="dark"] .source, [data-theme="dark"] .main-footer { border-color: var(--line); }
[data-theme="dark"] .daytrack { background: #23324b; }
[data-theme="dark"] .x { background: #22314a; color: #b9c8df; }
[data-theme="dark"] .x:hover { background: #30425f; color: #fff; }
[data-theme="dark"] .site.line:before { background: #1c2a40; border-color: #354764; }
[data-theme="dark"] #siteCards > .empty { background: #151f3080; }
[data-theme="dark"] .setup-step.active { border-color: #526591; }
[data-theme="dark"] .setup-step.active .step-number { background: #6579de; border-color: #6579de; }
[data-theme="dark"] .setup-step.is-complete .step-number { border-color: #30624f; }
[data-theme="dark"] .report-presets button.active { border-color: #526591; }
[data-theme="dark"] .site-card-actions > .danger, [data-theme="dark"] .site-detail-lifecycle .danger { color: var(--danger); }
[data-theme="dark"] .overlay { background: #050a14a8; }
@media(max-width:960px) {
  .topbar-actions { gap: 8px; }
  .topbar .timezone { display: none; }
  .setup-step { min-height: 86px; padding: 12px; gap: 9px; }
}
@media(max-width:760px) {
  .detail-head { flex-wrap: wrap; align-items: flex-start; }
  .detail-head > div:first-child { flex: 1 1 100%; width: 100%; min-width: 0; }
  .detail-site-actions { display: flex; flex: 1 1 100%; width: 100%; max-width: none; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px; }
  .detail-site-actions > .btn { max-width: 100%; white-space: normal; }
  .site-detail-badges { justify-content: flex-start; max-width: 100%; }
  .site-detail-lifecycle { margin-left: auto; max-width: 100%; }
  .step-navigation { flex-wrap: wrap; gap: 12px; }
  .step-navigation-hint { flex-basis: 100%; order: -1; }
  .inlineform.routing-preview { grid-template-columns: 90px minmax(0,1fr); }
  .routing-preview .preview-agent-field { grid-column: 1 / -1; }
  .routing-preview > .btn { grid-column: 1 / -1; justify-self: end; }
  .setup-steps { gap: 8px; }
  .setup-step { padding: 10px; gap: 8px; align-items: flex-start; }
  .setup-step .step-number { width: 23px; height: 23px; font-size: 10px; }
  .setup-step b { font-size: 10px; }
  .setup-step small { font-size: 9px; }
  .theme-toggle { padding: 9px 10px; }
}
@media(max-width:480px) {
  .step-navigation .btn { padding: 10px 12px; font-size: 11px; }
  .step-navigation-hint > b { line-height: 1.6; }
  .bot-groups { gap: 7px; }
  .bot-group { flex: 1; justify-content: center; padding: 11px 8px; font-size: 11px; }
  .topbar { gap: 8px; }
  .topbar .breadcrumb-product, .topbar .breadcrumb-divider { display: none; }
  .theme-toggle { min-width: 40px; padding: 9px; }
  .topbar .theme-toggle [data-theme-label] { display: none; }
  .auth-theme-toggle { top: 18px; right: 18px; }
  .report-presets { gap: 5px; }
  .report-presets button { flex: 1 1 auto; padding: 8px 10px; font-size: 11px; }
  .setup-steps { grid-template-columns: 1fr; gap: 7px; }
  .setup-step { min-height: 64px; align-items: center; }
  .setup-step b { font-size: 12px; }
  .setup-step small { font-size: 10px; }
  .field textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .theme-changing *, .theme-changing *::before, .theme-changing *::after, .theme-toggle-icons .icon { transition: none; }
  .page.active, .tabpane.active, .overlay:not(.hidden) .modal { animation: none; }
}
@media print {
  .report-presets, .theme-toggle, .step-navigation { display: none !important; }
  :root[data-theme="dark"] { color-scheme: light; --bg: #fff; --white: #fff; --ink: #182238; --muted: #707b90; --line: #d8dce6; --pale: #eef0ff; --accent: #5263db; --success: #167b62; --success-bg: #eaf6ef; }
  [data-theme="dark"] .card, [data-theme="dark"] .panel { background: #fff; }
  [data-theme="dark"] td, [data-theme="dark"] th, [data-theme="dark"] .report-caption, [data-theme="dark"] .reportchips b, [data-theme="dark"] .countrytable td:first-child, [data-theme="dark"] .source b { color: #35425c; background: #fff; }
}
