:root {
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.56);
  --surface-strong: rgba(255, 255, 255, 0.72);
  --ink: #1d1d1f;
  --muted: rgba(29, 29, 31, 0.62);
  --soft: rgba(29, 29, 31, 0.46);
  --line: rgba(255, 255, 255, 0.62);
  --line-strong: rgba(29, 29, 31, 0.11);
  --purple: #6157f4;
  --purple-deep: #2d2a78;
  --green: #31d158;
  --glass-border: rgba(255, 255, 255, 0.74);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(255, 255, 255, 0.26),
    0 18px 46px rgba(31, 37, 54, 0.08);
  --shadow: 0 26px 80px rgba(31, 37, 54, 0.11);
  --shadow-soft:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 36px rgba(31, 37, 54, 0.065);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: #f4f7fb;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(246, 250, 255, 0.98) 0%, rgba(239, 244, 251, 0.98) 42%, rgba(249, 252, 250, 0.98) 100%),
    #f4f7fb;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    conic-gradient(from 210deg at 18% 10%, rgba(97, 87, 244, 0.15), rgba(49, 209, 88, 0.06), rgba(0, 180, 255, 0.12), rgba(255, 255, 255, 0.2), rgba(97, 87, 244, 0.15)),
    linear-gradient(115deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.12) 46%, rgba(255, 255, 255, 0.78));
  filter: saturate(1.2);
  opacity: 0.88;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.36), transparent 72%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 72px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 56px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 8px 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
    rgba(255, 255, 255, 0.58);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(28px) saturate(1.45);
  -webkit-backdrop-filter: blur(28px) saturate(1.45);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  justify-self: start;
}

.brand span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.26), transparent 36%),
    linear-gradient(145deg, #7470ff, #3f3bbf);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 10px 24px rgba(97, 87, 244, 0.24);
  font-size: 13px;
  font-weight: 800;
}

.brand strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.topbar nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.topbar nav a {
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.topbar nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(31, 37, 54, 0.06);
}

.status,
.logout {
  display: inline-flex;
  align-items: center;
}

.logout {
  justify-self: end;
  gap: 8px;
  margin: 0;
}

.status {
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 700;
}

.logout button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.logout button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 20px rgba(31, 37, 54, 0.07);
  transform: translateY(-1px);
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(49, 209, 88, 0.14);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: end;
  gap: 24px;
  padding: 40px 0 22px;
}

.hero p,
.panel span,
.insight-row span {
  margin: 0;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 8px 0 0;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.04;
}

.hero-summary {
  position: relative;
  display: grid;
  gap: 7px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 15px 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.36)),
    rgba(255, 255, 255, 0.48);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  overflow: hidden;
}

.hero-summary::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 42%);
  pointer-events: none;
}

.hero-summary span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-summary strong {
  color: var(--ink);
  font-size: 32px;
  font-weight: 760;
  line-height: 0.95;
}

.hero-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.date-selector {
  position: relative;
  display: grid;
  gap: 13px;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  padding: 15px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.42) 46%, rgba(235, 245, 255, 0.56)),
    rgba(255, 255, 255, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(255, 255, 255, 0.34),
    0 24px 60px rgba(31, 37, 54, 0.12);
  backdrop-filter: blur(34px) saturate(1.55);
  -webkit-backdrop-filter: blur(34px) saturate(1.55);
  isolation: isolate;
  overflow: hidden;
}

.date-selector::before {
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 82% 8%, rgba(97, 87, 244, 0.18), transparent 34%),
    radial-gradient(circle at 8% 100%, rgba(49, 209, 88, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 48%);
  content: "";
  pointer-events: none;
}

.range-selector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.date-selector label {
  display: grid;
  gap: 7px;
}

.date-selector span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.04em;
}

.range-selector-head strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 820;
  line-height: 1;
}

.quick-ranges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 19px;
  padding: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.2)),
    rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    inset 0 -1px 0 rgba(29, 29, 31, 0.04);
}

.date-selector .quick-ranges a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  color: rgba(29, 29, 31, 0.62);
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 13px;
  font-weight: 780;
  text-align: center;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.date-selector .quick-ranges a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(31, 37, 54, 0.05);
}

.date-selector .quick-ranges a.is-active {
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(135deg, #6d64ff, #2d2a78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 10px 22px rgba(97, 87, 244, 0.24);
  transform: translateY(-1px);
}

.calendar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 10px;
  align-items: end;
}

.date-selector input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 15px;
  padding: 0 12px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(31, 37, 54, 0.04);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.date-selector input:focus {
  border-color: rgba(97, 87, 244, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 0 0 4px rgba(97, 87, 244, 0.12);
}

.date-selector button {
  min-height: 44px;
  border: 0;
  border-radius: 15px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #6d64ff, #2d2a78);
  box-shadow: 0 12px 24px rgba(97, 87, 244, 0.22);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.date-selector .date-apply {
  padding: 0 14px;
}


.heat-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 98px;
  border-color: rgba(255, 255, 255, 0.82);
}

.heat-summary::after {
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(97, 87, 244, 0.1);
  content: "";
  filter: blur(18px);
  pointer-events: none;
}

.heat-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.heat-head b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 780;
  letter-spacing: 0;
}

.heat-summary .heat-flame {
  position: relative;
  z-index: 1;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.22)),
    rgba(255, 255, 255, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 28px rgba(31, 37, 54, 0.08);
  font-size: 0;
  line-height: 1;
}

.heat-summary p {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
}

.heat-level-0 .heat-flame::before {
  color: rgba(29, 29, 31, 0.28);
  content: "·";
  font-size: 30px;
  transform: translateY(-2px);
}

.heat-level-1 {
  border-color: rgba(255, 165, 46, 0.46);
  background:
    linear-gradient(135deg, rgba(255, 246, 226, 0.72), rgba(255, 255, 255, 0.4)),
    rgba(255, 255, 255, 0.5);
}

.heat-level-1 .heat-flame::before {
  content: "🔥";
  font-size: 26px;
  filter: drop-shadow(0 8px 14px rgba(255, 119, 35, 0.22));
}

.heat-level-2 {
  border-color: rgba(255, 132, 41, 0.58);
  background:
    linear-gradient(135deg, rgba(255, 236, 211, 0.78), rgba(255, 255, 255, 0.36)),
    rgba(255, 255, 255, 0.5);
}

.heat-level-2 .heat-flame {
  width: 62px;
  height: 62px;
  border-radius: 20px;
}

.heat-level-2 .heat-flame::before {
  content: "🔥";
  font-size: 34px;
  filter: drop-shadow(0 10px 18px rgba(255, 105, 20, 0.28));
}

.heat-level-3 {
  border-color: rgba(255, 93, 50, 0.68);
  background:
    radial-gradient(circle at 82% 24%, rgba(255, 115, 54, 0.28), transparent 38%),
    linear-gradient(135deg, rgba(255, 226, 202, 0.84), rgba(255, 255, 255, 0.34)),
    rgba(255, 255, 255, 0.52);
}

.heat-level-3::after {
  background: rgba(255, 109, 45, 0.28);
}

.heat-level-3 .heat-flame {
  width: 70px;
  height: 70px;
  border-radius: 22px;
}

.heat-level-3 .heat-flame::before {
  content: "🔥";
  font-size: 42px;
  filter: drop-shadow(0 12px 24px rgba(255, 75, 28, 0.34));
}

.owner-overview {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

.owner-card,
.insight-row article,
.panel {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.34)),
    var(--surface);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(26px) saturate(1.36);
  -webkit-backdrop-filter: blur(26px) saturate(1.36);
}

.owner-card {
  position: relative;
  display: grid;
  min-height: 142px;
  padding: 20px;
  overflow: hidden;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.owner-card::before,
.panel::before,
.ops-snapshot article::before,
.insight-row article::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius) - 1px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0) 38%),
    linear-gradient(320deg, rgba(97, 87, 244, 0.08), transparent 46%);
  opacity: 0.72;
  pointer-events: none;
}

.owner-card:hover,
.ops-snapshot article:hover,
.panel:hover {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(255, 255, 255, 0.32),
    0 24px 68px rgba(31, 37, 54, 0.12);
  transform: translateY(-2px);
}

.owner-card.primary {
  grid-column: span 4;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(145deg, rgba(97, 87, 244, 0.95), rgba(38, 35, 111, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 24px 70px rgba(97, 87, 244, 0.24);
}

.owner-card:nth-child(2) {
  grid-column: span 4;
}

.owner-card.compact {
  grid-column: span 2;
  min-height: 132px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.32)),
    rgba(255, 255, 255, 0.46);
  box-shadow: var(--shadow-soft);
}

.owner-card span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.owner-card.primary span,
.owner-card.primary p {
  color: rgba(255, 255, 255, 0.68);
}

.owner-card strong {
  position: relative;
  z-index: 1;
  align-self: end;
  margin-top: 18px;
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.9;
}

.owner-card.compact strong {
  font-size: clamp(28px, 3vw, 42px);
}

.owner-card p {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.boss-trend {
  margin-top: 14px;
}

.ops-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.ops-snapshot article {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 138px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.34)),
    rgba(255, 255, 255, 0.48);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(1.34);
  -webkit-backdrop-filter: blur(24px) saturate(1.34);
  overflow: hidden;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.ops-snapshot span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.ops-snapshot strong {
  align-self: end;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.95;
}

.ops-snapshot p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.panel header > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.trend-chart {
  position: relative;
  margin: 22px 24px 24px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 24px;
  padding: 18px 18px 14px;
  background:
    radial-gradient(circle at 24% 12%, rgba(97, 87, 244, 0.26), transparent 32%),
    linear-gradient(145deg, rgba(17, 17, 22, 0.94), rgba(32, 27, 47, 0.94)),
    #16161b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 28px 80px rgba(40, 16, 77, 0.16);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  overflow: hidden;
}

.trend-chart::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.24));
  pointer-events: none;
}

.chart-legend {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i,
.chart-legend b {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 999px;
}

.chart-legend i {
  background: linear-gradient(90deg, #7b4dff, #00d4ff);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.38);
}

.chart-legend b {
  background: linear-gradient(90deg, #31d158, #b7ff5a);
  box-shadow: 0 0 18px rgba(49, 209, 88, 0.36);
}

.trend-chart svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 260px;
  margin-top: 10px;
  overflow: visible;
}

.chart-grid line {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-line.glow {
  filter: url("#lineGlow");
}

.chart-line-pv {
  stroke: url("#pvLine");
}

.chart-line-uv {
  stroke: url("#uvLine");
}

.chart-day {
  outline: none;
  pointer-events: all;
}

.chart-hit-area {
  fill: rgba(255, 255, 255, 0);
  cursor: crosshair;
  pointer-events: all;
}

.chart-focus-line {
  opacity: 0;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-dasharray: 5 7;
  stroke-width: 1.5;
  transition: opacity 160ms ease;
}

.chart-point circle {
  stroke: rgba(22, 22, 27, 0.95);
  stroke-width: 3;
  transition:
    r 160ms ease,
    stroke-width 160ms ease;
}

.chart-point-pv circle {
  fill: #00d4ff;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.8));
}

.chart-point-uv circle {
  fill: #b7ff5a;
  filter: drop-shadow(0 0 8px rgba(49, 209, 88, 0.72));
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.chart-tooltip rect {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.22));
}

.chart-tooltip text {
  fill: rgba(29, 29, 31, 0.66);
  font-size: 12px;
  font-weight: 850;
}

.chart-tooltip .tooltip-date {
  fill: rgba(29, 29, 31, 0.72);
}

.chart-tooltip .tooltip-pv {
  fill: #315dff;
}

.chart-tooltip .tooltip-uv {
  fill: #188a3a;
}

.chart-day:hover .chart-focus-line,
.chart-day:focus .chart-focus-line,
.chart-day:focus-within .chart-focus-line,
.chart-day.is-hover .chart-focus-line {
  opacity: 1;
}

.chart-day:hover .chart-tooltip,
.chart-day:focus .chart-tooltip,
.chart-day:focus-within .chart-tooltip,
.chart-day.is-hover .chart-tooltip {
  opacity: 1;
  transform: translateY(-6px);
}

.chart-day:hover .chart-point circle,
.chart-day:focus .chart-point circle,
.chart-day:focus-within .chart-point circle,
.chart-day.is-hover .chart-point circle {
  r: 7;
  stroke-width: 4;
}

.trend-hover-card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  width: 168px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  padding: 12px 13px;
  opacity: 0;
  color: rgba(29, 29, 31, 0.74);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.trend-hover-card.is-visible {
  opacity: 1;
}

.trend-hover-card > span {
  grid-column: 1 / -1;
  color: rgba(29, 29, 31, 0.64);
  font-size: 12px;
  font-weight: 850;
}

.trend-hover-card strong {
  display: inline-flex;
  justify-content: space-between;
  border-radius: 12px;
  padding: 8px 9px;
  background: rgba(245, 245, 247, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.trend-hover-card strong:first-of-type {
  color: #315dff;
}

.trend-hover-card strong:last-of-type {
  color: #188a3a;
}

.trend-chart text {
  fill: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
}

.trend-values {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.trend-values span {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 9px 8px;
  color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.trend-values strong,
.trend-values b {
  font-size: 13px;
  font-weight: 850;
}

.trend-values strong {
  color: #8eb8ff;
}

.trend-values b {
  color: #b7ff5a;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.insight-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.insight-row article {
  position: relative;
  padding: 26px;
  box-shadow: none;
  overflow: hidden;
}

.insight-row strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 730;
  line-height: 1.05;
}

.insight-row p {
  max-width: 580px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.dashboard-grid > *,
.owner-overview > *,
.ops-snapshot > *,
.insight-row > * {
  min-width: 0;
}

.user-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.panel-wide {
  grid-column: span 1;
}

.panel header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(29, 29, 31, 0.07);
  padding: 22px 24px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.1);
}

.panel h2 {
  margin: 7px 0 0;
  font-size: 21px;
  font-weight: 730;
  letter-spacing: 0;
}

table {
  position: relative;
  z-index: 1;
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid rgba(29, 29, 31, 0.055);
  padding: 15px 24px;
  text-align: left;
  vertical-align: top;
}

tbody tr {
  transition:
    background-color 150ms ease,
    box-shadow 150ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.36);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.34);
  font-size: 12px;
  font-weight: 800;
}

td {
  color: rgba(29, 29, 31, 0.82);
  font-weight: 560;
  line-height: 1.4;
}

.table-pagination {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(29, 29, 31, 0.07);
  padding: 16px 18px 18px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.38)),
    rgba(255, 255, 255, 0.24);
}

.table-pagination p {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-pagination nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.page-number,
.page-step {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 800;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.page-step {
  min-width: 54px;
  padding: 0 12px;
}

.page-number:hover,
.page-step:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(31, 37, 54, 0.07);
  transform: translateY(-1px);
}

.page-number.is-active {
  color: #fff;
  border-color: rgba(29, 29, 31, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 36%),
    var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 24px rgba(29, 29, 31, 0.18);
}

.page-step.is-disabled {
  opacity: 0.42;
  pointer-events: none;
}

td:last-child,
th:last-child {
  text-align: right;
}

.events {
  margin-top: 14px;
}

.intent-panel {
  margin-top: 14px;
}

.events td:last-child,
.events th:last-child {
  text-align: left;
}

.intent-panel td:last-child,
.intent-panel th:last-child {
  text-align: left;
}

code {
  display: inline-flex;
  border: 1px solid rgba(97, 87, 244, 0.14);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--purple-deep);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0)),
    rgba(97, 87, 244, 0.08);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(140deg, rgba(246, 250, 255, 0.96), rgba(237, 243, 255, 0.94) 46%, rgba(249, 253, 250, 0.96)),
    #f4f7fb;
}

.login-shell {
  width: min(520px, calc(100% - 32px));
  padding: 48px 0;
}

.login-card {
  position: relative;
  display: grid;
  gap: 34px;
  border: 1px solid var(--glass-border);
  border-radius: 34px;
  padding: clamp(28px, 5vw, 44px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    rgba(255, 255, 255, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(255, 255, 255, 0.28),
    var(--shadow);
  backdrop-filter: blur(30px) saturate(1.42);
  -webkit-backdrop-filter: blur(30px) saturate(1.42);
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 33px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), transparent 36%),
    linear-gradient(320deg, rgba(97, 87, 244, 0.1), transparent 52%);
  pointer-events: none;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-card .brand {
  justify-self: start;
}

.login-card p {
  margin: 0;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 14px 0 12px;
  font-size: clamp(38px, 8vw, 64px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.96;
}

.login-card div > span {
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 9px;
}

.login-form label span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 0 rgba(255, 255, 255, 0.4);
  font: inherit;
  font-size: 17px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.login-form input:focus {
  border-color: rgba(97, 87, 244, 0.44);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 5px rgba(97, 87, 244, 0.1),
    0 14px 34px rgba(31, 37, 54, 0.08);
}

.login-form button {
  min-height: 52px;
  border: 1px solid rgba(29, 29, 31, 0.18);
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(145deg, #2b2b31, #111116);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 14px 34px rgba(29, 29, 31, 0.18);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.login-form button:hover {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(145deg, #6157f4, #2d2a78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 16px 38px rgba(97, 87, 244, 0.22);
  transform: translateY(-1px);
}

.login-error {
  margin: -4px 0 0;
  color: #d70015;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar nav {
    display: none;
  }

  .hero,
  .owner-overview,
  .ops-snapshot,
  .insight-row,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
  }

  .hero-summary {
    width: min(100%, 360px);
  }

  .date-selector {
    width: min(100%, 420px);
  }


  .owner-card.primary,
  .owner-card:nth-child(2) {
    grid-column: span 1;
  }

  .owner-card.compact {
    grid-column: span 1;
  }
}

@media (min-width: 681px) and (max-width: 1080px) {
  .owner-overview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .owner-card.primary,
  .owner-card:nth-child(2) {
    grid-column: span 2;
  }

  .owner-card.compact {
    grid-column: span 1;
  }

  .ops-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 28px, 1240px);
    padding-top: 14px;
  }

  .topbar {
    top: 8px;
    min-height: 54px;
  }

  .brand strong {
    display: none;
  }

  .logout {
    gap: 6px;
  }

  .logout button {
    padding: 0 10px;
  }

  .hero {
    gap: 18px;
    padding: 38px 0 22px;
  }

  .hero-summary {
    width: 100%;
  }

  .date-selector {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .date-selector button,
  .date-selector .quick-ranges a {
    width: 100%;
  }


  .owner-card {
    min-height: 148px;
  }

  .trend-chart {
    margin: 18px;
    padding: 14px 12px;
  }

  .trend-chart svg {
    min-width: 680px;
  }

  .trend-values {
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    overflow-x: auto;
  }

  .panel {
    max-width: 100%;
    overflow-x: auto;
  }

  .table-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-width: 0;
    padding: 14px 18px 16px;
  }

  .table-pagination nav {
    justify-content: flex-start;
  }

  table {
    min-width: 620px;
  }

  th,
  td {
    padding: 14px 18px;
  }
}
