/* Apex intelligence: readable business data, with a quiet navigation frame. */
:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --sidebar: #171c2b;
  --panel: #ffffff;
  --panel2: #f2f3f8;
  --border: #e4e7ef;
  --text: #202637;
  --muted: #687086;
  --accent: #6554d9;
  --green: #187954;
  --amber: #946017;
  --red: #b7434a;
  --radius: 14px;
  font-size: 14px;
}
body { -webkit-font-smoothing: antialiased; }
h1 { font-size: 32px; font-weight: 650; letter-spacing: -1.15px; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.35px; }
h3 { font-size: 14px; }
small, .tiny { font-size: 12px; }
button, a { transition: background .15s, border-color .15s, color .15s; }
button:focus-visible, a:focus-visible, summary:focus-visible, tr:focus-visible { outline: 3px solid #897bed; outline-offset: 3px; }
input, select, textarea { background: #fff; border-color: #dce0ea; border-radius: 8px; font-size: 14px; padding: 11px 12px; color: var(--text); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #6554d919; }
input::placeholder, textarea::placeholder { color: #778094; }
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0 6px 0 0; accent-color: var(--accent); }
input[readonly] { background: #f7f8fc; }
label { color: #535c73; font-size: 13px; font-weight: 550; margin-bottom: 7px; }
.shell { grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { width: 244px; padding: 31px 18px 23px; border: 0; color: #e9ecf6; overflow-y: auto; }
.sidebar .logo { padding: 0 12px; font-size: 29px; letter-spacing: -1.3px; }
.logo svg { fill: var(--accent); }
.sidebar .logo svg { fill: #9d90ff; }
.logo small { color: #727a91; font-size: 10px; letter-spacing: 1.25px; }
.sidebar .logo small { color: #a1a9c1; }
.agency-switch, .workspace-context { margin: 31px 0 25px; padding: 13px 11px; background: #212739; border: 1px solid #32394e; border-radius: 10px; display: flex; align-items: center; gap: 10px; }
.agency-avatar { width: 35px; height: 35px; background: #393451; color: #c8beff; font-size: 12px; }
.agency-switch strong, .workspace-context strong { color: #e9ecf6; font-size: 13px; display: block; font-weight: 600; }
.workspace-context small { display: block; color: #abb3c7; }
.sidebar .muted { color: #a1a9bf; }
.nav-group + .nav-group { margin-top: 28px; }
.nav-label { color: #9ba4bc; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; margin: 0 0 12px; padding: 0 13px; }
.nav { gap: 5px; }
.nav button { color: #b4bdd2; font-size: 13px; padding: 12px 13px; gap: 12px; border-radius: 8px; min-height: 44px; }
.nav button:hover { background: #242c41; color: #fff; }
.nav button.active { color: #fff; background: #6554d9; box-shadow: 0 4px 14px #07091726; }
.nav button .count { background: #4b3541; color: #ffdaa3; font-size: 12px; }
.nav button.active .count { color: #fff; background: #ffffff26; }
.sidebar-bottom { padding-top: 30px; }
.build-note { background: #202739; border-color: #333b50; color: #a9b3ca; font-size: 12px; padding: 14px; margin: 20px 0; line-height: 1.65; }
.build-note strong { color: #e0e5f3; font-size: 13px; }
.profile { padding: 0 8px; font-size: 13px; }
.profile .avatar { background: #39334f; color: #d2c8ff; }
.profile button { color: #b6bfd3; }
.topbar { min-height: 76px; padding: 16px 36px; background: #ffffffed; border-color: var(--border); gap: 20px; }
.breadcrumb { color: var(--muted); font-size: 13px; }
.breadcrumb span { color: #b3b9c8; }
.breadcrumb strong { color: #424b63; font-weight: 550; }
.search-wrap { width: min(300px, 30vw); }
.search-wrap input { background: #f7f8fb; border-color: #e9ebf2; padding: 10px 46px 10px 36px; font-size: 13px; }
.search-wrap .icon { top: 12px; }
.search-wrap kbd { top: 10px; font-size: 11px; color: #7d8599; border-color: #dfe3eb; background: #fff; }
.avatar { color: #6453bf; background: #ece8fc; font-size: 12px; }
.content { max-width: 1690px; padding: 32px 36px 48px; }
.sample-banner { border-color: #e2ddf5; background: #f0edfb; color: #63588c; font-size: 12px; padding: 10px 13px; margin-bottom: 26px; }
.sample-banner button { color: #5945b8; font-size: 12px; font-weight: 550; }
.page-heading { margin-bottom: 27px; align-items: flex-start; }
.page-heading p { color: #6b7286; font-size: 14px; line-height: 1.6; max-width: 690px; margin-top: 9px; }
.eyebrow, .section-kicker { color: #7664c5; font-size: 11px; letter-spacing: 1.6px; font-weight: 650; margin-bottom: 9px; }
.page-heading > .actions { padding-top: 23px; flex-shrink: 0; }
.btn { font-size: 13px; font-weight: 550; border-color: #dfe3ec; min-height: 40px; border-radius: 8px; padding: 9px 14px; background: #fff; }
.btn:hover { background: #f1effb; border-color: #c4bbee; }
.btn.primary { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 600; box-shadow: 0 2px 4px #6554d918; }
.btn.primary:hover { background: #5543c7; border-color: #5543c7; }
.btn.ghost { color: #606883; }
.btn.danger { color: var(--red); }
.btn .icon { width: 16px; height: 16px; }
.icon-button { width: 36px; height: 36px; }
.icon-button:hover { background: #eeebf9; color: #6554d9; }
.filters { margin-bottom: 24px; gap: 16px; }
.filters-left { flex-wrap: wrap; }
.compact-select { min-height: 39px; height: auto; font-size: 13px; padding: 8px 30px 8px 12px; min-width: 160px; }
.status-label { font-size: 12px; }
.status-dot { width: 7px; height: 7px; }
.status-dot.off { background: #8a93a8; }
.stats { gap: 18px; margin-bottom: 24px; }
.stat { padding: 21px 22px 18px; border-color: var(--border); box-shadow: 0 2px 3px #25325c03; }
.stat-title { color: #677087; font-size: 13px; font-weight: 550; }
.stat-title .icon { width: 18px; height: 18px; color: #9585db; }
.stat-value { font-size: 34px; font-weight: 650; letter-spacing: -1.2px; margin: 13px 0 12px; font-variant-numeric: tabular-nums; }
.stat-value.multi { font-size: 24px; min-height: 44px; line-height: 1.45; }
.stat-foot { font-size: 12px; gap: 7px; flex-wrap: wrap; line-height: 1.5; }
.stat-foot .pill { font-size: 12px; padding: 2px 6px; }
.stat.emphasis { background: #f0edfc; border-color: #ded7f8; }
.stat.emphasis .stat-value { color: #5843c5; }
.stat-trend { font-size: 12px; display: inline-flex; gap: 5px; align-items: center; }
.panel { border-color: var(--border); box-shadow: 0 2px 4px #25325c03; overflow: clip; }
.panel-head { padding: 22px 23px 19px; align-items: flex-start; }
.panel-head h2 { font-size: 16px; line-height: 1.4; }
.panel-head p { font-size: 12px; line-height: 1.6; margin-top: 5px; }
.panel-head > .icon { color: #9481cf; }
.panel-body { padding: 0 23px 23px; }
.panel-footer { font-size: 12px; padding: 14px 23px; background: #fbfcfe; line-height: 1.5; }
.grid-main, .insight-grid, .dashboard-bottom { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 22px; margin-bottom: 24px; align-items: stretch; }
.dashboard-bottom { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.signal-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; background: #fff; margin-bottom: 24px; padding: 18px 0; }
.signal-item { padding: 0 23px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 12px; text-align: left; }
.signal-item > .icon { color: #8b78c5; width: 20px; height: 20px; }
.signal-item strong { color: #414961; font-size: 13px; font-weight: 600; }
.signal-item > div { flex: 1; }
.signal-item + .signal-item { border-left: 1px solid var(--border); }
.signal-value { font-size: 21px; font-weight: 650; color: var(--text); display: block; letter-spacing: -.5px; margin-bottom: 3px; }
.legend { font-size: 12px; }
.legend i { width: 8px; height: 8px; }
.chart { height: 235px; }
.chart text { fill: #6e788e; font-size: 12px; }
.chart line { stroke: #e5e8f1; stroke-dasharray: 3 5; }
.chart .area { fill: #6554d913; }
.chart .line { stroke: #7a66de; stroke-width: 2.6; }
.chart circle { fill: #7a66de; stroke: #fff; }
.intelligence-chart { position: relative; }
.chart-total { font-size: 28px; font-weight: 650; letter-spacing: -.7px; color: var(--text); }
.chart-total small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; letter-spacing: 0; }
.chart-caption, .data-context { font-size: 12px; color: var(--muted); line-height: 1.65; }
.data-context { margin: 22px 0; padding: 17px 20px; border-left: 3px solid #d9d0f1; background: #efedf61f; }
.data-context h3 { margin-bottom: 7px; color: #555d74; font-size: 13px; }
.data-context p + p { margin-top: 7px; }
.chart-caption { margin: 6px 0 15px; }
.segment-control { display: inline-flex; gap: 3px; padding: 4px; border-radius: 8px; background: #f1f2f7; flex-shrink: 0; }
.segment-control button { padding: 6px 11px; color: #71788b; border-radius: 5px; font-size: 12px; min-height: 30px; }
.segment-control button.active { background: #fff; color: #6554d9; box-shadow: 0 1px 4px #26325d12; }
.source-row { margin: 17px 0 22px; }
.source-info { font-size: 13px; }
.source-info small { font-size: 12px; width: 38px; }
.source-icon { background: #f1eefb; border-color: #e7e1f8; color: #7964bf; font-size: 11px; width: 31px; height: 31px; flex-shrink: 0; }
.track, .health-meter, .stage-bar { background: #eceef5; height: 6px; overflow: hidden; border-radius: 5px; }
.track { margin-left: 41px; }
.track span, .health-meter span, .stage-bar span, .stage-bar i { display: block; height: 100%; background: #8c78dd; border-radius: inherit; }
.source-row:nth-child(2) .track span { background: #a093df; }
.source-row:nth-child(3) .track span { background: #82b3c6; }
.source-row:nth-child(4) .track span { background: #d3ad74; }
table { font-size: 13px; }
th { color: #737c90; background: #f8f9fc; font-size: 12px; font-weight: 550; padding: 13px 21px; }
td { padding: 16px 21px; border-bottom-color: #edf0f5; font-variant-numeric: tabular-nums; }
tr[data-lead]:hover { background: #f8f6fe; }
.person { gap: 11px; }
.person strong { color: #30394d; font-weight: 550; }
.person small { color: #768096; font-size: 12px; margin-top: 3px; }
.person .avatar { width: 34px; height: 34px; font-size: 11px; color: #7e6cbd; background: #eeeafa; }
.pill { background: #edf1f6; color: #5f6d7d; font-size: 12px; padding: 4px 8px; border-radius: 6px; font-weight: 500; }
.pill.new { background: #eaf1fc; color: #426caa; }
.pill.contacted { background: #f0eafa; color: #8561ad; }
.pill.qualified { background: #faf2de; color: #946c25; }
.pill.proposal { background: #fcf0e7; color: #a56b35; }
.pill.won { background: #e7f5ed; color: #257954; }
.pill.lost, .pill.warning { background: #fff1e4; color: #95621e; }
.pill.neutral { background: #f0f2f7; color: #687287; }
.attribution-table td, .attribution-table th { padding: 15px 20px; }
.attribution-table .source-info { margin: 0; }
.attribution-bar { min-width: 105px; display: flex; gap: 10px; align-items: center; }
.attribution-bar .track { margin: 0; width: 65px; }
.attribution-bar .track span { background: #8d7cdc; }
.health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.health-card { background: #fff; padding: 23px; border: 1px solid var(--border); border-radius: 13px; }
.health-card h3 { margin-bottom: 8px; }
.health-card p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.health-card strong { font-size: 25px; font-weight: 650; }
.health-meter { margin: 14px 0; }
.metric-ring { width: 112px; height: 112px; border-radius: 50%; background: conic-gradient(#8d79dd var(--coverage, 0%), #eceaf5 0); position: relative; display: grid; place-items: center; flex-shrink: 0; margin: 25px auto 22px; }
.metric-ring::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: #fff; }
.metric-ring > span { z-index: 1; font-size: 25px; font-weight: 650; letter-spacing: -.8px; }
.coverage-list { display: grid; gap: 0; }
.coverage-row { display: block; padding: 11px 0; border-bottom: 1px solid #eef0f5; font-size: 13px; }
.coverage-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.coverage-row .health-meter { margin: 9px 0 6px; }
.coverage-row:last-child { border-bottom: 0; }
.coverage-row strong { font-size: 13px; font-weight: 600; }
.coverage-row small { color: var(--muted); display: block; margin-top: 3px; }
.business-table .person strong { font-weight: 600; }
.stage-distribution { padding: 3px 0; }
.stage-row { display: grid; grid-template-columns: 93px minmax(0, 1fr) 37px 43px; gap: 14px; align-items: center; padding: 12px 0; font-size: 13px; width: 100%; text-align: left; border-radius: 7px; }
.stage-row:hover { background: #f7f5fc; }
.stage-row:has(> .icon) { grid-template-columns: 93px minmax(0, 1fr) 37px 43px 18px; }
.stage-row > strong, .stage-row > small { text-align: right; }
.stage-row > small { color: var(--muted); }
.stage-bar { height: 8px; }
.stage-row:nth-child(2) .stage-bar > * { background: #aa97e5; }
.stage-row:nth-child(3) .stage-bar > * { background: #dab665; }
.stage-row:nth-child(4) .stage-bar > * { background: #dfa46d; }
.stage-row:nth-child(5) .stage-bar > * { background: #67a58d; }
.stage-row:nth-child(6) .stage-bar > * { background: #bfc3d1; }
.page-link { display: inline-flex; align-items: center; gap: 7px; color: #6554d9; font-size: 12px; font-weight: 550; padding: 4px 0; white-space: nowrap; }
.page-link .icon { width: 15px; height: 15px; }
.source-row.page-link { display: block; width: 100%; text-align: left; color: #566076; margin: 14px 0 22px; padding: 0; white-space: normal; }
.source-row.page-link:last-child { margin-bottom: 9px; }
.source-row.page-link:hover .source-info { color: #6554d9; }
.source-row.page-link .source-info > span:nth-child(2) { flex: 1; min-width: 0; }
.overview-note { color: #788095; font-size: 12px; line-height: 1.7; margin: 18px 0 0; }
.workspace-card { padding: 24px; }
.workspace-card h2 { font-size: 17px; }
.workspace-card p, .product-list div { font-size: 13px; }
.workspace-numbers strong { font-size: 28px; font-weight: 600; }
.workspace-numbers span { font-size: 12px; }
.pipeline-column { background: #f0f2f7; }
.column-head, .column-head .num, .column-value { font-size: 12px; }
.lead-card { background: #fff; border-color: #dfe3ed; }
.lead-card:hover { border-color: #b4a6e3; }
.lead-card strong, .lead-card small { font-size: 12px; }
.lead-card .value { color: #635581; font-size: 13px; }
.integration-card h2, .section-heading h2 { font-size: 16px; }
.integration-card p { font-size: 13px; line-height: 1.65; }
.connection-main strong { font-size: 14px; font-weight: 600; }
.connection-main p { font-size: 12px; line-height: 1.65; }
.connection-row, .alert-row, .rule-row, .share-row { padding: 20px 23px; }
.connection-row > .actions { max-width: 54%; }
.alert-icon { color: #ab792b; background: #fcf0df; }
.resolved .alert-icon { background: #f0f2f6; color: #8992a5; }
.empty { padding: 45px 25px; }
.empty .icon { color: #a293d5; }
.empty h3 { font-size: 16px; color: #454f65; font-weight: 600; }
.empty p { font-size: 13px; max-width: 400px; line-height: 1.7; }
.toolbar { padding: 17px 22px; gap: 12px; }
.toolbar input, .toolbar select { font-size: 13px; padding: 10px 12px; }
.toolbar input { max-width: 370px; }
.info-box { background: #efedf9; border-color: #e0d9f3; color: #6b6087; font-size: 13px; margin: 16px 0; }
.info-box strong { color: #564672; }
.help-box { background: #f5f6fa; border-color: #e1e5ee; color: #6b7488; font-size: 13px; }
.help-box code { font-size: 12px; color: #7055b4; }
.error-banner { background: #fff0ed; border-color: #efcdc8; color: #aa4a43; font-size: 13px; }
.error-text { font-size: 13px; }
.settings-row { font-size: 13px; align-items: flex-start; }
.settings-row strong { text-align: right; font-weight: 550; overflow-wrap: anywhere; }
.settings-row span { flex-shrink: 0; max-width: 45%; }
.settings-grid { margin: 20px 0; }
.report-note, .range-caption { font-size: 12px; line-height: 1.8; }
.payment-panel > .panel-body > p { font-size: 13px; }
.owner-audit small { color: var(--muted); opacity: 1; }
.owner-details { font-size: 13px; }
.no-data-chart { font-size: 13px; }
.loading { font-size: 14px; }
.loading-mark { background: #f0edfb; border-color: #d7cfee; }
.skeleton { background: #e9e5f4; }
dialog { background: #fff; border-color: #e0e3ed; box-shadow: 0 24px 100px #18203b33; border-radius: 16px; }
dialog::backdrop { background: #141a344d; backdrop-filter: blur(4px); }
.modal-head { padding: 23px 26px 20px; background: #fff; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 24px 26px 27px; }
.modal-body > p { font-size: 14px; }
.code-block { background: #f5f6fa; border-color: #dfe4ed; color: #58697d; font-size: 12px; }
.copy-input { font-size: 13px; }
.drawer { width: 660px; border-radius: 0; }
.lead-profile h2 { font-size: 25px; }
.lead-profile p { font-size: 13px; }
.detail-grid small { font-size: 12px; }
.detail-grid div { font-size: 14px; }
.identity-chip { font-size: 12px; background: #fafbfe; padding: 10px 12px; }
.identity-chip .icon { color: #9684ca; }
.timeline { padding-top: 23px; }
.timeline-event { border-color: #e3ddf2; padding-left: 26px; }
.timeline-event:before { background: #9781d7; border-color: #f2edfc; }
.timeline-event h3 { font-size: 13px; font-weight: 600; }
.timeline-event p { font-size: 13px; color: #5b657b; }
.timeline-event small { font-size: 12px; }
.journey-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.journey-stops { display: flex; align-items: flex-start; gap: 0; margin: 22px 0; }
.journey-stop { flex: 1; min-width: 0; position: relative; font-size: 12px; padding-right: 13px; }
.journey-stop .source-icon { position: relative; z-index: 1; width: 37px; height: 37px; margin-bottom: 11px; }
.journey-stop strong, .journey-stop small { display: block; overflow-wrap: anywhere; }
.journey-stop strong { font-size: 13px; font-weight: 600; }
.journey-stop small { color: var(--muted); margin-top: 4px; }
.journey-line { position: absolute; left: 41px; right: 5px; height: 1px; top: 18px; background: #e3ddf2; }
.journey-stop:last-child .journey-line { display: none; }
.journey-meta { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 10px 0 20px; }
.detail-disclosure { border: 1px solid var(--border); border-radius: 10px; margin: 24px 0; background: #fafbfe; }
.detail-disclosure > summary { cursor: pointer; padding: 15px 17px; font-size: 13px; color: #635a83; font-weight: 600; }
.detail-disclosure > form, .detail-disclosure > div { padding: 5px 17px 18px; }
.auth-art { background: #171c2b; border-color: #252d42; color: #f1f3fa; }
.auth-art .logo svg { fill: #a896fa; }
.auth-art h1 { font-size: 52px; font-weight: 550; }
.auth-art h1 span { color: #af9cf5; }
.auth-art p { color: #a9b1c8; font-size: 16px; }
.auth-footer { color: #9fa9c3; font-size: 11px; }
.orbit { border-color: #3b405f; }
.hub { background: #9582e7; color: #fff; }
.orbit-node { background: #262b43; border-color: #454c6c; color: #c9c3e3; font-size: 12px; }
.auth-card { max-width: 400px; }
.auth-card h2 { font-size: 28px; font-weight: 600; }
.auth-card > p { font-size: 14px; }
.auth-card .btn { font-size: 14px; min-height: 45px; }
.auth-divider, .auth-footnote, .switch-auth { font-size: 12px; }
.auth-divider { color: #838a9e; }
.report-title p { font-size: 14px; }
.report-wrap .logo { color: var(--text); }
.import-preview th, .import-preview td { font-size: 12px; padding: 10px; }
.inline-loading { font-size: 14px; }
#toast { background: #252d44; color: #fff; font-size: 13px; box-shadow: 0 6px 30px #20284426; }
@media (min-width: 1700px) { .content { padding: 40px 46px 55px; } .topbar { padding-left: 46px; padding-right: 46px; } }
@media (max-width: 1350px) {
  .content { padding: 29px 27px 42px; } .topbar { padding-left: 27px; padding-right: 27px; }
  .shell { grid-template-columns: 220px minmax(0, 1fr); } .sidebar { width: 220px; padding-left: 13px; padding-right: 13px; }
  .stats { gap: 13px; } .stat { padding: 19px 17px; } .stat-value { font-size: 31px; }
  .insight-grid { grid-template-columns: minmax(0, 1.7fr) minmax(275px, 1fr); gap: 18px; }
  .panel-head { padding: 20px; } .panel-body { padding: 0 20px 20px; }
  .page-heading > .actions { padding-top: 0; } .page-heading { flex-wrap: wrap; }
}
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-value { font-size: 33px; }
  .grid-main, .insight-grid, .dashboard-bottom { grid-template-columns: minmax(0, 1fr); }
  .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .breadcrumb { font-size: 12px; } .search-wrap { width: 235px; }
  .signal-item { padding: 0 18px; } .connection-row > .actions { max-width: 100%; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: 195px minmax(0, 1fr); } .sidebar { width: 195px; padding-left: 9px; padding-right: 9px; }
  .sidebar .logo { font-size: 26px; padding-left: 11px; } .logo small { font-size: 9px; }
  .content { padding: 25px 20px 35px; } .topbar { padding: 15px 20px; gap: 12px; }
  .topbar .breadcrumb { display: none; } .search-wrap { width: auto; flex: 1; }
  .signal-strip { grid-template-columns: 1fr; gap: 14px; padding: 18px 20px; }
  .signal-item { padding: 0; } .signal-item + .signal-item { border-left: 0; border-top: 1px solid var(--border); padding-top: 14px; }
  .filters { align-items: flex-start; flex-wrap: wrap; } .health-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .shell { display: block; } .sidebar { width: 254px; padding: 29px 20px 22px; box-shadow: 20px 0 70px #11172840; }
  .sidebar .logo { font-size: 29px; } .logo small { font-size: 10px; }
  .mobile-menu { display: inline-flex; } .topbar { min-height: 68px; padding: 12px 15px; }
  .content { padding: 23px 16px 35px; } .page-heading h1 { font-size: 29px; }
  .page-heading p { font-size: 14px; } .page-heading > .actions { padding: 0; }
  .page-heading { gap: 16px; margin-bottom: 22px; } .actions { gap: 8px; }
  .btn { font-size: 12px; min-height: 40px; padding: 9px 12px; }
  .sample-banner { font-size: 12px; flex-wrap: wrap; gap: 7px; padding: 11px 12px; }
  .sample-banner button { margin-left: 0; font-size: 12px; } .compact-select { font-size: 13px; max-width: 100%; min-width: 140px; }
  .stats { gap: 10px; } .stat { padding: 17px 14px; } .stat-title { font-size: 12px; align-items: flex-start; }
  .stat-title .icon { width: 16px; height: 16px; } .stat-value { font-size: 30px; margin: 12px 0; }
  .stat-foot, .stat-foot .pill { font-size: 12px; } .stat-value.multi { font-size: 22px; }
  .panel-head { padding: 19px 17px; gap: 12px; flex-wrap: wrap; } .panel-head h2 { font-size: 16px; }
  .panel-body { padding: 0 17px 19px; } .panel-footer { padding: 13px 17px; font-size: 12px; flex-wrap: wrap; }
  .panel-footer > span { max-width: none; } .panel-footer > .actions { width: auto; }
  .chart { height: 210px; } .chart text { font-size: 12px; }
  .toolbar { padding: 15px; } .toolbar input, .toolbar select { font-size: 13px; }
  .toolbar input { min-width: 180px; } .toolbar select { max-width: 170px; }
  th, td { padding-left: 16px; padding-right: 16px; }
  .connection-row, .alert-row, .rule-row, .share-row { padding: 18px 17px; }
  .connection-row > .actions { margin-left: 0; width: 100%; }
  .settings-row { font-size: 13px; gap: 14px; } .settings-grid .panel-head { align-items: flex-start; }
  .modal-head { padding: 21px 20px 18px; } .modal-body { padding: 22px 20px; }
  .drawer { width: 100%; } .form-grid { gap: 14px; } .detail-grid { gap: 18px 12px; }
  .journey-stops { flex-direction: column; gap: 22px; } .journey-stop { padding: 0 0 0 51px; min-height: 37px; width: 100%; }
  .journey-stop .source-icon { position: absolute; top: 0; left: 0; margin: 0; }
  .journey-line { top: 42px; left: 18px; right: auto; width: 1px; height: calc(100% - 24px); }
  .stage-row { grid-template-columns: 81px minmax(0, 1fr) 30px 36px; gap: 9px; font-size: 12px; }
  .stage-row:has(> .icon) { grid-template-columns: 81px minmax(0, 1fr) 30px 36px 14px; }
  .report-wrap { padding: 28px 16px; } .report-title h1 { font-size: 29px; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; }
  .search-wrap kbd { display: none; } .search-wrap input { padding-right: 10px; }
}
@media print {
  .nav-group, .workspace-context, .segment-control, .page-link, .detail-disclosure { display: none !important; }
  .content { max-width: none; padding: 0; } .panel, .stat { box-shadow: none; }
  .grid-main, .insight-grid, .dashboard-bottom { grid-template-columns: 1fr; }
  .chart .line { stroke: #6554d9; } .chart .area { fill: #6554d913; }
}
/* Equal-window comparison and safe historical import status. */
.period-comparison { margin-bottom: 22px; }
.comparison-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.comparison-metric { min-width: 0; padding: 16px; background: var(--panel2); border-radius: 10px; }
.comparison-metric h3 { margin: 0 0 12px; color: var(--muted); }
.comparison-values { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.comparison-values strong { font-size: 27px; letter-spacing: -.6px; }
.comparison-values span, .comparison-change { font-size: 12px; line-height: 1.65; }
.comparison-change { margin: 10px 0 0; }
.comparison-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; }
.comparison-context > div { display: grid; gap: 4px; font-size: 12px; }
.comparison-context time, .history-health-card { overflow-wrap: anywhere; }
.history-health { margin-bottom: 22px; }
.history-health-summary { border-left: 3px solid var(--accent); padding: 1px 14px; margin-bottom: 20px; }
.history-health-summary p { line-height: 1.6; }
.history-health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.history-health-card { border: 1px solid var(--border); border-radius: 10px; padding: 18px; min-width: 0; font-size: 13px; line-height: 1.65; }
.history-health-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.history-health-title h3 { margin: 0; font-size: 16px; }
.history-health-title p { margin: 4px 0; color: var(--muted); }
.history-health-title .pill { flex-shrink: 0; }
.history-health-card dl { margin: 14px 0 0; }
.history-health-card dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; border-top: 1px solid var(--border); padding: 9px 0; }
.history-health-card dt { color: var(--muted); }
.history-health-card dd { margin: 0; }
.history-progress { background: var(--panel2); padding: 12px; border-radius: 8px; margin-top: 12px; }
.history-progress p { margin: 5px 0 0; }
@media (max-width: 1100px) { .comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .comparison-grid, .comparison-context, .history-health-grid { grid-template-columns: minmax(0, 1fr); }
  .comparison-metric { padding: 14px; }
  .history-health-card { padding: 14px; }
  .history-health-title { flex-wrap: wrap; }
}
