/* SourceDesk Focus UI 1.0 — standalone, removable presentation layer.
   Load after styles.css. Does not replace tracker, integrations or application code. */
:root {
  --paper: #1d1d1d; --card: #242424; --raised: #2a2a2a; --hover: #2b2b2b;
  --ink: #efefef; --muted: #b0b0b4; --faint: #8c8c92;
  --line: #353535; --soft-line: #303030; --accent: #8dcaff;
  --accent-soft: #273946; --radius: 14px; --focus-revenue: #edaa90;
  --focus-revenue-bg: #362b27;
}
body { font-size: 13px; font-variant-numeric: tabular-nums; }
.app-header { background: var(--paper); border-color: #303030; }
.header-inner { height: 68px; max-width: 1480px; padding: 0 36px; gap: 35px; }
.brand { font-size: 18px; letter-spacing: -.65px; }
.brand-mark, .brand-mark svg { width: 26px; height: 26px; }
.primary-nav { gap: 3px; justify-content: center; }
.nav-item { border-radius: 6px; padding: 8px 10px; font-size: 12px; gap: 6px; }
.nav-item.active { background: #2b2b2b; }
.nav-item svg { width: 14px; height: 14px; }
.user-avatar { height: 28px; width: 28px; }
main { min-height: calc(100vh - 69px); }
.content { max-width: 1440px; padding: 0 36px; }
h1 { font-size: 23px; letter-spacing: -.6px; font-weight: 580; }
.page-title { margin: 30px 0 21px; align-items: center; }
.page-title h1 { font-size: 23px; }
.page-title p { margin-top: 4px; font-size: 12px; }
.demo-banner { padding-top: 16px; font-size: 10px; color: #b5b7bb; }
.demo-banner + .page-title { margin-top: 23px; }
.demo-label { border-radius: 4px; font-size: 8px; }
#page-actions .button { min-height: 35px; padding: 7px 12px; font-size: 11px; }
#page-actions svg { width: 14px; height: 14px; }
.filters { margin-bottom: 22px; gap: 12px; }
.filter-group { gap: 8px; }
.filter-control select { background-color: #242424; border-color: #393939; min-height: 36px; border-radius: 8px; font-size: 12px; }
.site-control select { font-weight: 550; }
.icon-button { width: 34px; height: 34px; }
.button { min-height: 36px; padding: 8px 13px; border-radius: 8px; font-size: 12px; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #182631; }
.button:not(.primary):hover { background: #303030; }
.filter-pill { font-size: 11px; margin-bottom: 16px; }
.cards { gap: 12px; margin-bottom: 18px; }
.stat { padding: 19px 22px; border-radius: 12px; min-height: 117px; }
.stat-title { color: #bdbdc2; font-size: 12px; }
.stat-title svg { width: 14px; height: 14px; color: #8c8c92; }
.stat-value { font-size: 29px; letter-spacing: -.8px; line-height: 1.2; margin-top: 10px; }
.stat-foot { font-size: 10px; margin-top: 9px; gap: 5px; }
.stat.feature { background: var(--card); }
.stat.feature .stat-value { color: var(--ink); }
.delta { color: #9fd0b1; }
.delta.down { color: #f2b09e; }
.sd-focus-ready[data-sd-route='overview'] #view > .cards {
  margin-bottom: 0; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 14px 14px 0 0; background: var(--card); gap: 0; padding: 23px 0 19px;
}
.sd-focus-ready[data-sd-route='overview'] #view > .cards .stat {
  border: 0; border-radius: 0; background: transparent; min-height: 85px;
  padding: 0 26px; box-shadow: none;
}
.sd-focus-ready[data-sd-route='overview'] #view > .cards .stat + .stat { border-left: 1px solid #373737; }
.sd-focus-ready[data-sd-route='overview'] #view > .cards .stat-title { justify-content: flex-start; gap: 0; }
.sd-focus-ready[data-sd-route='overview'] #view > .cards .stat-title svg { display: none; }
.sd-focus-ready[data-sd-route='overview'] #view > .cards .stat-value { font-size: 30px; margin-top: 8px; }
.sd-focus-ready[data-sd-route='overview'] #view > .cards .stat:first-child .stat-title::before,
.sd-focus-ready[data-sd-route='overview'] #view > .cards .stat:nth-child(2) .stat-title::before {
  content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px;
  border-radius: 3px; background: var(--focus-revenue);
}
.sd-focus-ready[data-sd-route='overview'] #view > .cards .stat:nth-child(2) .stat-title::before { background: var(--accent); }
.hero-chart { border-radius: 14px; box-shadow: none; margin-bottom: 18px; background: var(--card); padding-bottom: 17px; }
.sd-focus-ready[data-sd-route='overview'] #view > .cards + .hero-chart { border-top: none; border-radius: 0 0 14px 14px; }
.hero-chart.focus-has-combined > .panel-head,
.hero-chart.focus-has-combined > .chart-main,
.hero-chart.focus-has-combined > .chart-svg { display: none; }
.focus-chart-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 2px 25px 16px; }
.focus-legend { display: flex; gap: 7px; flex-wrap: wrap; }
.focus-series { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #424242; border-radius: 6px; background: #292929; color: #d6d6da; padding: 6px 9px; font-size: 11px; line-height: 1.2; }
.focus-series:hover { border-color: #737373; }
.focus-series[aria-pressed='false'] { color: #a6a6ad; background: transparent; }
.focus-series[aria-pressed='false'] .focus-swatch { background: transparent; }
.focus-swatch { width: 9px; height: 9px; border-radius: 2px; border: 1px solid var(--accent); background: var(--accent); flex: 0 0 auto; }
.focus-swatch.revenue { background: var(--focus-revenue); border-color: var(--focus-revenue); }
.focus-chart-meta { font-size: 10px; color: var(--muted); }
.focus-plot { position: relative; margin: 0 24px; }
.focus-combined-chart { display: block; width: 100%; height: 256px; overflow: visible; }
.focus-combined-chart text { font-family: inherit; font-size: 10px; fill: #ababaf; }
.focus-gridline { stroke: #424242; stroke-width: .8; stroke-dasharray: 2 5; }
.focus-visitor-line { stroke: var(--accent); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.focus-revenue-bar { fill: var(--focus-revenue); opacity: .76; }
.focus-hover-line { opacity: 0; stroke: #a0a0a5; stroke-width: 1; stroke-dasharray: 3 4; }
.focus-hit-point:focus { outline: none; }
.focus-hit-point:hover .focus-hover-line,.focus-hit-point:focus .focus-hover-line { opacity: .6; }
.focus-hit-point:focus .focus-hit { stroke: #94ceff; stroke-width: 1; }
.focus-tooltip { position: absolute; z-index: 5; pointer-events: none; min-width: 187px; padding: 13px 14px;
  border-radius: 10px; background: #303030; border: 1px solid #565656; box-shadow: 0 8px 25px #0006; font-size: 11px; }
.focus-tooltip strong { font-size: 11px; display: block; margin-bottom: 9px; }
.focus-tooltip-row { display: flex; align-items: center; gap: 7px; margin-top: 6px; color: #c6c6ca; }
.focus-tooltip-row b { margin-left: auto; font-weight: 550; color: #f1f1f2; }
.focus-chart-note { padding: 11px 25px 0; font-size: 10px; color: #a4a4aa; }
.focus-chart-note a { text-decoration: underline; text-underline-offset: 3px; color: #dab08c; }
.panel { border-radius: 13px; box-shadow: none; }
.panel-head { padding: 18px 21px 14px; border-bottom: 1px solid var(--soft-line); }
.panel-head h3 { font-size: 13px; font-weight: 580; }
.panel-head p { font-size: 10px; color: #a5a5aa; margin-top: 4px; }
.panel-head .link-button { font-size: 10px; color: #bfc0c5; }
.grid-2, .overview-foot { gap: 18px; margin-bottom: 18px; }
.grid-3 { gap: 18px; margin-bottom: 18px; }
.table-wrap { scrollbar-width: thin; scrollbar-color: #555 transparent; }
th { font-size: 10px; font-weight: 400; color: #aaaab0; padding: 10px 20px; }
td { font-size: 12px; padding: 13px 20px; border-bottom-color: #303030; }
thead { background: transparent; }
.table-wrap tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background-color: #2a2a2a; }
.source-cell { gap: 9px; position: relative; }
.source-button { font-size: 12px; font-weight: 450; }
.source-icon { border: none; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; background: #33383d; color: #c6d6e5; }
.focus-source-name { background-image: linear-gradient(to right, #85bde71a 0%, #85bde71a var(--focus-row-fill), transparent var(--focus-row-fill)); }
.focus-unattributed .source-icon { color: #e6bc91; background: #3c332b; }
.focus-unattributed td:nth-child(3) { color: #ecc4a4; }
.mini-meter { display: none; }
.badge { padding: 3px 7px; border-radius: 5px; font-size: 10px; font-weight: 450; }
.badge .dot { width: 4px; height: 4px; }
.receipt-kind { font-size: 10px; margin-top: 3px; color: #a4a4aa; }
.bar-row { min-height: 46px; font-size: 12px; padding: 12px 20px; }
.site-amount { padding: 13px 20px; }
.overview-foot .chart-main { padding-left: 20px; padding-right: 20px; margin-bottom: 10px; }
.overview-foot .chart-main strong { font-size: 26px; }
.overview-foot .modal-text { padding-left: 20px; padding-right: 20px; font-size: 11px; }
.overview-foot details.note { margin: 13px 20px 17px !important; }
.note, details.note { font-size: 11px; border-radius: 9px; }
details.note summary { padding-top: 11px; padding-bottom: 11px; font-size: 11px; }
.website-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.website-card { border-radius: 23px; padding: 22px 24px 20px; background: #242424; }
.website-card:hover { border-color: #626262; background: #282828; transform: translateY(-2px); }
.website-domain { font-size: 16px; letter-spacing: -.3px; }
.website-platform { font-size: 10px; margin-top: 5px; }
.sparkline { height: 72px; margin-top: 22px; margin-bottom: 11px; }
.sparkline-line { stroke-width: 2; }
.website-visitors, .website-revenue small { font-size: 11px; }
.website-visitors strong { font-size: 18px; }
.website-revenue strong { font-size: 14px; font-weight: 500; }
.website-footnote { max-width: 760px; font-size: 10px; margin-top: 24px; }
[data-sd-route='websites'] .page-title h1 { font-size: 20px; }
[data-sd-route='websites'] .page-title p { font-size: 14px; margin-top: 8px; }
.campaign-filters { margin: 20px 0 14px; }
.campaign-filter { border-radius: 6px; font-size: 11px; padding: 7px 10px; }
.campaign-filter span { font-size: 9px; }
.campaign-name { font-size: 12px; }
.campaign-detail-header { font-size: 12px; }
.campaign-table .panel-head { padding: 17px 20px; }
.campaign-table td { padding-top: 16px; padding-bottom: 16px; }
.detail-kpis strong { font-size: 25px; }
.site-card { border-radius: 13px; }
.site-card-top { padding: 20px; }
.site-status { padding: 0 20px 20px; }
.site-buttons { padding: 14px 20px; }
.site-buttons .button { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.site-card-top h3 { font-size: 15px; }
.live-intro { padding: 30px; }
.live-number { font-size: 56px; }
.app-footer { padding-top: 32px; font-size: 10px; }
dialog { border-radius: 13px; }
.modal-top { padding: 18px 22px; }
.modal-top h2 { font-size: 17px; }
#modal-content { padding: 21px 22px; }
.login-heading h1 { font-size: 28px; }
.login-card { max-width: 370px; }
.login-card .brand { margin-bottom: 40px; }
@media (max-width:1180px) {
 .header-inner { gap: 18px; padding-left: 25px; padding-right: 25px; }
 .nav-item { padding: 8px 6px; font-size: 11px; gap: 5px; }
 .content { padding: 0 25px; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards .stat { padding-left: 20px; padding-right: 20px; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards .stat-value { font-size: 27px; }
}
@media (min-width:601px) and (max-width:1060px) {
 .header-inner { height: auto; min-height: 104px; padding-top: 15px; }
 .primary-nav { justify-content: flex-start; gap: 4px; padding: 12px 0; }
 .nav-item { font-size: 12px; padding: 7px 9px; }
 .website-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:780px) {
 .website-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .focus-chart-toolbar { padding-left: 18px; padding-right: 18px; }
 .focus-plot { margin: 0 16px; }
 .focus-chart-note { padding-left: 18px; padding-right: 18px; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards { padding: 0; overflow: hidden; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards .stat { padding: 17px 18px; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards .stat:nth-child(3) { border-left: none; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards .stat:nth-child(n+3) { border-top: 1px solid #373737; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards + .hero-chart { padding-top: 15px; }
}
@media (max-width:600px) {
 .header-inner { min-height: 63px; height: 63px; padding: 0 17px; flex-wrap: nowrap; }
 .primary-nav { top: 59px; justify-content: initial; padding: 10px; }
 .primary-nav .nav-item { padding: 10px 6px; }
 .content { padding: 0 15px; }
 main { min-height: calc(100dvh - 64px); }
 .page-title { margin-top: 24px; margin-bottom: 17px; }
 .page-title h1 { font-size: 21px; }
 .page-title p { font-size: 11px; }
 .filters { gap: 9px; margin-bottom: 17px; }
 .filter-control select { font-size: 11px; }
 .secondary-filters { flex-wrap: wrap; }
 .model-control select { max-width: 202px; }
 .filter-group { flex-wrap: wrap; }
 .focus-chart-meta { display: none; }
 .focus-chart-toolbar { padding: 0 13px 12px; }
 .focus-plot { margin: 0 11px; }
 .focus-combined-chart { height: 214px; }
 .focus-combined-chart text { font-size: 10px; }
 .focus-chart-note { font-size: 10px; padding: 9px 13px 0; }
 .focus-series { font-size: 10px; }
 .focus-tooltip { min-width: 170px; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards .stat { padding: 15px 13px; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards .stat-value { font-size: 25px; }
 .sd-focus-ready[data-sd-route='overview'] #view > .cards .stat-title { font-size: 10px; }
 .stat { padding: 16px 14px; min-height: 112px; }
 .stat-value { font-size: 25px; }
 .stat-foot { font-size: 9px; }
 .website-grid { grid-template-columns: 1fr; }
 .website-card { padding: 23px; }
 .sparkline { height: 75px; }
 .website-domain { font-size: 16px; }
 .panel-head { padding: 15px 15px 12px; }
 td { font-size: 11px; padding: 12px 14px; }
 th { padding: 10px 14px; }
 .source-button { font-size: 11px; }
 .site-status { grid-template-columns: 1fr; }
 .site-card-top { padding: 17px; }
 .site-status { padding: 0 17px 17px; }
 .site-buttons { padding: 13px 17px; }
 .app-footer { font-size: 9px; }
 #modal-content { padding: 18px; }
 .modal-top { padding: 15px 18px; }
}

/* Diagnostic explanations should wrap, not disappear outside a narrow dialog. */
.connection-detail table { table-layout: fixed; min-width: 0; width: 100%; }
.connection-detail th, .connection-detail td { white-space: normal; overflow-wrap: anywhere; }
.connection-detail th:nth-child(1) { width: 19%; }
.connection-detail th:nth-child(2) { width: 16%; }
.connection-detail th:nth-child(3) { width: 25%; }
.connection-detail th:nth-child(4) { width: 40%; }
.connection-detail td { vertical-align: top; }
@media(max-width:600px) {
 .connection-detail th,.connection-detail td { padding-left:6px; padding-right:6px; }
}
