/* SourceDesk 0.2 — charcoal surfaces, quiet borders, one blue accent. */
:root {
  color-scheme: dark;
  --paper: #1c1c1c;
  --card: #242424;
  --raised: #2b2b2b;
  --hover: #2a2a2a;
  --ink: #eeeeef;
  --muted: #a0a0a5;
  --faint: #77777e;
  --line: #343434;
  --soft-line: #303030;
  --accent: #87c8ff;
  --accent-soft: #283b49;
  --green: var(--accent);
  --pale: var(--accent-soft);
  --danger: #efa098;
  --gold: #e2c08a;
  --radius: 18px;
  --ease: 150ms ease;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); }
main:focus { outline: none; }
::selection { background: #3a5972; color: #fff; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 580; letter-spacing: -.85px; line-height: 1.3; }
h2 { font-size: 21px; font-weight: 580; letter-spacing: -.55px; }
h3 { font-size: 14px; font-weight: 570; letter-spacing: -.1px; }
small { font-size: 11px; }
strong { font-weight: 590; }
.muted { color: var(--muted); }
.faded { color: var(--faint); }
.mono, code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.mono { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 100; padding: 10px 16px; background: var(--accent); color: #132633; border-radius: 10px; }
.skip-link:focus { top: 12px; }
svg { flex-shrink: 0; }
/* Shell */
.app-header { border-bottom: 1px solid var(--soft-line); }
.header-inner { display: flex; align-items: center; gap: 30px; max-width: 1480px; height: 86px; margin: 0 auto; padding: 0 40px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 620; letter-spacing: -.6px; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 30px; color: var(--accent); }
.brand-mark svg { width: 29px; height: 29px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.primary-nav { display: flex; align-items: center; gap: 3px; flex: 1; min-width: 0; }
.nav-item { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 11px; border-radius: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; transition: background var(--ease), color var(--ease); }
.nav-item svg { width: 15px; height: 15px; stroke-width: 1.6; }
.nav-item:hover { color: var(--ink); background: #242424; }
.nav-item.active { background: #2c2c2c; color: var(--ink); }
.nav-item.active svg { color: var(--accent); }
.nav-item .tag { width: 5px; height: 5px; background: #8cbea5; border-radius: 50%; font-size: 0; }
.header-account { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.user-row { display: flex; align-items: center; justify-content: center; gap: 10px; border: none; background: none; color: var(--muted); border-radius: 9px; padding: 5px; }
.user-row > svg { width: 16px; height: 16px; }
.user-row:hover { color: var(--ink); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #3e4144; background: #2a2f33; color: #b3c7d7; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
#mobile-nav { display: none; }
main { min-height: calc(100vh - 87px); display: flex; }
.content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 40px; display: flex; flex-direction: column; min-width: 0; }
.demo-banner { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; padding-top: 20px; }
.demo-label { border: 1px solid #414141; border-radius: 4px; padding: 1px 5px; font-size: 8px; font-weight: 650; letter-spacing: .65px; color: #c0c0c4; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 35px 0 28px; }
.page-title p { margin-top: 8px; font-size: 13px; }
.page-title p strong { color: var(--ink); }
#page-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.filters-hidden { display: none; }
.filter-control { min-width: 0; }
.filter-control select { cursor: pointer; background-color: #232323; font-size: 12px; padding-top: 8px; padding-bottom: 8px; min-height: 37px; border-color: #383838; border-radius: 8px; }
.filters input { font-size: 12px; min-height: 37px; padding-top: 7px; padding-bottom: 7px; }
.period-context { color: var(--muted); font-size: 12px; padding: 8px 0; }
.filter-pill { display: inline-flex; gap: 16px; align-items: center; font-size: 12px; color: var(--accent); border: 1px solid #3a5266; background: #263440; padding: 6px 10px; border-radius: 7px; margin: -6px 0 20px; }
.filter-pill button { border: 0; background: none; color: inherit; font-size: 18px; }
#view { min-width: 0; }
.app-footer { margin-top: auto; padding: 65px 0 26px; display: flex; justify-content: space-between; gap: 14px; color: var(--faint); font-size: 10px; }
.app-footer > span { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.footer-dot { width: 5px; height: 5px; border-radius: 50%; background: #929299; display: inline-block; }
.footer-separator { color: #525258; margin: 0 3px; }
/* Controls */
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink); background: #292929; border: 1px solid #3b3b3b; border-radius: 9px; padding: 9px 14px; font-weight: 500; line-height: 1.5; font-size: 12px; min-height: 38px; transition: background var(--ease), border-color var(--ease); white-space: nowrap; }
.button:hover, .icon-button:hover { background: #343434; border-color: #4b4b4b; }
.button svg, .icon-button svg { width: 16px; height: 16px; }
.button.primary { background: var(--accent); color: #142b3c; border-color: var(--accent); font-weight: 600; }
.button.primary:hover { background: #a0d4ff; border-color: #a0d4ff; }
.button.small { min-height: 31px; padding: 5px 10px; font-size: 11px; border-radius: 7px; }
.button.wide { width: 100%; justify-content: space-between; }
.icon-button { background: transparent; border-color: transparent; width: 36px; height: 36px; min-height: 36px; padding: 7px; color: var(--muted); }
.link-button { border: none; padding: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 500; text-align: left; white-space: nowrap; }
.link-button:hover { color: var(--accent); }
input, select, textarea { border: 1px solid #3e3e3e; border-radius: 8px; color: var(--ink); background: #272727; padding: 10px 12px; max-width: 100%; min-width: 0; }
input::placeholder, textarea::placeholder { color: #818188; }
input:focus, select:focus, textarea:focus { border-color: #688dac; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%239e9ea4' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
select:disabled { opacity: .45; cursor: default; }
textarea { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.65; resize: vertical; }
label { display: flex; flex-direction: column; gap: 7px; margin-bottom: 17px; font-size: 12px; font-weight: 500; color: #ccccd0; }
label.check { flex-direction: row; align-items: flex-start; gap: 9px; font-weight: 400; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 2px 0 0; flex-shrink: 0; }
.search { width: 240px; font-size: 12px; }
/* Website home */
.website-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.website-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 25px 26px 23px; display: block; min-width: 0; transition: border-color var(--ease), background var(--ease); position: relative; }
.website-card:hover { border-color: #55585b; background: #272727; }
.website-card:focus-visible { outline-offset: 5px; }
.website-card-header { display: flex; align-items: center; gap: 11px; min-width: 0; }
.site-glyph { width: 29px; height: 29px; flex-shrink: 0; display: grid; place-items: center; color: var(--accent); }
.site-glyph svg { width: 25px; height: 25px; stroke-width: 1.6; }
.website-domain { font-size: 16px; font-weight: 580; letter-spacing: -.25px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.website-card-header .card-arrow { margin-left: auto; color: #77777e; width: 16px; height: 16px; }
.website-card:hover .card-arrow { color: var(--accent); }
.website-platform { margin: 4px 0 0 40px; color: var(--muted); font-size: 10px; }
.sparkline { width: 100%; height: 90px; display: block; margin: 24px 0 17px; overflow: visible; }
.sparkline .sparkline-line { stroke: var(--accent); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.sparkline .sparkline-area { fill: url(#unused); }
.website-totals { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; }
.website-visitors { font-size: 12px; color: var(--muted); }
.website-visitors strong { color: var(--ink); font-size: 20px; font-weight: 560; margin-right: 4px; letter-spacing: -.45px; }
.website-revenue { text-align: right; }
.website-revenue strong { display: block; color: var(--ink); font-size: 15px; font-weight: 530; letter-spacing: -.2px; }
.website-revenue small { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.website-footnote { display: flex; align-items: flex-start; gap: 8px; color: var(--faint); font-size: 11px; margin-top: 24px; max-width: 760px; line-height: 1.7; }
.website-footnote svg { width: 14px; height: 14px; margin-top: 2px; }
/* Reports */
.cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 20px 22px; min-width: 0; }
.stat-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.stat-title svg { width: 15px; height: 15px; color: #86868b; }
.stat-value { font-size: 30px; line-height: 1.3; letter-spacing: -.8px; font-weight: 530; margin-top: 14px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat.feature .stat-value { color: var(--accent); }
.stat-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--faint); font-size: 10px; margin-top: 12px; min-height: 17px; }
.delta { color: #a6cbb8; }
.delta.down { color: #e1a09b; }
.panel, .hero-chart { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 21px 23px 18px; gap: 15px; }
.panel-head p { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.7; }
.panel-head > .link-button { margin-top: 3px; }
.hero-chart { padding-bottom: 22px; margin-bottom: 22px; }
.hero-chart .panel-head { padding-bottom: 12px; }
.chart-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 13px; padding: 0 23px; margin: 0 0 16px; }
.chart-main strong { font-size: 28px; font-weight: 530; letter-spacing: -.7px; }
.chart-main > span { font-size: 11px; color: var(--muted); }
.chart-svg { width: calc(100% - 44px); height: 228px; display: block; margin: 0 22px; overflow: visible; }
.chart-svg text { fill: var(--faint); font-size: 10px; font-family: inherit; }
.chart-grid { stroke: #383838; stroke-width: 1; stroke-dasharray: 2 5; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: transparent; outline: none; }
.chart-point:hover .point-dot, .chart-point:focus .point-dot { fill: var(--accent); stroke: #242424; stroke-width: 2; }
.chart-point .point-crosshair { stroke: #66666e; stroke-width: 1; stroke-dasharray: 3 4; opacity: 0; }
.chart-point:hover .point-crosshair, .chart-point:focus .point-crosshair { opacity: 1; }
.chart-point .point-tooltip { opacity: 0; pointer-events: none; }
.chart-point:hover .point-tooltip, .chart-point:focus .point-tooltip { opacity: 1; }
.point-tooltip rect { fill: #333333; stroke: #515151; }
.point-tooltip text { fill: #dedee1; font-size: 10px; }
.legend { display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--muted); }
.legend > span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.segment-control { display: inline-flex; gap: 3px; padding: 3px; background: #1f1f1f; border: 1px solid #343434; border-radius: 8px; }
.segment-control button { border: 0; border-radius: 5px; background: transparent; padding: 6px 11px; color: var(--muted); font-size: 11px; }
.segment-control button.active { background: #363636; color: var(--ink); }
.segment-control button:hover { color: var(--ink); }
.grid-2, .overview-foot { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-bottom: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; margin-bottom: 22px; }
.page-section { margin-bottom: 22px; }
.panel > .modal-text { margin: 0 23px 17px; }
.panel > .note, .panel > details.note { margin: 0 20px 20px !important; }
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #505050 transparent; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 10px 23px; color: var(--faint); font-size: 10px; font-weight: 500; border-top: 1px solid var(--soft-line); border-bottom: 1px solid var(--soft-line); }
td { padding: 14px 23px; font-size: 12px; border-bottom: 1px solid var(--soft-line); color: #d9d9dc; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #282828; }
th.num, td.num { text-align: right; }
.grid-2 th, .grid-2 td { padding-left: 20px; padding-right: 20px; }
td strong { font-weight: 550; }
.source-cell { display: flex; align-items: center; gap: 10px; }
.source-icon { width: 25px; height: 25px; display: inline-grid; place-items: center; background: #303030; color: #b8cddd; border: 1px solid #3c3c3c; font-size: 12px; border-radius: 7px; font-weight: 600; flex-shrink: 0; }
.source-button { border: 0; background: none; color: var(--ink); text-align: left; font-size: 12px; padding: 3px 0; }
.source-button:hover { color: var(--accent); }
.mini-meter { width: 60px; height: 2px; margin: 6px 0 0 auto; background: #363636; border-radius: 3px; overflow: hidden; }
.mini-meter i { display: block; height: 100%; background: #6a94b6; border-radius: inherit; }
.receipt-kind { font-size: 10px; color: var(--muted); margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: #b3cbbd; background: #29372f; padding: 3px 8px; border-radius: 6px; white-space: nowrap; font-weight: 400; }
.badge .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge.gray { color: #b0b0b6; background: #303030; }
.badge.warn { color: #dfc18f; background: #3b3428; }
.bar-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; padding: 12px 22px; margin: 0 8px 8px; isolation: isolate; }
.bar-row span { color: var(--muted); }
.bar-row strong { font-size: 12px; font-weight: 500; }
.rowbar { position: absolute; inset: 3px auto 3px 7px; max-width: calc(100% - 14px); background: #2d353b; border-radius: 5px; z-index: -1; }
.site-amount { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 23px; border-top: 1px solid var(--soft-line); }
.site-amount strong { font-size: 14px; font-weight: 530; }
.site-amount small { display: block; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
/* Explanations are available, not fighting the numbers for attention. */
.note { background: #252a2d; color: #b3bdc5; border: 1px solid #35434d; border-radius: 10px; font-size: 11px; line-height: 1.8; margin-bottom: 22px; padding: 12px 15px; }
.note.neutral { color: #b4b4ba; background: #242424; border-color: #393939; }
.note.warning { color: #dac39f; border-color: #554736; background: #302a22; }
.note strong { color: inherit; font-weight: 550; }
details.note { padding: 0; background: transparent; border-color: #343434; color: var(--muted); }
details.note summary { cursor: pointer; padding: 11px 15px; font-size: 11px; user-select: none; }
details.note summary::marker { color: #7c9ab0; font-size: 9px; }
details.note[open] summary { color: #d6d6da; border-bottom: 1px solid #343434; }
details.note .note-body { padding: 12px 15px; }
/* Campaigns */
.campaign-filters { display: flex; gap: 5px; flex-wrap: wrap; padding: 0 0 20px; }
.campaign-filter { border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); padding: 7px 12px; font-size: 12px; }
.campaign-filter.active { border-color: #424242; background: #2e2e2e; color: var(--ink); }
.campaign-filter span { margin-left: 7px; color: #82828a; font-size: 10px; }
.campaign-table td { padding-top: 20px; padding-bottom: 20px; }
.campaign-table th, .campaign-table td { padding-left: 18px; padding-right: 18px; }
.campaign-table .campaign-identity { display: flex; align-items: center; gap: 10px; }
.campaign-name { font-size: 12px; font-weight: 550; color: var(--ink); border: 0; background: transparent; text-align: left; padding: 0; }
button.campaign-name:hover { color: var(--accent); }
.campaign-meta { color: var(--muted); font-size: 10px; margin-top: 4px; }
.campaign-dates { font-size: 11px; }
.row-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.campaign-link { display: flex; gap: 10px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); background: #222222; }
.campaign-link code { flex: 1; font-size: 11px; color: #b0bcc6; word-break: break-all; white-space: normal; }
.campaign-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.campaign-detail-header p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.detail-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 22px 0; gap: 15px; }
.detail-kpis > div { border: 1px solid #3b3b3b; border-radius: 11px; padding: 15px; min-width: 0; }
.detail-kpis small { color: var(--muted); display: block; font-size: 10px; }
.detail-kpis strong { font-size: 24px; font-weight: 530; display: block; margin-top: 7px; word-break: break-word; }
/* Settings, live, states */
.site-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; }
.site-card-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px; }
.site-card-head h3 { font-size: 16px; }
.site-card-head p { font-size: 11px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.site-card-body { padding: 0 22px 22px; }
.site-card .site-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 21px; }
.site-card .integration-status { border-top: 1px solid var(--line); padding: 15px 22px; font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 14px; }
.site-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.site-settings-grid .site-card { margin-bottom: 0; }
.live-intro { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 36px; text-align: center; margin-bottom: 22px; }
.live-number { font-size: 68px; font-weight: 480; line-height: 1.25; letter-spacing: -2px; color: var(--accent); margin: 15px 0 8px; }
.live-intro p { color: var(--muted); font-size: 12px; }
.empty { padding: 58px 25px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 17px; margin-bottom: 9px; }
.empty p { max-width: 430px; margin: 0 auto; font-size: 12px; line-height: 1.9; }
.empty .button { margin-top: 20px; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #3a454e; border-radius: 14px; color: var(--accent); font-size: 25px; margin: 0 auto 22px; background: #252f37; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 240px; font-size: 12px; color: var(--muted); }
.loader { width: 14px; height: 14px; border: 1.5px solid #3e3e3e; border-top-color: var(--accent); border-radius: 50%; animation: turn 800ms linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
/* Dialogs / authentication */
dialog { width: min(720px,calc(100% - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid #494949; border-radius: 17px; color: var(--ink); background: #252525; box-shadow: 0 24px 100px #0007; }
dialog::backdrop { background: #0009; backdrop-filter: blur(4px); }
.modal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 23px 26px 20px; border-bottom: 1px solid #3a3a3a; position: sticky; top: 0; z-index: 2; background: #252525; }
.modal-top h2 { font-size: 18px; }
#close-modal { font-size: 25px; }
#modal-content { padding: 24px 26px 27px; overflow-wrap: anywhere; }
.modal-text { color: var(--muted); font-size: 12px; line-height: 1.85; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
.full { grid-column: 1/-1; }
.form-help { display: block; font-size: 10px; color: var(--muted); font-weight: 400; line-height: 1.8; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 19px; margin-top: 20px; border-top: 1px solid #3d3d3d; }
.error { font-size: 12px; color: var(--danger); margin: 10px 0; }
.error:empty { display: none; }
.code { color: #c1ced8; border: 1px solid #3d3d3d; background: #1f1f1f; font-size: 11px; line-height: 1.8; padding: 15px; border-radius: 9px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 16px 0; }
.divider { height: 1px; background: #3b3b3b; margin: 24px 0; }
.timeline { margin: 21px 0 27px 6px; padding-left: 24px; border-left: 1px solid #424a51; }
.timeline-item { position: relative; padding-bottom: 22px; font-size: 12px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:before { content: ''; position: absolute; left: -29px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid #252525; }
.timeline-item > small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.timeline-item p { margin-bottom: 4px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; width: max-content; max-width: calc(100vw - 36px); color: #e4eaf0; background: #2c3842; border: 1px solid #53697b; border-radius: 10px; box-shadow: 0 8px 40px #0005; font-size: 12px; padding: 13px 20px; }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 35px 22px; }
.login-card { width: 100%; max-width: 420px; }
.login-card .brand { margin-bottom: 48px; }
.login-heading { margin-bottom: 29px; }
.login-heading h1 { font-size: 29px; }
.login-heading p { margin-top: 10px; font-size: 13px; }
.login-card input { min-height: 44px; background: #242424; }
.login-card .button { min-height: 43px; margin-top: 8px; }
.login-foot { font-size: 10px; color: var(--faint); padding-top: 28px; }
/* Responsive */
@media(min-width:1500px) { .header-inner { gap: 42px; } .nav-item { padding-left: 13px; padding-right: 13px; } }
@media(max-width:1250px) { .header-inner { gap: 22px; padding: 0 28px; } .nav-item { gap: 5px; padding: 9px 8px; font-size: 11px; } .nav-item svg { width: 14px; height: 14px; } .content { padding: 0 28px; } .brand { font-size: 18px; } .website-grid { gap: 18px; } }
@media(max-width:1060px) { .header-inner { flex-wrap: wrap; gap: 0 20px; height: auto; min-height: 116px; padding-top: 17px; } .primary-nav { order: 3; flex-basis: 100%; padding: 13px 0; gap: 6px; } .nav-item { font-size: 12px; padding: 7px 9px; } main { min-height: calc(100vh - 117px); } .website-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .cards { gap: 12px; } .stat { padding: 18px; } .stat-value { font-size: 26px; } .grid-2, .overview-foot, .grid-3 { gap: 16px; } .grid-2 th, .grid-2 td { padding-left: 14px; padding-right: 14px; } .source-cell { gap: 7px; } }
@media(max-width:780px) { .content { padding: 0 22px; } .header-inner { padding-left: 22px; padding-right: 22px; } .primary-nav { gap: 3px; overflow-x: auto; scrollbar-width: none; } .primary-nav::-webkit-scrollbar { display: none; } .nav-item { padding: 7px 8px; } .nav-item svg { display: none; } .cards { grid-template-columns: repeat(2,minmax(0,1fr)); } .grid-2, .overview-foot { grid-template-columns: 1fr; } .grid-3 { gap: 12px; } .website-card { padding: 20px; } .website-domain { font-size: 15px; } .website-totals { gap: 6px; } .website-visitors strong { font-size: 18px; } .website-revenue strong { font-size: 13px; } .website-platform { margin-left: 38px; } .chart-svg { height: 210px; } .page-title h1 { font-size: 25px; } .panel-head { padding: 19px 20px 16px; } .app-footer { font-size: 9px; } }
@media(max-width:600px) {
  .header-inner { min-height: 73px; padding: 0 18px; flex-wrap: nowrap; gap: 12px; }
  .header-account { gap: 6px; }
  .primary-nav { display: none; position: absolute; top: 66px; left: 14px; right: 14px; z-index: 20; padding: 10px; border: 1px solid #444; background: #272727; box-shadow: 0 18px 50px #0007; border-radius: 12px; overflow: visible; }
  .primary-nav.open { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .nav-item { min-height: 44px; font-size: 11px; flex-direction: column; gap: 5px; padding: 10px 5px; }
  .nav-item svg { display: block; width: 16px; height: 16px; }
  .nav-item .tag { display: none; }
  #mobile-nav { display: inline-flex; }
  .user-row > svg { display: none; }
  main { min-height: calc(100dvh - 74px); }
  .content { padding: 0 18px; }
  .demo-banner { font-size: 10px; gap: 7px; padding-top: 16px; align-items: flex-start; }
  .demo-label { margin-top: 1px; }
  .page-title { gap: 14px; margin-top: 28px; margin-bottom: 24px; align-items: flex-start; }
  .page-title h1 { font-size: 24px; }
  .page-title p { font-size: 11px; max-width: 260px; line-height: 1.8; }
  #page-actions > .button { font-size: 11px; padding: 8px 10px; min-height: 37px; }
  .page-title:has(.search) { flex-wrap: wrap; }
  .search { width: 100%; }
  .filters { gap: 10px; margin-bottom: 22px; }
  .filter-group { gap: 6px; }
  .filter-control select { font-size: 11px; min-height: 35px; padding-left: 10px; padding-right: 28px; }
  .filters input { max-width: 148px; font-size: 11px; }
  .site-control { max-width: 175px; }
  .site-control select { width: 100%; text-overflow: ellipsis; }
  .website-grid { grid-template-columns: 1fr; gap: 18px; }
  .website-card { border-radius: 20px; padding: 23px; }
  .website-domain { font-size: 16px; }
  .website-visitors strong { font-size: 21px; }
  .website-revenue strong { font-size: 15px; }
  .sparkline { margin-top: 23px; height: 83px; }
  .website-footnote { font-size: 10px; line-height: 1.9; }
  .stat { padding: 17px 15px; border-radius: 13px; }
  .stat-title { font-size: 11px; }
  .stat-title svg { display: none; }
  .stat-value { font-size: 25px; margin-top: 12px; }
  .stat-foot { font-size: 9px; margin-top: 9px; }
  .cards { gap: 11px; margin-bottom: 18px; }
  .panel, .hero-chart { border-radius: 14px; }
  .hero-chart .panel-head { align-items: flex-start; padding: 17px; gap: 10px; }
  .hero-chart .panel-head p { display: none; }
  .hero-chart h3 { font-size: 13px; }
  .segment-control button { font-size: 10px; padding: 5px 8px; }
  .chart-main { padding: 0 17px; gap: 8px; }
  .chart-main strong { font-size: 23px; }
  .chart-main > span { font-size: 9px; }
  .chart-svg { height: 185px; margin: 0 10px; width: calc(100% - 20px); }
  .grid-3 { grid-template-columns: 1fr; gap: 15px; }
  .panel-head p { font-size: 10px; }
  .panel-head { padding: 17px 18px; }
  .panel-head .link-button { font-size: 10px; }
  th, td { padding-left: 17px; padding-right: 17px; }
  .grid-2 th, .grid-2 td { padding-left: 14px; padding-right: 14px; }
  td { font-size: 11px; }
  .source-button { font-size: 11px; }
  .source-icon { width: 22px; height: 22px; font-size: 10px; }
  .source-cell { gap: 7px; }
  .mini-meter { display: none; }
  .note, details.note summary { font-size: 10px; }
  .campaign-filters { gap: 2px; }
  .campaign-filter { padding: 7px 8px; font-size: 11px; }
  .campaign-filter span { margin-left: 4px; }
  .campaign-link { flex-wrap: wrap; padding: 14px; }
  .campaign-link code { flex-basis: 100%; }
  .row-actions { flex-wrap: wrap; gap: 7px; }
  .site-card-head { padding: 18px; flex-wrap: wrap; align-items: flex-start; }
  .site-card .site-actions { padding: 0 18px 18px; }
  .site-card .integration-status { padding: 13px 18px; }
  .site-settings-grid { grid-template-columns: 1fr; }
  .live-intro { padding: 28px 20px; }
  .live-number { font-size: 56px; }
  .app-footer { flex-direction: column; gap: 6px; padding-top: 48px; padding-bottom: 22px; line-height: 1.9; }
  dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 13px; }
  .modal-top { padding: 16px 18px; }
  .modal-top h2 { font-size: 16px; }
  #modal-content { padding: 19px 18px 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .detail-kpis > div { padding: 12px; }
  .detail-kpis strong { font-size: 21px; }
  .empty { padding: 45px 12px; }
  .form-foot { flex-wrap: wrap; }
}
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *:before, *:after { animation: none !important; transition: none !important; } }
/* Integration cards retain the existing setup actions and status fields. */
.site-card-top { display: flex; align-items: center; gap: 12px; padding: 22px 24px; min-width: 0; }
.site-card-top > div:nth-child(2) { flex: 1; min-width: 0; }
.site-card-top h3 { font-size: 16px; letter-spacing: -.25px; }
.site-card-top p { font-size: 11px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.site-letter { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #414c54; border-radius: 10px; background: #29343b; color: #a0c9e8; text-transform: uppercase; font-size: 16px; }
.site-status { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 0 24px 24px; gap: 16px; font-size: 12px; }
.site-status small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 8px; }
.site-buttons { display: flex; gap: 8px; flex-wrap: wrap; padding: 17px 24px; border-top: 1px solid var(--line); background: #222222; }
.badge.error { color: var(--danger); background: #422e2b; }
.site-card > .error { margin: 0 24px 18px; }
@media(max-width:600px) {
  .site-card-top { padding: 18px; gap: 10px; flex-wrap: wrap; }
  .site-card-top > div:nth-child(2) { flex-basis: calc(100% - 52px); }
  .site-card-top > .badge { margin-left: 46px; }
  .site-status { grid-template-columns: 1fr; padding: 0 18px 19px; gap: 17px; }
  .site-buttons { padding: 16px 18px; gap: 7px; }
  .site-buttons .button { font-size: 11px; padding: 8px 10px; }
}
