:root {
  --ink: #172036;
  --text: #172036;
  --muted: #6f7890;
  --line: #e4e8f0;
  --line-strong: #d7dce7;
  --panel: #ffffff;
  --paper: #f5f7fb;
  --surface: #f8f9fc;
  --accent: #6c5ce7;
  --accent-dark: #5144c4;
  --accent-soft: #eeebff;
  --accent-2: #17b897;
  --accent-3: #25304a;
  --good: #0d9f78;
  --warn: #d58a24;
  --bad: #dc5365;
  --sidebar: #13182a;
  --shadow-soft: 0 1px 2px rgba(28, 37, 61, 0.04), 0 7px 22px rgba(28, 37, 61, 0.04);
  --shadow: 0 14px 40px rgba(28, 37, 61, 0.08);
  --shadow-strong: 0 24px 70px rgba(28, 37, 61, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Avenir Next", Avenir, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 78% -10%, rgba(108, 92, 231, 0.11), transparent 28rem),
    radial-gradient(circle at 27% 10%, rgba(23, 184, 151, 0.07), transparent 24rem),
    var(--paper);
  color: var(--ink);
  letter-spacing: -0.006em;
}

::selection { background: rgba(108, 92, 231, 0.2); }

.app-shell { grid-template-columns: 252px minmax(0, 1fr); }

.sidebar {
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 24px 18px 20px;
  background:
    radial-gradient(circle at 16% 0, rgba(108, 92, 231, 0.34), transparent 17rem),
    linear-gradient(180deg, #171c31 0%, #111625 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 18px 0 60px rgba(13, 18, 35, 0.08);
}

.brand {
  position: relative;
  gap: 11px;
  margin: 0 4px 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  width: 43px;
  height: 43px;
  padding: 3px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.brand strong { font-size: 0.96rem; letter-spacing: -0.025em; }
.brand small { margin-top: 2px; color: #929bb2; font-size: 0.68rem; }

.brand-edition {
  position: absolute;
  top: -7px;
  right: -2px;
  padding: 3px 6px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 99px;
  color: #c9c3ff;
  background: rgba(108,92,231,.18);
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.nav-label {
  margin: 0 13px 10px;
  color: #687189;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar nav { gap: 5px; }

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #aeb6c8;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.sidebar nav a:hover {
  transform: translateX(3px);
  color: #fff;
  background: rgba(255,255,255,.06);
}

.sidebar nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(108,92,231,.95), rgba(91,76,210,.92));
  border-color: rgba(255,255,255,.13);
  box-shadow: 0 12px 30px rgba(71, 57, 182, .32);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  color: #cad0df;
  background: rgba(255,255,255,.06);
  font-size: .9rem;
}

.sidebar nav a.active .nav-icon { color: #fff; background: rgba(255,255,255,.16); }

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
}

.sidebar-footer strong,
.sidebar-footer small { display: block; }
.sidebar-footer strong { color: #e8ebf3; font-size: .73rem; }
.sidebar-footer small { margin-top: 2px; color: #788299; font-size: .63rem; }
.live-orb { width: 9px; height: 9px; border-radius: 50%; background: #21d3a7; box-shadow: 0 0 0 5px rgba(33,211,167,.12), 0 0 14px rgba(33,211,167,.7); }

main {
  max-width: 1700px;
  padding: 20px 30px 46px;
  gap: 22px;
}

.topbar {
  min-height: 62px;
  padding: 7px 3px 12px;
  border-bottom: 1px solid rgba(215, 220, 231, .75);
}

.topbar-title { display: grid; gap: 3px; }
.topbar-title h2 { font-size: 1.08rem; letter-spacing: -.025em; }
.breadcrumb { color: #9299aa; font-size: .62rem; letter-spacing: .09em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }

.environment-chip {
  padding: 6px 9px;
  border-radius: 7px;
  color: #6358c9;
  background: #efedff;
  font-size: .57rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.status-pill {
  position: relative;
  padding: 8px 12px 8px 27px;
  color: #257d68;
  border-color: #dfe9e7;
  font-size: .7rem;
  box-shadow: none;
}

.status-pill::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #17b897;
  box-shadow: 0 0 0 4px rgba(23,184,151,.12);
}

.mobile-nav-toggle { display: none; }

.route-view:not(.active) { display: none !important; }
.route-view.active { animation: route-enter .38s cubic-bezier(.2,.8,.2,1) both; }

@keyframes route-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 { color: var(--ink); letter-spacing: -.035em; }
h1 { font-size: clamp(2.15rem, 3vw, 3.45rem); line-height: 1.02; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { color: var(--muted); line-height: 1.65; }
.eyebrow { color: #8075df; font-size: .63rem; letter-spacing: .13em; }

.command-center { grid-template-columns: minmax(0, 1.44fr) minmax(340px, .72fr); gap: 18px; }

.hero-panel,
.agent-pathway,
.panel,
.activity-panel,
.insight-card,
.growth-agent-card,
.suite-visual-card,
.live-log-panel,
.integration-board {
  border: 1px solid rgba(224, 228, 238, .92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  min-height: 455px;
  padding: 38px;
  border: 0;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgba(130,218,201,.26), transparent 18rem),
    radial-gradient(circle at 60% 105%, rgba(151,135,255,.3), transparent 25rem),
    linear-gradient(135deg, #252b4d 0%, #252149 52%, #41357f 100%);
  box-shadow: 0 28px 70px rgba(42, 37, 83, .22);
}

.hero-panel::before {
  border: 0;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 21px 21px;
  mask-image: linear-gradient(90deg, transparent, #000 58%, #000);
}

.hero-panel h1 { color: #fff; max-width: 650px; }
.hero-panel .header-copy { color: #c9cbe0; max-width: 590px; }
.hero-panel .eyebrow { color: #bdb5ff; }

.hero-visual img {
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(5,8,25,.36), 0 0 0 1px rgba(255,255,255,.15);
}

.hero-visual span {
  border-color: rgba(255,255,255,.1);
  color: #e8e5ff;
  background: rgba(255,255,255,.075);
  box-shadow: none;
}

.metric-grid { gap: 10px; }
.metric-grid article {
  padding: 15px 17px;
  border: 1px solid rgba(255,255,255,.12);
  border-top: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.075);
  backdrop-filter: blur(8px);
  box-shadow: none;
}
.metric-grid span { color: #b8bbd0; font-size: .69rem; }
.metric-grid strong { color: #fff; font-size: 1.72rem; letter-spacing: -.04em; }

.agent-pathway {
  padding: 28px;
  background: rgba(255,255,255,.92);
}
.agent-rail { gap: 7px; }
.agent-rail a {
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #f8f9fc;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.agent-rail a:hover { transform: translateX(4px); border-color: #ddd8ff; box-shadow: var(--shadow-soft); }
.agent-rail strong { color: var(--accent); background: var(--accent-soft); border-radius: 8px; }

.overview-insights {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr .85fr .8fr;
  gap: 18px;
}

.insight-card { min-width: 0; padding: 24px; background: rgba(255,255,255,.94); }
.insight-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.insight-head > span { padding: 6px 9px; border-radius: 8px; color: #766bd5; background: #f0edff; font-size: .62rem; font-weight: 800; white-space: nowrap; }

.mini-bar-chart { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 14px; height: 155px; margin-top: 10px; }
.chart-column { display: grid; grid-template-rows: 20px 1fr 20px; gap: 6px; align-items: end; height: 100%; text-align: center; }
.chart-column strong { color: #4b5367; font-size: .7rem; }
.chart-column small { color: var(--muted); font-size: .6rem; }
.chart-bar { display: block; width: 100%; height: var(--bar-size); min-height: 8px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #8375f1, #6555dc); box-shadow: 0 8px 18px rgba(108,92,231,.2); transform-origin: bottom; animation: chart-rise .7s cubic-bezier(.2,.8,.2,1) both; }
.chart-column:nth-child(4) .chart-bar { background: linear-gradient(180deg, #2bcaa8, #17a987); box-shadow: 0 8px 18px rgba(23,184,151,.2); }
@keyframes chart-rise { from { transform: scaleY(.08); opacity: .35; } }

.overview-funnel { display: grid; gap: 18px; margin-top: 24px; }
.overview-funnel div { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px; }
.overview-funnel span { color: var(--muted); font-size: .72rem; }
.overview-funnel strong { color: var(--ink); font-size: .78rem; }
.overview-funnel i { grid-column: 1 / -1; width: var(--funnel-size); height: 12px; border-radius: 999px; background: linear-gradient(90deg, #6c5ce7, #9a8ff7); box-shadow: 0 6px 14px rgba(108,92,231,.17); }
.overview-funnel div:nth-child(2) i { background: linear-gradient(90deg, #17b897, #5ed7bd); }

.focus-card { overflow: hidden; background: linear-gradient(145deg, #f0edff, #fff 58%); }
.focus-card h2 { font-size: 1.38rem; line-height: 1.2; }
.focus-card .button-link { margin-top: 8px; }

.growth-hero { padding: 36px; border-radius: 26px; background: linear-gradient(135deg, #fff, #f5f2ff 72%, #e8f9f5); border: 1px solid #e4e0f6; box-shadow: var(--shadow); }
.growth-hero h1 { max-width: 900px; }
.growth-actions { align-self: center; }

.integration-board { padding: 18px; background: #fff; }
.integration-tiles article { border-radius: 14px; background: var(--surface); }
.integration-tiles article.ready { border-color: rgba(23,184,151,.24); background: #f0fbf8; }

.suite-visual-card { border: 0; border-radius: 23px; background: linear-gradient(135deg, #252b4d, #3b326e); box-shadow: var(--shadow); }
.suite-visual-card h2 { color: #fff; }
.suite-visual-card p { color: #bec2d7; }
.suite-flow span { border-color: rgba(255,255,255,.1); color: #e6e2ff; background: rgba(255,255,255,.07); }

.live-log-panel { background: #fff; }
.growth-grid { gap: 18px; }
.growth-agent-card { padding: 23px; background: #fff; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.growth-agent-card:hover { transform: translateY(-4px); border-color: #d7d1ff; box-shadow: 0 20px 45px rgba(48,42,95,.11); }
.premium-agent-card::before { height: 3px; border-radius: 22px 22px 0 0; background: linear-gradient(90deg, #6c5ce7, #17b897); }
.agent-visual { background: #f1efff; border-radius: 12px; }
.agent-number { color: #c4c8d2; }
.agent-status { border-radius: 8px; }
.agent-metrics span { border-radius: 12px; background: #f8f9fc; }
.signal-tags span { border-color: #e5e1ff; color: #685ec6; background: #f5f3ff; border-radius: 99px; }

.panel { padding: 25px; background: rgba(255,255,255,.95); }
.panel-head { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.workspace { gap: 18px; }

input, textarea, select {
  padding: 12px 13px;
  border: 1px solid #dce1eb;
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(20,27,44,.025);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:hover, textarea:hover, select:hover { border-color: #cbc5f1; }
input:focus, textarea:focus, select:focus { border-color: #8f83ed; background: #fff; box-shadow: 0 0 0 4px rgba(108,92,231,.1); }
label { color: #525b70; font-size: .73rem; font-weight: 800; }

button, .button-link {
  min-height: 40px;
  padding: 10px 15px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7162e8, #5b4bd1);
  box-shadow: 0 8px 18px rgba(86,72,198,.17);
  font-size: .74rem;
  letter-spacing: -.005em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
button:hover, .button-link:hover { transform: translateY(-1px); background: linear-gradient(135deg, #6253d9, #4f40bf); box-shadow: 0 10px 25px rgba(86,72,198,.24); }
button.ghost, .button-link.subtle { color: #5d6372; border: 1px solid var(--line); background: #fff; box-shadow: none; }
button.ghost:hover, .button-link.subtle:hover { color: var(--accent); border-color: #ccc5f2; background: #f7f5ff; }

.seo-command { gap: 20px; }
.seo-status-strip { gap: 10px; }
.seo-status-strip article { border-radius: 14px; border-color: var(--line); background: linear-gradient(180deg, #fff, #fafbfe); box-shadow: var(--shadow-soft); }
.seo-status-strip strong { color: var(--ink); }
.seo-grid > div { border-radius: 17px; background: #fafbfe; border-color: var(--line); }
.seo-score-card { border-radius: 16px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
.seo-score-card:hover { border-color: #d7d1ff; box-shadow: var(--shadow); }
.score-ring { box-shadow: inset 0 0 0 7px #f0eff8; }
.first-party-funnel { border-radius: 14px; background: #f8f9fc; }
.index-helper { border-radius: 13px; }
.query-card { border-radius: 13px; background: #fff; }

.row-card {
  padding: 17px;
  border-radius: 14px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.row-card:hover { transform: translateY(-2px); border-color: #d9d3fb; box-shadow: var(--shadow-soft); }
.refresh-plan-card { border-left: 3px solid var(--accent); }
.rewrite-preview { border-radius: 13px; background: #f8f9fc; }
.performance-snapshot span { border-color: #dfdbf6; color: #6258bd; background: #f5f3ff; }
.exact-change { border-left-color: var(--accent); border-radius: 0 10px 10px 0; background: #fbfbfe; }

.activity-panel { padding: 25px; background: #fff; }
.tab-switcher { padding: 4px; border-radius: 12px; background: #f1f3f8; }
.tab-button { min-height: 36px; border-radius: 9px; color: #727a8d; background: transparent; box-shadow: none; }
.tab-button:hover { transform: none; box-shadow: none; }
.tab-button.active { color: #5146b8; background: #fff; box-shadow: 0 4px 12px rgba(40,47,70,.08); }
.table-wrap { border-radius: 15px; border: 1px solid var(--line); }
table { border-collapse: separate; border-spacing: 0; }
th { color: #80879a; background: #f8f9fc; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
td { border-color: #edf0f5; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: #faf9ff; }
.activity-event-card { border-radius: 16px; background: #fff; }

.metric-source { border-radius: 7px; }
.metric-source.live { color: #087d60; background: #e8faf5; }
.metric-source.db { color: #4e55a9; background: #eff0ff; }
.metric-source.ai { color: #7358bd; background: #f3edff; }
.metric-source.fallback { color: #a46319; background: #fff5e6; }
.severity { box-shadow: none; }
.severity.high, .severity.critical { color: #be3c50; background: #fff0f2; border-color: #f8d9de; }

/* Dedicated Google reports — Google metrics and App DB records never share a rate. */
.google-reports { gap: 18px; }

.google-report-header {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 31px 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff 0%, #faf9ff 68%, #effbf8 100%);
  box-shadow: var(--shadow-soft);
}

.google-report-header h1 { margin-bottom: 8px; }
.google-report-controls { display: grid; grid-template-columns: minmax(210px,.75fr) minmax(320px,1.25fr) auto auto; align-items: end; gap: 10px; width: 100%; }
.google-company-picker,
.google-page-picker { display: grid; min-width: min(430px, 100%); gap: 6px; }
.google-company-picker { min-width: 210px; }
.google-company-picker > label,
.google-page-picker > label { color: var(--ink); font-size: .72rem; font-weight: 800; }
.google-page-picker select { width: 100%; min-width: 350px; background: #fff; }
.google-company-picker > small,
.google-page-picker > small { color: var(--muted); font-size: .58rem; font-weight: 700; }
.google-page-search { position: relative; }
.google-page-search span { position: absolute; left: 12px; top: 50%; z-index: 1; color: #7e8496; font-size: 1rem; transform: translateY(-50%); pointer-events: none; }
.google-page-search input { width: 100%; min-height: 40px; padding-left: 36px; border-color: #dfe2ed; background: #f8f9fc; }
.google-page-search input:focus { border-color: #9589eb; background: #fff; box-shadow: 0 0 0 3px rgba(92,74,219,.09); }
.google-date-control { display: grid; gap: 5px; min-height: 62px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.google-date-control small { color: var(--muted); font-size: .63rem; font-weight: 800; }
.google-date-control strong { font-size: .77rem; white-space: nowrap; }
.google-date-control span { max-width: 210px; color: #737b8e; font-size: .56rem; font-weight: 650; line-height: 1.35; }
.google-report-controls button { min-height: 44px; }

.google-report-statusbar {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 14px;
  border: 1px solid #dfe6e7;
  border-radius: 12px;
  color: #697286;
  background: rgba(255,255,255,.9);
  font-size: .68rem;
  font-weight: 700;
}
.google-report-statusbar span + span { padding-left: 15px; border-left: 1px solid var(--line); }
.google-live-chip { color: #087f61; letter-spacing: .06em; }
.google-live-chip i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #13b88c; box-shadow: 0 0 0 4px rgba(19,184,140,.12); }

.google-report-tabs { display: flex; width: fit-content; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #eef0f6; }
.google-report-tab { min-height: 38px; color: #747c8f; background: transparent; box-shadow: none; }
.google-report-tab:hover { transform: none; color: var(--accent); background: rgba(255,255,255,.55); box-shadow: none; }
.google-report-tab.active { color: #5145bc; background: #fff; box-shadow: 0 4px 12px rgba(41,46,68,.09); }

.google-report-panel { display: none; gap: 18px; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-soft); }
.google-report-panel.active { display: grid; animation: route-enter .28s ease both; }
.report-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.report-title-row h2 { font-size: 1.65rem; }
.provider-chip { display: inline-flex; align-items: center; width: fit-content; padding: 7px 10px; border: 1px solid #dfe2ed; border-radius: 8px; color: #697286; background: #f7f8fb; font-size: .61rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.provider-chip.live { color: #087c5e; border-color: #bcebdc; background: #edfbf6; }

.google-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.google-kpi-grid article { display: flex; align-items: center; gap: 17px; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); }
.google-kpi-grid article div { display: grid; gap: 2px; }
.google-kpi-grid strong { color: #4937da; font-size: 2.05rem; letter-spacing: -.05em; }
.google-kpi-grid small { color: #343b4d; font-size: .76rem; }
.kpi-icon { display: grid; place-items: center; width: 49px; height: 49px; flex: 0 0 49px; border-radius: 14px; color: #5545e2; background: linear-gradient(135deg,#ebe7ff,#f6f4ff); font-size: 1.25rem; font-weight: 900; }

.google-chart-card, .google-table-card, .google-comparison-card { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow-soft); }
.chart-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.chart-title h3 { margin-bottom: 2px; }
.chart-title span { color: var(--muted); font-size: .65rem; }
.chart-legend { display: flex; gap: 14px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 19px; height: 3px; border-radius: 99px; background: #6c5ce7; }
.chart-legend i.impressions { height: 0; border-top: 3px dotted #9d93f5; background: transparent; }
.chart-legend i.submits { background: #17b897; }

.line-chart { min-height: 240px; overflow: hidden; }
.line-chart svg { display: block; width: 100%; height: 210px; overflow: visible; }
.grid-line { stroke: #e9ebf2; stroke-width: 1; stroke-dasharray: 4 5; }
.chart-line { fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-line.primary { stroke: #5d4de3; }
.chart-line.secondary { stroke: #a298f2; stroke-dasharray: 7 7; }
.chart-point { vector-effect: non-scaling-stroke; stroke-width: 2.5; }
.chart-point.primary { fill: #5d4de3; stroke: #fff; }
.chart-point.secondary { fill: #fff; stroke: #a298f2; }
.chart-axis { display: flex; justify-content: space-between; gap: 6px; color: #858da0; font-size: .6rem; }

.google-table-card .table-wrap { max-height: 430px; }
.google-table-card td:first-child strong, .google-table-card td:first-child small { display: block; }
.google-table-card td:first-child small { max-width: 570px; margin-top: 3px; color: #82899a; font-size: .64rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.google-privacy-note { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid #e2ddff; border-radius: 12px; color: #4f46ad; background: #f4f1ff; font-size: .7rem; }
.google-privacy-note strong { font-size: 1rem; }
.google-privacy-note em { margin-left: auto; color: #7369c7; font-size: .62rem; font-style: normal; white-space: nowrap; }

.ga4-primary-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 16px; }
.ga4-secondary-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; }
.ga4-funnel { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.ga4-funnel > div { position: relative; display: grid; justify-items: center; gap: 6px; padding: 17px 9px; border: 1px solid #dcd6ff; border-radius: 12px; background: linear-gradient(145deg,#faf9ff,#f0edff); text-align: center; }
.ga4-funnel span { color: #555d70; font-size: .65rem; font-weight: 800; }
.ga4-funnel strong { color: #1f2640; font-size: 1.65rem; }
.ga4-funnel small { color: #6258bf; font-size: .62rem; }
.ga4-funnel em { padding: 3px 7px; border: 1px solid #8fd8c3; border-radius: 6px; color: #087c5e; background: #effbf7; font-size: .57rem; font-style: normal; font-weight: 900; }
.ga4-funnel b { position: absolute; right: -12px; top: 39%; z-index: 2; color: #6c5ce7; font-size: 1.2rem; }

.bar-chart { min-height: 210px; }
.bar-columns { display: flex; align-items: end; gap: 7px; height: 210px; padding-top: 7px; border-bottom: 1px solid var(--line); }
.bar-column { display: grid; grid-template-rows: 1fr 20px; gap: 5px; flex: 1; min-width: 8px; height: 100%; }
.bar-column > div { display: flex; align-items: end; justify-content: center; gap: 2px; height: 100%; }
.bar-column i { display: block; width: 37%; height: var(--height); min-height: 3px; border-radius: 4px 4px 0 0; background: #6858e8; }
.bar-column i.submit { background: #19b797; }
.bar-column small { color: #858da0; font-size: .52rem; text-align: center; white-space: nowrap; overflow: hidden; }

.google-comparison-card h3 { margin-bottom: 15px; }
.comparison-columns { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.comparison-columns > div { display: grid; justify-items: center; gap: 6px; min-height: 190px; padding: 20px 12px; border: 1px solid #d9d3ff; border-radius: 13px; background: linear-gradient(145deg,#f6f3ff,#fff); text-align: center; }
.comparison-columns > div:last-child { border-color: #bce9df; background: linear-gradient(145deg,#effbf8,#fff); }
.comparison-columns span { color: #5144c4; font-size: .82rem; font-weight: 900; }
.comparison-columns > div:last-child span { color: #087c69; }
.comparison-columns small { color: #656d7e; font-size: .65rem; }
.comparison-columns strong { color: #5144d3; font-size: 2.1rem; }
.comparison-columns > div:last-child strong { color: #07866d; }
.comparison-columns em { margin-top: auto; padding: 4px 7px; border-radius: 6px; color: #655bc0; background: #eeebff; font-size: .54rem; font-style: normal; }
.comparison-columns b { display: grid; place-items: center; width: 39px; height: 39px; margin-inline: -20px; z-index: 2; border: 1px solid #b6afec; border-radius: 50%; color: #353957; background: #fff; font-size: .68rem; }
.google-comparison-card > p { margin: 14px 0 0; padding: 11px; border-radius: 9px; color: #5851aa; background: #f4f1ff; font-size: .65rem; }

.toast { border-radius: 12px; background: #22283e; box-shadow: 0 18px 50px rgba(16,20,36,.28); }
.processing-overlay { background: rgba(17, 20, 36, .56); backdrop-filter: blur(10px); }
.processing-card { border-radius: 24px; }

@media (max-width: 1220px) {
  .app-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .sidebar { padding-inline: 14px; }
  .command-center { grid-template-columns: 1fr; }
  .overview-insights { grid-template-columns: 1fr 1fr; }
  .focus-card { grid-column: 1 / -1; }
  .google-report-controls { grid-template-columns: minmax(190px,.75fr) minmax(280px,1.25fr) auto; }
  .google-report-controls button { grid-column: 3; }
  .google-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ga4-primary-grid, .ga4-secondary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(290px, 86vw);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
  }
  body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 15; background: rgba(13,17,30,.48); backdrop-filter: blur(3px); }
  body.nav-open .sidebar { transform: translateX(0); }
  .mobile-nav-toggle { display: grid; place-items: center; min-width: 40px; padding: 0; color: var(--ink); border: 1px solid var(--line); background: #fff; box-shadow: none; }
  .topbar-title { margin-right: auto; }
  main { padding: 16px 22px 38px; }
  .overview-insights { grid-template-columns: 1fr; }
  .focus-card { grid-column: auto; }
  .google-report-controls { grid-template-columns: minmax(210px,.8fr) minmax(300px,1.2fr); }
  .google-report-controls button { grid-column: auto; }
  .google-company-picker { min-width: 210px; }
  .google-page-picker { min-width: 300px; }
  .google-page-picker select { min-width: 0; }
}

@media (max-width: 640px) {
  main { padding: 12px 14px 30px; }
  .topbar { align-items: center; flex-direction: row; gap: 10px; }
  .topbar-title h2 { font-size: .92rem; }
  .breadcrumb, .environment-chip { display: none; }
  .status-pill { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .hero-panel { min-height: auto; padding: 27px 22px; border-radius: 20px; }
  .hero-panel h1 { font-size: 2.18rem; }
  .hero-visual { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid article:last-child { grid-column: 1 / -1; }
  .agent-pathway, .panel, .activity-panel, .insight-card, .growth-hero { padding: 19px; border-radius: 17px; }
  .mini-bar-chart { gap: 7px; height: 135px; }
  .chart-column small { writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; }
  .growth-actions { width: 100%; }
  .topbar-actions { margin-left: auto; }
  .refresh-plan-actions { min-width: 0; }
  .google-report-header, .google-report-panel { padding: 18px; border-radius: 17px; }
  .google-report-controls { display: grid; grid-template-columns: 1fr; }
  .google-company-picker, .google-page-picker, .google-page-picker select { min-width: 0; width: 100%; }
  .google-report-statusbar { align-items: flex-start; flex-direction: column; }
  .google-report-statusbar span + span { padding: 0; border-left: 0; }
  .google-report-tabs { width: 100%; }
  .google-report-tab { flex: 1; }
  .report-title-row { align-items: flex-start; flex-direction: column; }
  .google-kpi-grid { grid-template-columns: 1fr; }
  .google-kpi-grid article { padding: 16px; }
  .ga4-funnel { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ga4-funnel b { display: none; }
  .comparison-columns { grid-template-columns: 1fr; }
  .comparison-columns b { margin: -22px auto; }
  .google-privacy-note { align-items: flex-start; flex-wrap: wrap; }
  .google-privacy-note em { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
