/*
 * Statio design system, ported from the v0 design export (app/globals.css).
 * Tailwind preflight and shadcn primitives are replaced by the reset and
 * component rules at the top and bottom of this file.
 */

/* --- Reset (stand-in for Tailwind preflight) --- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button, select { background: transparent; text-transform: none; }
button { padding: 0; }
a { color: inherit; text-decoration: inherit; }
img, svg { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
[hidden] { display: none !important; }

:root {
  color-scheme: light;
  --background: #fbfbfd;
  --foreground: #232331;
  --card: #fff;
  --primary: #6155e8;
  --muted: #f4f3fa;
  --muted-foreground: #858490;
  --border: #eae9ef;
  --chart-1: #7761e9;
  --chart-2: #c7bcf6;
  --chart-3: #e9e5fb;
  --success: #329574;
  --purple-soft: #eeebfd;
  --radius: 10px;
}
* { outline-color: color-mix(in srgb, var(--ring, var(--primary)) 50%, transparent); }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}
button:not(:disabled),
[role="button"]:not(:disabled) {
  cursor: pointer;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button {
  transition:
    background 0.15s,
    color 0.15s;
}
button:hover {
  filter: brightness(0.98);
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
}
h1,
h2,
h3,
p {
  margin: 0;
}
select {
  cursor: pointer;
}

/* --- Design: layout and components --- */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 218px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0 15px;
  z-index: 30;
}
.brand {
  display: block;
  width: 141px;
  height: 79px;
  margin-left: 8px;
  overflow: hidden;
  position: relative;
}
.brand img {
  position: absolute;
  width: 213px;
  max-width: none;
  left: -36px;
  top: -2px;
}
.workspace {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 9px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  width: 100%;
  font-size: 11px;
  font-weight: 600;
}
.workspace > svg {
  margin-left: auto;
  color: var(--muted-foreground);
}
.workspace small,
.profile small {
  display: block;
  font-size: 10px;
  color: var(--muted-foreground);
  font-weight: 400;
  margin-top: 4px;
}
.workspace-avatar {
  display: grid;
  place-items: center;
  background: #efedfb;
  color: #7565dc;
  width: 30px;
  height: 30px;
  border: 1px solid #e7e1fc;
  border-radius: 7px;
  font-size: 15px;
}
.search-launch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8c8a98;
  width: 100%;
  font-size: 11px;
  padding: 13px 7px;
  margin-top: 9px;
}
.search-launch kbd {
  margin-left: auto;
  font-size: 9px;
  background: #f8f8fa;
  border: 1px solid var(--border);
  padding: 2px 4px;
  border-radius: 4px;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #9996a4;
  margin: 21px 10px 12px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 39px;
  padding: 0 11px;
  color: #777580;
  font-size: 12px;
  border-radius: 6px;
  margin-bottom: 3px;
  text-align: left;
}
.nav-item.active {
  background: #eeebfc;
  color: #6755d9;
  font-weight: 600;
}
.nav-item:hover {
  background: #f5f3fc;
}
.nav-item .live-dot {
  margin-left: auto;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #43b78a;
  box-shadow: 0 0 0 3px #43b78a12;
}
.nav-divider {
  border-top: 1px solid var(--border);
  margin: 17px 9px;
}
.new-badge {
  font-size: 8px;
  letter-spacing: 0.4px;
  background: #f0eefc;
  color: #8b7bdd;
  border: 1px solid #e7e2fc;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 48px;
}
.plan-card {
  border: 1px solid #ece9f7;
  border-radius: 8px;
  background: linear-gradient(120deg, #fbfaff, #f6f3fd);
  padding: 14px 12px;
  margin: 0 2px 14px;
}
.plan-card > div {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #6b59d5;
  font-size: 11px;
}
.plan-card p {
  font-size: 10px;
  color: #9992a9;
  line-height: 1.8;
  margin: 9px 0 12px;
}
.plan-card button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #fff;
  border: 1px solid #e9e5f5;
  border-radius: 5px;
  padding: 7px 9px;
  color: #706587;
  font-size: 10px;
}
.profile {
  display: flex;
  gap: 9px;
  align-items: center;
  width: 100%;
  text-align: left;
  border-top: 1px solid var(--border);
  padding: 17px 5px;
  font-size: 11px;
}
.profile > svg {
  margin-left: auto;
  color: #aaa;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1e4da;
  color: #99765e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border: 3px solid #fbf5f0;
  font-weight: 600;
}
.avatar.small {
  width: 28px;
  height: 28px;
  font-size: 9px;
}
.main-shell {
  margin-left: 218px;
  width: calc(100% - 218px);
}
.topbar {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 31px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.breadcrumb {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #96939f;
  font-size: 11px;
}
.breadcrumb b {
  font-weight: 400;
  color: #5c586a;
}
.topbar-right {
  display: flex;
  gap: 22px;
  align-items: center;
}
.demo-pill {
  font-size: 9px;
  color: #89828f;
  border: 1px solid var(--border);
  background: #faf9fc;
  padding: 4px 8px;
  border-radius: 20px;
}
.topbar-right > button {
  position: relative;
  color: #8e899b;
}
.topbar-right > button i {
  width: 4px;
  height: 4px;
  background: #a494ed;
  border-radius: 50%;
  position: absolute;
  top: 0;
  right: 0;
}
.main-content {
  padding: 30px 31px 0;
  max-width: 1600px;
  margin: auto;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 8px;
  letter-spacing: 1.6px;
  color: #96909f;
  margin-bottom: 10px;
  font-weight: 500;
}
h1 {
  font-size: 28px;
  letter-spacing: -1px;
  font-weight: 600;
  line-height: 1.15;
}
.page-title p {
  font-size: 11px;
  color: #8d8898;
  margin-top: 9px;
  line-height: 1.5;
}
.site-selector {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  font-size: 11px;
  white-space: nowrap;
  color: #615c6c;
}
.site-icon {
  color: #8a75e5;
  background: #f4f0fe;
  padding: 5px;
  border-radius: 5px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 13px;
}
.toolbar-right {
  gap: 10px;
}
.select-control {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 10px;
  color: #777080;
}
.select-control select {
  outline: none;
  background: transparent;
  max-width: 120px;
}
.date-label {
  font-size: 10px;
  color: #a09aa7;
}
.compare-toggle {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: #9a94a1;
}
.compare-toggle > span {
  border: 1px solid #d9d4e8;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  display: grid;
  place-items: center;
}
.compare-toggle.selected > span {
  background: #a695e8;
  border-color: #a695e8;
  color: white;
}
.filter-button {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: #81798f;
}
.filter-active {
  color: var(--primary);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 21px;
}
.metric {
  padding: 19px 18px 16px;
  border-right: 1px solid var(--border);
}
.metric:last-child {
  border: 0;
}
.metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8b8397;
  font-size: 11px;
}
.metric-label svg {
  color: #b4aabb;
}
.metric-middle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 14px 0 12px;
}
.metric-middle strong {
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 500;
  white-space: nowrap;
}
.spark {
  color: #8a75e4;
  width: 59px;
  height: 29px;
}
.metric-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.metric-foot > span {
  display: flex;
  align-items: center;
  gap: 1px;
  color: var(--success);
  font-size: 9px;
}
.metric-foot small {
  color: #aaa2b0;
  font-size: 8px;
}
.traffic-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 21px;
}
.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 21px 0;
  gap: 12px;
}
h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.chart-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.subtle-info {
  color: #b3aabd;
}
.chart-heading p {
  font-size: 10px;
  color: #a49aa9;
  margin-top: 6px;
}
.chart-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: #a298ac;
}
.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-0 {
  background: var(--chart-1);
}
.dot-1 {
  background: var(--chart-2);
}
.dot-2 {
  background: var(--chart-3);
}
.chart-legend .dot-1 {
  margin-left: 8px;
}
.chart-controls select {
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 9px;
  padding: 6px;
  color: #807589;
}
.traffic-chart {
  height: 244px !important;
  aspect-ratio: auto !important;
  width: 100%;
  padding: 10px 19px 4px 9px;
}
.traffic-chart text {
  font-size: 9px;
  fill: #afa4b9 !important;
}
.chart-insight {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 15px 20px 18px;
  padding: 10px 12px;
  background: #f7f5fd;
  border: 1px solid #f0ecfc;
  border-radius: 6px;
  color: #9385b0;
  font-size: 10px;
  line-height: 1.5;
}
.insight-icon {
  display: grid;
  place-items: center;
  color: #a08bdc;
}
.chart-insight b {
  color: #8770bc;
  font-weight: 600;
}
.chart-insight > svg:last-child {
  margin-left: auto;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 21px;
}
.report-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.report-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 19px 19px 17px;
}
.report-heading > button {
  margin-left: auto;
  color: #a69aaa;
}
.report-heading > span {
  color: #b5acb9;
  font-size: 10px;
}
.table-head,
.data-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 73px;
  gap: 9px;
  align-items: center;
}
.table-head {
  font-size: 9px;
  color: #aaa0b0;
  padding: 0 19px 11px;
}
.table-head > span:not(:first-child) {
  text-align: right;
}
.table-rows {
  padding: 0 12px;
}
.data-row {
  padding: 9px 7px;
  width: 100%;
  text-align: left;
  font-size: 10px;
  border-radius: 5px;
  position: relative;
}
.data-row:hover {
  background: #f8f6fd;
}
.data-row b {
  text-align: right;
  font-weight: 500;
  color: #74667e;
}
.data-row > span:last-child {
  text-align: right;
  color: #ab9fb2;
  font-size: 9px;
}
.row-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #82718c;
  min-width: 0;
}
.row-name > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-symbol {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #eee9f2;
  background: #fff;
  border-radius: 5px;
  font-size: 10px;
  color: #8a749e;
  font-weight: 600;
  flex-shrink: 0;
}
.page-symbol {
  border: 0;
  background: transparent;
  color: #b7a5c0;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  border-top: 1px solid #f0ebf3;
  color: #ab9bb7;
  font-size: 9px;
  padding: 11px;
  margin-top: 10px;
}
.device-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 198px;
  padding: 5px 13px;
}
.donut {
  position: relative;
}
.donut-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-label strong {
  font-size: 22px;
  letter-spacing: -0.8px;
  color: #81708d;
  font-weight: 500;
}
.donut-label span {
  font-size: 9px;
  color: #b3a3bb;
  margin-top: 3px;
}
.device-legend {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  max-width: 175px;
}
.device-legend > div {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ab9ab5;
  font-size: 10px;
}
.device-legend b {
  font-weight: 400;
  margin-left: auto;
  color: #95819f;
}
.main-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #b1a5bb;
  font-size: 9px;
  padding: 2px 0 22px;
  gap: 12px;
}
.main-footer > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-dot {
  margin: 0 3px;
}
.mobile-menu {
  display: none;
}
.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #edf8f1;
  color: #33815c;
  border-radius: 7px;
  padding: 12px;
  margin-bottom: 18px;
  font-size: 12px;
}
.notice button {
  margin-left: auto;
}
.realtime-hero {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  padding: 30px;
  margin-bottom: 20px;
}
.live-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--success);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
}
.realtime-hero > strong {
  display: block;
  font-size: 65px;
  letter-spacing: -3px;
  margin: 15px;
}
.realtime-hero p {
  color: #8b7a99;
}
.realtime-hero small {
  color: #9e90a8;
  font-size: 10px;
}
.realtime-bars {
  height: 115px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  margin: 20px;
}
.realtime-bars span {
  background: #b0a1f2;
  border-radius: 3px 3px 0 0;
  width: 12px;
}
.full-report {
  margin-bottom: 21px;
}
.table-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  font-size: 11px;
}
.table-search input {
  border: 0;
  outline: none;
  background: transparent;
  min-width: 0;
  width: 160px;
}
.wide-table {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  font-weight: 400;
  color: #a99bb2;
  background: #faf9fc;
  padding: 13px 20px;
}
td {
  padding: 18px 20px;
  border-top: 1px solid #f3eff6;
  color: #867591;
}
.positive {
  color: var(--success);
  font-size: 11px;
}
.empty {
  padding: 30px;
  color: #9786a2;
}
.funnel-panel {
  padding-bottom: 10px;
}
.report-heading p {
  font-size: 11px;
  color: #a695b1;
  margin-top: 7px;
}
.funnel-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 35px 24px;
}
.step-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #8b70cf;
  background: #f0eafa;
  border-radius: 50%;
  font-size: 11px;
}
.funnel-row > div {
  flex: 1;
}
.funnel-label {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  margin-bottom: 12px;
}
.funnel-label b {
  font-weight: 500;
}
.funnel-label span {
  color: #a591af;
  font-size: 10px;
  margin-left: auto;
}
.funnel-label strong {
  width: 40px;
  text-align: right;
  font-weight: 500;
  color: #9275ac;
}
.funnel-track {
  height: 24px;
  background: #f5f1fa;
  border-radius: 5px;
  overflow: hidden;
}
.funnel-track > div {
  height: 100%;
  background: #a28ae8;
  border-radius: 5px;
  min-width: 8px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0 18px;
}
.section-title h2 {
  font-size: 15px;
}
.section-title h2 span {
  color: #a995b5;
  margin-left: 8px;
}
.goal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
}
.goal-icon {
  color: #9b7dd5;
  background: #f7f0fd;
  padding: 12px;
  border-radius: 10px;
}
.goal-card h2 {
  font-size: 16px;
}
.goal-card p {
  font-size: 11px;
  color: #9f8faa;
}
.goal-card > strong {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -1px;
}
.goal-card small {
  font-size: 13px;
  color: #ab97b6;
  letter-spacing: 0;
}
.goal-card progress {
  width: 100%;
  height: 6px;
  accent-color: var(--primary);
}
.purple {
  color: var(--primary);
}
.settings-panel {
  padding: 26px;
}
.settings-panel > h2 {
  font-size: 17px;
}
.settings-panel > p {
  margin-top: 9px;
  color: #9c8aa8;
  font-size: 12px;
}
.settings-panel form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 25px;
  margin-top: 30px;
  max-width: 530px;
}
.settings-panel form > label,
.modal-form label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  font-size: 12px;
  color: #8b7598;
}
.settings-panel input:not([type="checkbox"]),
.settings-panel select,
.modal-input,
.modal-form input,
.modal-form select {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  color: var(--foreground);
  font-size: 12px;
}
.settings-panel .checkbox-label {
  flex-direction: row;
  align-items: center;
}
.settings-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.7;
  color: #a18aad;
  font-size: 11px;
}
.settings-note svg {
  flex-shrink: 0;
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 10px;
}
.modal-form p {
  font-size: 12px;
  color: #9b8ba6;
}
.option-list,
.search-results {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}
.option-list button,
.search-results button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border-radius: 6px;
  text-align: left;
  font-size: 13px;
  background: #faf8fd;
}
.option-list button > svg:last-child,
.search-results button > svg {
  margin-left: auto;
}
.modal-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 12px 0;
  font-size: 13px;
  line-height: 1.7;
  color: #92809f;
}
.modal-details h3 {
  font-weight: 600;
  color: var(--foreground);
  font-size: 16px;
}
.country-detail {
  display: flex;
  justify-content: space-between;
  padding: 13px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 1400px) {
  .main-content {
    padding: 36px 45px 0;
  }
  .traffic-chart {
    height: 280px !important;
  }
  .metric {
    padding: 23px;
  }
  .metric-middle strong {
    font-size: 33px;
  }
  .spark {
    width: 80px;
  }
  .data-row {
    padding: 12px 7px;
  }
  .device-body {
    min-height: 228px;
  }
  .sidebar {
    width: 235px;
  }
  .main-shell {
    margin-left: 235px;
    width: calc(100% - 235px);
  }
}
@media (max-width: 1050px) {
  .sidebar {
    width: 190px;
    padding: 0 10px;
  }
  .main-shell {
    margin-left: 190px;
    width: calc(100% - 190px);
  }
  .main-content {
    padding: 25px 22px 0;
  }
  .topbar {
    padding: 0 22px;
  }
  .date-label {
    display: none;
  }
  .metric {
    padding: 16px 12px;
  }
  .metric-middle strong {
    font-size: 24px;
  }
  .spark {
    width: 40px;
  }
  .metric-foot {
    gap: 4px;
  }
  .metric-foot small {
    font-size: 7px;
  }
  .chart-legend {
    display: none;
  }
  .device-body {
    gap: 0;
  }
  .device-legend {
    gap: 17px;
  }
  .device-legend > div {
    gap: 4px;
  }
  .device-legend svg {
    display: none;
  }
  .report-grid {
    gap: 16px;
  }
  .row-name {
    gap: 5px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    display: none;
    width: 218px;
    box-shadow: 10px 0 60px #1a123b20;
  }
  .sidebar-open {
    display: flex;
    top: 62px;
  }
  .sidebar-open .brand {
    display: none;
  }
  .sidebar-open .workspace {
    margin-top: 15px;
  }
  .sidebar-bottom {
    padding-top: 20px;
  }
  .main-shell {
    margin-left: 0;
    width: 100%;
  }
  .mobile-menu {
    display: block;
    margin-right: 15px;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .breadcrumb {
    margin-right: auto;
  }
  .topbar-right {
    gap: 14px;
  }
  .main-content {
    padding: 24px 18px 0;
  }
  .eyebrow {
    font-size: 7px;
  }
  h1 {
    font-size: 25px;
  }
  .page-title {
    align-items: flex-start;
  }
  .page-title p {
    max-width: 270px;
    font-size: 10px;
  }
  .site-selector {
    font-size: 10px;
    padding: 6px;
    gap: 5px;
    margin-top: 20px;
  }
  .site-icon {
    display: none;
  }
  .toolbar-left,
  .toolbar-right {
    gap: 8px;
  }
  .compare-toggle {
    font-size: 9px;
  }
  .filter-button {
    font-size: 9px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric {
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric:nth-child(3) {
    border-bottom: 0;
  }
  .metric-middle strong {
    font-size: 28px;
  }
  .spark {
    width: 40px;
    flex-shrink: 1;
    min-width: 20px;
  }
  .metric-foot small {
    font-size: 9px;
  }
  .metric-foot > span {
    font-size: 10px;
  }
  .report-grid {
    grid-template-columns: 1fr;
  }
  .traffic-chart {
    height: 230px !important;
    padding-right: 10px;
  }
  .chart-heading {
    padding: 17px 15px 0;
  }
  .chart-insight {
    margin: 12px;
    font-size: 9px;
  }
  .report-heading {
    padding: 18px;
  }
  .data-row {
    padding: 11px 7px;
    font-size: 11px;
  }
  .table-head,
  .data-row {
    grid-template-columns: minmax(0, 1fr) 80px 80px;
  }
  .device-body {
    gap: 25px;
  }
  .device-legend {
    gap: 22px;
  }
  .device-legend svg {
    display: block;
  }
  .main-footer {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 20px;
  }
  .table-search input {
    width: 115px;
  }
  .funnel-label {
    gap: 10px;
    font-size: 10px;
  }
  .funnel-label span {
    font-size: 8px;
  }
  .funnel-row {
    margin: 30px 15px;
    gap: 10px;
  }
  .demo-pill {
    font-size: 8px;
  }
  .sidebar-open .plan-card {
    display: none;
  }
  .settings-panel {
    padding: 20px;
  }
  .date-label {
    display: none;
  }
}
.page-title p,
.metric-label,
.chart-heading p,
.date-label,
.table-head,
.data-row > span:last-child,
.device-legend > div,
.main-footer,
.metric-foot small,
.card-footer {
  color: #746c80;
}
.row-name,
.data-row b {
  color: #62556e;
}
.chart-insight {
  color: #75648f;
}
.table-head {
  font-size: 10px;
}
.data-row {
  font-size: 11px;
}
.metric-foot small {
  font-size: 9px;
}
.chart-legend {
  color: #7c718b;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Rails port: stand-ins for shadcn primitives and screens not in the v0 export --- */
.brand { height: 79px; display: flex; align-items: center; }
.brand img { position: static; width: 124px; left: auto; top: auto; }
.nav-item, .search-launch, .workspace, .profile { color: inherit; }
.plan-card a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #fff;
  border: 1px solid #e9e5f5;
  border-radius: 5px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 600;
}
.option-list a,
.search-results a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border-radius: 6px;
  text-align: left;
  font-size: 13px;
  background: #faf8fd;
}
.option-list a:hover,
.search-results a:hover,
.search-results a:focus-visible { background: var(--purple-soft); }
.option-list a > svg:last-child:not(:first-child),
.search-results a > svg { margin-left: auto; }
.option-list .option-add { color: var(--primary); background: transparent; border: 1px dashed #dcd6f5; }

/* Buttons (shadcn Button: default, outline, sm) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { background: color-mix(in srgb, var(--primary) 88%, #000); filter: none; }
.btn:active { transform: translateY(1px); }
.btn svg { flex-shrink: 0; }
.btn-outline { background: var(--background); color: var(--foreground); border-color: var(--border); }
.btn-outline:hover { background: var(--muted); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.8px; border-radius: 7px; }
.btn-block { width: 100%; height: 38px; }
.btn-danger { background: #c444441a; color: #c44444; }
.btn-danger:hover { background: #c4444433; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.button-row form { display: contents; }
.link-button { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.inline-form { display: inline; }

/* Dialog (shadcn Dialog on a native <dialog>) */
dialog.modal {
  padding: 0;
  border: 0;
  background: transparent;
  width: calc(100% - 2rem);
  max-width: 460px;
  margin: auto;
  overflow: visible;
}
dialog.modal::backdrop { background: rgb(0 0 0 / 0.1); backdrop-filter: blur(4px); }
dialog.modal[open] { animation: modal-in 0.12s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: scale(0.96); } }
.modal-panel {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
  color: var(--foreground);
  font-size: 14px;
  box-shadow: 0 0 0 1px rgb(35 35 49 / 0.1), 0 20px 50px -20px rgb(26 18 59 / 0.25);
}
.modal-header { display: flex; flex-direction: column; gap: 8px; padding-right: 28px; }
.modal-header h2 { font-size: 16px; font-weight: 500; line-height: 1; }
.modal-header p { font-size: 14px; color: var(--muted-foreground); }
.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--muted-foreground);
}
.modal-close:hover { background: var(--muted); color: var(--foreground); }
.modal-details kbd, .help kbd {
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--muted);
}

/* Flash */
.notice { margin-bottom: 20px; }
.notice-alert { color: #c44444; background: #fdf3f3; border-color: #f3d6d6; }
.form-errors {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 7px;
  background: #fdf3f3;
  color: #c44444;
  font-size: 12px;
  line-height: 1.6;
}
.form-errors svg { flex-shrink: 0; margin-top: 2px; }

/* Auth screens (sign in, sign up, add website) */
.auth-body { min-height: 100vh; background: radial-gradient(circle at 50% -20%, #eeebfd, var(--background) 60%); }
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px 16px;
}
.auth-brand img { width: 140px; }
.auth-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 60px -30px #1a123b30;
}
.auth-card .notice { margin: 0; }
.auth-heading h1 { font-size: 22px; margin-top: 8px; }
.auth-heading p { margin-top: 8px; color: var(--muted-foreground); font-size: 13px; line-height: 1.6; }
.auth-card .modal-form { margin-top: 0; }
.auth-card .modal-form label { color: #8b7598; }
.label-row { display: flex; justify-content: space-between; }
.label-row a, .auth-switch a { color: var(--primary); }
.optional { color: var(--muted-foreground); }
.auth-switch { text-align: center; font-size: 12px; color: var(--muted-foreground); }
.auth-footer { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted-foreground); }

/* Empty state for reports without data yet */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 64px 24px;
}
.empty-state h2 { font-size: 17px; }
.empty-state p { max-width: 420px; color: var(--muted-foreground); line-height: 1.7; }

/* Settings */
.settings-stack { display: flex; flex-direction: column; gap: 20px; }
.settings-panel code { font-size: 11px; background: var(--muted); padding: 1px 5px; border-radius: 4px; color: var(--foreground); }
.snippet {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 22px 0 18px;
  padding: 14px;
  max-width: 720px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #faf8fd;
}
.snippet pre { flex: 1; margin: 0; overflow-x: auto; font-size: 12px; line-height: 1.6; }
.snippet pre code { background: none; padding: 0; font-size: 12px; }
.danger-zone > form { margin-top: 22px; }
/* Keep sidebar items at their natural size and scroll on short screens. */
.sidebar { overflow-y: auto; }
.sidebar > * { flex-shrink: 0; }
.panel-heading h2 { font-size: 17px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 11px;
}
.status-live { background: #edf8f1; color: #33815c; }
.status-live .live-dot { margin: 0; }

/* --- Step 3: reports --- */
.toolbar-left form { display: contents; }
.chart-controls form { display: contents; }
.compare-toggle { color: inherit; }
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--primary);
  font-size: 11px;
}
.filter-chip span { color: #8b7bdd; }
.filter-chip:hover { background: #e3defc; }
.filter-clear { font-size: 11px; color: var(--muted-foreground); text-decoration: underline; text-underline-offset: 3px; }

.metric-foot > span.negative,
.negative { display: inline-flex; align-items: center; gap: 1px; color: #c44444; }
.metric-foot > span.trend-new, .metric-foot > span.trend-flat,
.trend-new, .trend-flat { color: var(--muted-foreground); font-size: 9px; }
td .positive, td .negative, td .trend-new, td .trend-flat { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; }
.spark { color: var(--chart-1); }

/* Traffic chart: SVG plot with HTML axis labels */
.traffic-chart {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: 200px 26px;
  height: auto !important;
  padding: 24px 21px 6px 12px;
}
.chart-y {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: -6px 0;
  font-size: 9px;
  color: #afa4b9;
}
.chart-plot { grid-row: 1; grid-column: 2; position: relative; }
.chart-plot svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart-current { fill: none; stroke: var(--chart-1); stroke-width: 2.6; vector-effect: non-scaling-stroke; }
.chart-previous { fill: none; stroke: var(--chart-2); stroke-width: 1.8; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.chart-cursor { stroke: #d9d3ec; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-x { grid-row: 2; grid-column: 2; position: relative; font-size: 9px; color: #afa4b9; }
.chart-x span { position: absolute; top: 12px; transform: translateX(-50%); white-space: nowrap; }
.chart-x span:first-child { transform: none; }
.chart-x span:last-child { transform: translateX(-100%); }
.chart-tooltip {
  position: absolute;
  top: 0;
  display: grid;
  gap: 4px;
  min-width: 128px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px -12px #1a123b40;
  font-size: 11px;
  pointer-events: none;
}
.chart-tooltip > span { display: flex; align-items: center; gap: 6px; color: var(--muted-foreground); }
.chart-tooltip > span b { margin-left: auto; color: var(--foreground); }

/* Donut */
.donut svg { display: block; }
.donut-slice.dot-0 { stroke: var(--chart-1); background: none; }
.donut-slice.dot-1 { stroke: var(--chart-2); background: none; }
.donut-slice.dot-2 { stroke: var(--chart-3); background: none; }
.device-legend > a { display: flex; align-items: center; gap: 7px; color: #ab9ab5; font-size: 10px; }
.device-legend > a b { margin-left: auto; }

.flag-symbol { font-size: 12px; border: 0; background: none; }
.wide-table .row-name { color: inherit; }
.wide-table a.row-name:hover span:last-child { color: var(--primary); }
.data-row[href="#"] { cursor: default; }
.realtime-bars span { min-height: 1px; flex: 0 0 12px; transition: height 0.3s; }
.realtime-bars { gap: 4px; }

/* Goals, funnels and saved reports */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #a695b1;
}
.icon-button:hover:not(:disabled) { background: var(--accent); color: var(--foreground); }
.icon-button:disabled { opacity: 0.35; cursor: default; }
.goal-card code,
.funnel-label code {
  font-size: 11px;
  background: #f7f3fa;
  border-radius: 4px;
  padding: 1px 5px;
}
.goal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  font-size: 11px;
  color: #9f8faa;
}
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.funnel-panel + .funnel-panel { margin-top: 18px; }
.funnel-label b { display: inline-flex; align-items: center; gap: 6px; }
.funnel-label b svg { color: #a28ae8; }
.step-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  counter-reset: step;
}
.step-field {
  display: grid;
  grid-template-columns: 22px 92px 1fr 28px;
  align-items: center;
  gap: 8px;
  counter-increment: step;
}
.step-field::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f0eafa;
  color: #8b70cf;
  font-size: 10px;
}
.modal-form .step-field select { padding: 10px 8px; }
.modal-form > .btn-sm { align-self: flex-start; }
.report-heading > .button_to,
.report-heading > form { margin-left: auto; }
.goal-card progress {
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #f0eafa;
}
.goal-card progress::-webkit-progress-bar { background: #f0eafa; border-radius: 999px; }
.goal-card progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
.goal-card progress::-moz-progress-bar { background: var(--primary); border-radius: 999px; }

/* --- Landing page (public root) --- */
.landing-body { min-height: 100vh; background: radial-gradient(circle at 50% -10%, #eeebfd, var(--background) 55%) no-repeat; font-size: 14px; }
.landing-nav,
.landing-hero,
.landing-preview,
.landing-section,
.landing-cta,
.landing-footer { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.landing-brand img { width: 124px; }
.landing-nav nav { display: flex; align-items: center; gap: 22px; }
.landing-nav-link { font-size: 13px; color: #6f6a7b; }
.landing-nav-link:hover { color: var(--foreground); }
.btn-lg { height: 42px; padding: 0 18px; font-size: 14px; border-radius: 10px; }

.landing-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 72px; padding-bottom: 56px; }
.landing-hero .eyebrow { font-size: 10px; margin-bottom: 18px; color: var(--primary); }
.landing-hero h1 { font-size: clamp(34px, 6vw, 56px); letter-spacing: -2px; line-height: 1.05; }
.landing-lead { max-width: 560px; margin-top: 20px; font-size: 16px; line-height: 1.65; color: #6f6a7b; }
.landing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.landing-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 22px; font-size: 12px; color: var(--muted-foreground); }
.landing-checks li { display: flex; align-items: center; gap: 6px; }
.landing-checks svg { color: var(--success); }

.landing-preview { padding-bottom: 96px; }
.landing-window { border: 1px solid var(--border); border-radius: 14px; background: var(--background); box-shadow: 0 40px 90px -40px #1a123b40; overflow: hidden; }
.landing-window-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: #fff; }
.landing-window-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.landing-window-body { padding: 22px; }
.landing-window-body .traffic-panel { margin-bottom: 0; }

.landing-section { padding-block: 72px; border-top: 1px solid var(--border); }
.landing-section-heading { max-width: 560px; }
.landing-section-heading .eyebrow { font-size: 10px; color: var(--primary); }
.landing-section-heading h2 { font-size: 28px; letter-spacing: -0.8px; line-height: 1.2; }
.landing-section-heading p { margin-top: 14px; font-size: 15px; line-height: 1.7; color: #6f6a7b; }
.landing-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.landing-feature { padding: 22px 20px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.landing-feature-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; background: var(--purple-soft); color: var(--primary); }
.landing-feature h3 { margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
.landing-feature p { font-size: 13px; line-height: 1.6; color: var(--muted-foreground); }

.landing-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.landing-list { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; font-size: 14px; color: #6f6a7b; }
.landing-list li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.landing-list svg { margin-top: 2px; color: var(--primary); flex-shrink: 0; }
.landing-list b { color: var(--foreground); font-weight: 600; }
.landing-code { padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 60px -30px #1a123b30; min-width: 0; }
.landing-code-head { display: flex; gap: 14px; align-items: flex-start; }
.landing-code-head h3 { font-size: 15px; font-weight: 600; }
.landing-code-head p { margin-top: 4px; font-size: 13px; color: var(--muted-foreground); }
.landing-code-head code { font-size: 12px; background: var(--muted); padding: 1px 5px; border-radius: 4px; }
.landing-code pre { margin: 20px 0 16px; padding: 16px; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: #faf8fd; font-size: 12px; line-height: 1.7; }
.landing-code-foot { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted-foreground); }
.landing-code-foot svg { color: var(--success); flex-shrink: 0; }

.landing-cta { display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: 80px; border-top: 1px solid var(--border); }
.landing-cta h2 { font-size: 30px; letter-spacing: -0.8px; }
.landing-cta p { margin-top: 12px; font-size: 15px; color: #6f6a7b; }

.landing-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-block: 28px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); }
.landing-footer > span { display: flex; align-items: center; gap: 6px; }
.landing-footer-logo { width: 92px; }
.landing-footer nav { display: flex; gap: 18px; }
.landing-footer a:hover { color: var(--foreground); }

@media (max-width: 1000px) {
  .landing-features { grid-template-columns: repeat(2, 1fr); }
  .landing-split { grid-template-columns: 1fr; gap: 36px; }
  .landing-window-body .metrics { grid-template-columns: repeat(2, 1fr); }
  .landing-window-body .metric:nth-child(2) { border-right: 0; }
  .landing-window-body .metric:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .landing-nav, .landing-hero, .landing-preview, .landing-section, .landing-cta, .landing-footer { padding-inline: 16px; }
  .landing-nav .landing-nav-link[href^="#"] { display: none; }
  .landing-nav nav { gap: 14px; }
  .landing-hero { padding-top: 40px; }
  .landing-features { grid-template-columns: 1fr; }
  .landing-window-body { padding: 12px; }
  .landing-window-body .chart-legend { display: none; }
  .landing-section { padding-block: 56px; }
}
