/*
 * 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;
}
.main-footer > span:first-child { margin-right: auto; }
.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: var(--background); }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; }
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 40px 24px;
  background: radial-gradient(circle at 0% 0%, #f1eefe, transparent 45%);
}
.auth-brand img { width: 132px; }
.auth-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: auth-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes auth-in { from { opacity: 0; transform: translateY(10px); } }
.auth-card .notice { margin: 0; }
.auth-heading .eyebrow { color: var(--primary); font-size: 10px; }
.auth-heading h1 { font-size: 28px; letter-spacing: -0.8px; margin-top: 8px; }
.auth-heading p { margin-top: 8px; color: var(--muted-foreground); font-size: 14px; line-height: 1.6; }
.auth-card .modal-form { margin-top: 0; }
.auth-card .modal-form label { color: #6f6a7b; font-size: 12.5px; font-weight: 500; }
.auth-card .modal-form input { height: 42px; padding: 0 13px; font-size: 14px; border-radius: 9px; transition: border-color 0.15s, box-shadow 0.15s; }
.auth-card .modal-form input:hover { border-color: #d9d6e4; }
.auth-card .modal-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); outline: none; }
.auth-card .btn-block { height: 42px; font-size: 14px; border-radius: 9px; box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--primary) 80%, transparent); }
.input-reveal { position: relative; display: block; }
.auth-card .input-reveal input { width: 100%; padding-right: 42px; }
.input-reveal-button { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; color: var(--muted-foreground); }
.input-reveal-button:hover { color: var(--foreground); background: var(--muted); }
.input-reveal-button .icon-hide, .input-reveal-button[aria-pressed="true"] .icon-show { display: none; }
.input-reveal-button[aria-pressed="true"] .icon-hide { display: block; }

.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  margin: 12px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 10%, #8f7ff5 0%, transparent 45%),
    radial-gradient(circle at 10% 95%, #3d2fb8 0%, transparent 50%),
    linear-gradient(150deg, #6155e8, #4a3dd1);
}
.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#ffffff12 1px, transparent 1px), linear-gradient(90deg, #ffffff12 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
}
.auth-aside-inner { position: relative; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 36px; }
.auth-aside-copy h2 { margin-top: 18px; font-size: 30px; line-height: 1.15; letter-spacing: -1px; font-weight: 600; }
.auth-aside-copy p { margin-top: 14px; font-size: 14.5px; line-height: 1.65; color: #ffffffc4; }
.auth-showcase { display: grid; gap: 12px; }
.auth-showcase-card { padding: 18px; border-radius: 14px; background: #fff; color: var(--foreground); box-shadow: 0 24px 50px -24px #120a4d80; animation: float 7s ease-in-out infinite; }
.auth-showcase-card .spark { width: 100%; height: 46px; margin-top: 10px; }
.auth-showcase-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.auth-showcase-row > span { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; }
.auth-showcase-row strong { font-size: 28px; font-weight: 500; letter-spacing: -1px; }
.auth-showcase-card.is-small { display: flex; align-items: center; gap: 12px; width: max-content; max-width: 100%; padding: 12px 16px 12px 12px; animation-delay: -2.5s; }
.auth-showcase-card.is-offset { justify-self: end; animation-delay: -5s; }
.auth-showcase-card.is-small strong { display: block; font-size: 13px; }
.auth-showcase-card small { display: block; font-size: 11.5px; color: var(--muted-foreground); }
.auth-aside-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12.5px; color: #ffffffd9; }
.auth-aside-checks li { display: flex; align-items: center; gap: 6px; }

@media (max-width: 960px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { background: radial-gradient(circle at 50% -10%, #eeebfd, var(--background) 60%); }
  .auth-card { padding: 28px 24px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 60px -30px #1a123b30; }
}
.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); }
.auth-meta { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* "Powered by thistinct" in the landing, sign-in and dashboard footers */
.powered-by { display: inline-flex; align-items: center; gap: 6px; color: #a9a3b3; font-size: 11px; white-space: nowrap; }
.powered-by:hover { color: var(--foreground); }
.thistinct-logo { width: auto; height: 10px; color: #8d8a97; transform: translateY(1px); }
.powered-by:hover .thistinct-logo { color: var(--foreground); }
.main-footer .powered-by { font-size: 9px; color: #b1a5bb; }
.main-footer .thistinct-logo { height: 8px; color: #a397ad; }

/* 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: var(--background); font-size: 14px; overflow-x: clip; }
.landing-nav,
.landing-hero,
.landing-preview,
.landing-stats,
.landing-section,
.landing-cta-wrap,
.landing-footer { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; border-radius: 11px; }
.btn-arrow { transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }
.btn { transition: background 0.15s, color 0.15s, box-shadow 0.2s, transform 0.2s; }
.btn-glow { box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--primary) 85%, transparent), inset 0 1px 0 #ffffff33; }
.btn-glow:hover { box-shadow: 0 14px 32px -12px color-mix(in srgb, var(--primary) 95%, transparent), inset 0 1px 0 #ffffff33; transform: translateY(-1px); }
.text-gradient { background: linear-gradient(100deg, #6155e8 10%, #8f6ff0 55%, #b48cf2); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Header: sticky, picks up a frosted background once the page scrolls */
.landing-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s; }
.landing-header.is-scrolled { background: color-mix(in srgb, var(--background) 78%, transparent); border-color: var(--border); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.landing-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.landing-brand img { width: 118px; }
.landing-nav nav { display: flex; align-items: center; gap: 24px; }
.landing-nav-link { position: relative; font-size: 13px; color: #6f6a7b; transition: color 0.15s; }
.landing-nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; border-radius: 2px; background: var(--primary); transform: scaleX(0); transition: transform 0.2s ease; }
.landing-nav-link:hover { color: var(--foreground); }
.landing-nav-link:hover::after { transform: scaleX(1); }

/* Hero */
.landing-hero { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 84px; padding-bottom: 64px; }
.landing-hero-glow { position: absolute; inset: -140px 0 auto; height: 640px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side at 30% 45%, #d9d2fc, transparent),
    radial-gradient(closest-side at 70% 40%, #ece4fd, transparent),
    linear-gradient(#eae8f7 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, #eae8f7 1px, transparent 1px) 0 0 / 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 35%, #000 25%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 25%, transparent 70%);
}
.landing-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border: 1px solid #e2ddf8; border-radius: 999px; background: #ffffffb3; font-size: 12px; color: #5d5870; box-shadow: 0 4px 14px -8px #1a123b30; backdrop-filter: blur(6px); }
.landing-pill.is-dark { border-color: #ffffff38; background: #ffffff1a; color: #fff; box-shadow: none; }
.live-dot { position: relative; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2fbf8f; flex-shrink: 0; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
.landing-hero h1 { margin-top: 26px; font-size: clamp(38px, 6.4vw, 68px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.02; }
.landing-lead { max-width: 580px; margin-top: 22px; font-size: 17px; line-height: 1.65; color: #6f6a7b; }
.landing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.landing-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 24px; font-size: 12px; color: var(--muted-foreground); }
.landing-checks li { display: flex; align-items: center; gap: 6px; }
.landing-checks svg { color: var(--success); }
.hero-in { animation: hero-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms) both; }
@keyframes hero-in { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }

/* Dashboard preview */
.landing-preview { padding-bottom: 72px; }
.landing-stage { position: relative; }
.landing-stage::before { content: ""; position: absolute; inset: 8% 6% -4%; z-index: -1; border-radius: 40px; background: linear-gradient(120deg, #7761e9, #b48cf2 50%, #6155e8); filter: blur(70px); opacity: 0.28; }
.landing-window { border: 1px solid #e3e0ef; border-radius: 16px; background: var(--background); box-shadow: 0 50px 100px -40px #1a123b55, 0 0 0 6px #ffffff80; overflow: hidden; }
.landing-window-bar { position: relative; display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: #fff; }
.landing-window-bar > span { width: 10px; height: 10px; border-radius: 50%; background: #ece9f3; }
.landing-window-bar > span:nth-child(1) { background: #ff8f87; }
.landing-window-bar > span:nth-child(2) { background: #fbcd5a; }
.landing-window-bar > span:nth-child(3) { background: #5fd38b; }
.landing-window-url { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; padding: 3px 14px; border-radius: 7px; background: var(--muted); font-size: 11px; color: var(--muted-foreground); }
.landing-window-body { padding: 22px; }
.landing-window-body .traffic-panel { margin-bottom: 0; }
.landing-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border: 1px solid #ffffffcc; border-radius: 14px; background: #ffffffe6; backdrop-filter: blur(10px); box-shadow: 0 24px 50px -22px #1a123b50; animation: float 7s ease-in-out infinite; }
.landing-float strong { display: block; font-size: 13px; }
.landing-float small { display: block; font-size: 11.5px; color: var(--muted-foreground); }
.landing-float .positive { font-size: inherit; }
.landing-float-left { left: -34px; top: 34%; }
.landing-float-right { right: -30px; bottom: 16%; animation-delay: -3.5s; }
.landing-float-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--purple-soft); color: var(--primary); flex-shrink: 0; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
/* The chart draws itself in once the preview is revealed */
.reveal-ready .landing-stage .chart-plot svg { clip-path: inset(0 100% 0 0); transition: clip-path 1.6s cubic-bezier(0.5, 0, 0.2, 1) 0.35s; }
.reveal-ready .landing-stage.is-visible .chart-plot svg { clip-path: inset(0 0 0 0); }

/* Stats strip */
.landing-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-bottom: 88px; }
.landing-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; text-align: center; }
.landing-stat strong { font-size: 30px; font-weight: 600; letter-spacing: -1px; background: linear-gradient(180deg, var(--foreground), #5c5870); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-stat span { font-size: 12.5px; color: var(--muted-foreground); }
.landing-stat + .landing-stat { border-left: 1px solid var(--border); }

/* Sections */
.landing-section { padding-block: 96px; }
.landing-section-heading { max-width: 560px; }
.landing-section-heading.is-centered { margin-inline: auto; text-align: center; }
.landing-section-heading .eyebrow { font-size: 10.5px; color: var(--primary); }
.landing-section-heading h2 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.12; }
.landing-section-heading p { margin-top: 16px; font-size: 16px; line-height: 1.7; color: #6f6a7b; }
#features { border-top: 1px solid var(--border); }

/* Feature bento grid */
.landing-bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 52px; }
.landing-feature { position: relative; overflow: hidden; padding: 24px 22px; background: #fff; border: 1px solid var(--border); border-radius: 16px; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.landing-feature::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0% 0%, #f1eefe, transparent 55%); opacity: 0; transition: opacity 0.25s ease; pointer-events: none; }
.landing-feature > * { position: relative; }
.landing-feature:hover { transform: translateY(-3px); border-color: #ddd6fb; box-shadow: 0 22px 44px -26px #2b1a8a40; }
.landing-feature:hover::before { opacity: 1; }
.landing-feature-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--purple-soft); color: var(--primary); transition: background 0.25s, color 0.25s, transform 0.25s; }
.landing-feature:hover .landing-feature-icon { background: var(--primary); color: #fff; transform: rotate(-6deg); }
.landing-feature h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 6px; font-size: 15px; font-weight: 600; }
.landing-feature p { font-size: 13px; line-height: 1.6; color: var(--muted-foreground); }
.landing-feature.is-wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end; }
.landing-feature.is-half { grid-column: span 2; display: flex; gap: 16px; align-items: flex-start; }
.landing-feature.is-half h3 { margin-top: 6px; }
.landing-live { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: #e6f6ef; color: var(--success); font-size: 10.5px; font-weight: 600; }
.landing-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.landing-bars span { flex: 1; height: var(--h); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--chart-1), var(--chart-2)); transform-origin: bottom; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i) * 45ms + 0.2s); }
.landing-feature:hover .landing-bars span:last-child { filter: brightness(1.1); }
.landing-funnel { display: flex; flex-direction: column; gap: 8px; }
.landing-funnel div { position: relative; display: flex; justify-content: space-between; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12px; color: var(--foreground); }
.landing-funnel div::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 8px; background: linear-gradient(90deg, var(--chart-3), var(--chart-2)); transform-origin: left; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i) * 90ms + 0.2s); z-index: -1; }
.landing-funnel div { z-index: 0; background: var(--muted); }
.landing-funnel b { font-weight: 600; color: var(--primary); }
.reveal-ready .landing-feature:not(.is-visible) .landing-bars span { transform: scaleY(0.08); }
.reveal-ready .landing-feature:not(.is-visible) .landing-funnel div::before { transform: scaleX(0); }

/* Privacy: dark band */
.landing-dark { position: relative; overflow: hidden; background: #17142b; color: #f3f1fa; }
.landing-dark::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, #6155e838, transparent 40%),
    radial-gradient(circle at 90% 90%, #b48cf229, transparent 45%);
}
.landing-dark .landing-section { position: relative; }
.landing-dark .landing-section-heading .eyebrow { color: #a99cf7; }
.landing-dark .landing-section-heading p,
.landing-dark .landing-list { color: #b9b4cc; }
.landing-dark .landing-list b { color: #fff; }
.landing-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.landing-list { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; font-size: 14px; color: #6f6a7b; }
.landing-list li { display: flex; align-items: center; gap: 12px; line-height: 1.5; }
.landing-list-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #ffffff12; border: 1px solid #ffffff1c; color: #c3b8ff; flex-shrink: 0; }
.landing-list b { color: var(--foreground); font-weight: 600; }
.landing-code { padding: 26px; border: 1px solid #ffffff1f; border-radius: 18px; background: linear-gradient(180deg, #ffffff12, #ffffff08); box-shadow: 0 40px 80px -40px #000; min-width: 0; }
.landing-code-head { display: flex; gap: 14px; align-items: flex-start; }
.landing-code .landing-feature-icon { background: #6155e8; color: #fff; }
.landing-code-head h3 { font-size: 15.5px; font-weight: 600; color: #fff; }
.landing-code-head p { margin-top: 4px; font-size: 13px; color: #b9b4cc; }
.landing-code-head code { font-size: 12px; background: #ffffff1a; padding: 1px 5px; border-radius: 4px; color: #e7e3f7; }
.landing-code-block { position: relative; margin: 20px 0 18px; }
.landing-code pre { margin: 0; padding: 18px 16px; overflow-x: auto; border: 1px solid #ffffff17; border-radius: 10px; background: #0e0c1c; font-size: 12px; line-height: 1.75; color: #d8d2ff; }
.landing-copy { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px; background: #ffffff14; border: 1px solid #ffffff1f; color: #d6d1ea; font-size: 11px; transition: background 0.15s, color 0.15s; }
.landing-copy:hover { background: #ffffff26; color: #fff; }
.landing-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; font-size: 13px; color: #d6d1ea; }
.landing-steps li { display: flex; align-items: center; gap: 10px; }
.landing-steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #ffffff14; font-size: 11px; font-weight: 600; color: #c3b8ff; }
.landing-code-foot { display: flex; align-items: center; gap: 7px; padding-top: 16px; border-top: 1px solid #ffffff17; font-size: 12px; color: #9f99b5; }
.landing-code-foot svg { color: #5fd3a5; flex-shrink: 0; }

/* Closing call to action */
.landing-cta-wrap { padding-block: 96px; }
.landing-cta { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 72px 24px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(circle at 15% 0%, #8f7ff5, transparent 50%),
    radial-gradient(circle at 90% 100%, #3d2fb8, transparent 55%),
    linear-gradient(135deg, #6155e8, #5145d6);
  box-shadow: 0 40px 80px -40px #4a3dd1aa;
}
.landing-cta::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(#ffffff14 1px, transparent 1px), linear-gradient(90deg, #ffffff14 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 70%); }
.landing-cta > * { position: relative; }
.landing-cta h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.035em; }
.landing-cta p { margin-top: 12px; font-size: 16px; color: #ffffffcc; }
.btn-light { background: #fff; color: var(--primary); box-shadow: 0 10px 24px -12px #120a4d99; }
.btn-light:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 14px 30px -12px #120a4dbb; }
.btn-ghost-light { background: #ffffff14; color: #fff; border-color: #ffffff40; }
.btn-ghost-light:hover { background: #ffffff26; }

.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 a:hover { color: var(--foreground); }

/* Scroll reveal (see reveal_controller.js). Only hidden once JS is running. */
.reveal-ready [data-reveal] { transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms); }
.reveal-ready [data-reveal].landing-feature { transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms), box-shadow 0.25s ease, border-color 0.25s ease; }
.reveal-ready [data-reveal]:not(.is-visible) { opacity: 0; transform: translateY(28px); }
.reveal-ready [data-reveal="left"]:not(.is-visible) { transform: translateX(-32px); }
.reveal-ready [data-reveal="right"]:not(.is-visible) { transform: translateX(32px); }
.reveal-ready [data-reveal="zoom"]:not(.is-visible) { transform: translateY(40px) scale(0.96); }
.reveal-ready [data-reveal].is-visible.landing-feature:hover { transition-delay: 0ms; }

@media (max-width: 1000px) {
  .landing-bento { grid-template-columns: repeat(2, 1fr); }
  .landing-feature.is-wide, .landing-feature.is-half { grid-column: span 2; }
  .landing-split { grid-template-columns: 1fr; gap: 40px; }
  .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); }
  .landing-float { display: none; }
  .landing-stats { grid-template-columns: repeat(2, 1fr); }
  .landing-stat:nth-child(3) { border-left: 0; }
}
@media (max-width: 640px) {
  .landing-nav, .landing-hero, .landing-preview, .landing-stats, .landing-section, .landing-cta-wrap, .landing-footer { padding-inline: 16px; }
  .landing-nav .landing-nav-link[href^="#"] { display: none; }
  .landing-nav nav { gap: 14px; }
  .landing-hero { padding-top: 48px; }
  .landing-lead { font-size: 15.5px; }
  .landing-bento { grid-template-columns: 1fr; }
  .landing-feature.is-wide, .landing-feature.is-half { grid-column: auto; grid-template-columns: 1fr; }
  .landing-window-body { padding: 12px; }
  .landing-window-url { display: none; }
  .landing-window-body .chart-legend { display: none; }
  .landing-section, .landing-cta-wrap { padding-block: 64px; }
  .landing-stats { padding-bottom: 56px; }
  .landing-stat strong { font-size: 24px; }
  .landing-cta { padding: 52px 20px; border-radius: 20px; }
  .landing-code { padding: 20px; }
  .landing-code pre { padding-top: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot::after { display: none; }
}

/* Account approval: waiting screen and the admin area (/admin) */
.approval-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--purple-soft);
  color: var(--primary);
}
.approval-icon.is-rejected { background: #fdf3f3; color: #c44444; }
.approval-heading strong { color: var(--foreground); font-weight: 600; }
.rejection-reason {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #f3d6d6;
  background: #fdf8f8;
  border-radius: 6px;
  color: #8f5050;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-line;
}

.admin-body { min-height: 100vh; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 31px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.admin-brand { display: flex; align-items: center; gap: 10px; }
.admin-brand img { width: 104px; }
.admin-topbar-links { display: flex; align-items: center; gap: 18px; font-size: 12.5px; color: var(--muted-foreground); }
.admin-topbar-links a, .admin-topbar-links button { display: inline-flex; align-items: center; gap: 6px; }
.admin-topbar-links a:hover, .admin-topbar-links button:hover { color: var(--foreground); }
.admin-main { max-width: 1040px; margin: 0 auto; padding: 30px 31px 0; }
.admin-panel { margin-bottom: 30px; overflow: visible; }
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.admin-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  color: var(--muted-foreground);
  font-size: 12.5px;
}
.admin-tab span { padding: 1px 7px; border-radius: 999px; background: var(--muted); font-size: 11px; }
.admin-tab:hover { color: var(--foreground); }
.admin-tab.active { background: var(--purple-soft); color: var(--primary); }
.admin-tab.active span { background: #fff; }
.admin-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  width: 260px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted-foreground);
}
.admin-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 12.5px; color: var(--foreground); }
.admin-users > li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.admin-users > li:last-child { border-bottom: 0; }
.admin-user { flex: 1; min-width: 0; }
.admin-user p { margin-top: 3px; color: var(--muted-foreground); font-size: 12px; overflow-wrap: anywhere; }
.admin-user .admin-meta { font-size: 11px; color: #a9a3b3; }
.admin-user-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; }
.approval-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 10.5px;
}
.approval-tag.is-pending { background: #fdf5e6; color: #a8701b; }
.approval-tag.is-approved { background: #edf8f1; color: #33815c; }
.approval-tag.is-rejected { background: #fdf3f3; color: #c44444; }
.admin-actions { position: relative; display: flex; align-items: flex-start; gap: 6px; flex-shrink: 0; }
.admin-actions form { display: inline; }
.admin-actions .btn-sm { gap: 5px; }
.admin-reject summary { list-style: none; }
.admin-reject summary::-webkit-details-marker { display: none; }
.admin-reject-form {
  position: absolute;
  z-index: 5;
  right: 0;
  top: 34px;
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  width: 280px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 50px -24px #1a123b55;
  font-size: 12px;
  color: var(--muted-foreground);
}
.admin-reject-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  resize: vertical;
  color: var(--foreground);
}
.admin-reject-form .btn { align-self: flex-end; }
.nav-count {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10.5px;
}
@media (max-width: 640px) {
  .admin-topbar { padding: 0 16px; }
  .admin-main { padding: 22px 16px 0; }
  .admin-users > li { flex-wrap: wrap; }
  .admin-actions { width: 100%; padding-left: 46px; }
  .admin-reject-form { left: 0; right: auto; }
  .admin-topbar-links span { display: none; }
}
.auth-heading .auth-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: var(--purple-soft); color: #5a4fc4; font-size: 12.5px; line-height: 1.55; }
.auth-heading .auth-note svg { flex-shrink: 0; margin-top: 2px; }
