:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-soft: #f1f4ef;
  --surface-strong: #101820;
  --text: #17212b;
  --muted: #5f6f7d;
  --line: #d8ded8;
  --accent: #087e8b;
  --accent-strong: #0b5f6a;
  --gold: #c79a22;
  --danger: #c84630;
  --ok: #168a4a;
  --shadow: 0 18px 45px rgba(16, 24, 32, 0.1);
  --radius: 8px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(8, 126, 139, 0.45);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--surface-strong);
  color: #fff;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 245, 0.93);
  border-bottom: 1px solid rgba(216, 222, 216, 0.9);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(100% - 2rem, var(--max));
  min-height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  text-decoration: none;
  color: var(--surface-strong);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent-strong);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.7rem;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
}

.section {
  padding: 84px 0;
}

.section:first-of-type {
  padding-top: 96px;
}

.muted {
  background: #eef2ee;
}

.hero {
  background:
    linear-gradient(135deg, rgba(16, 24, 32, 0.92), rgba(8, 126, 139, 0.78)),
    url("/assets/img/ogimage.png") center / cover;
  color: #fff;
}

.hero-grid,
.split,
.contact-grid,
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 2rem;
  align-items: center;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow,
.contact-band .eyebrow {
  color: #ccecf0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  color: inherit;
  line-height: 1.15;
}

h1 {
  max-width: 900px;
  font-size: clamp(2.35rem, 6vw, 5.15rem);
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 3.25rem);
}

h3 {
  font-size: 1.15rem;
}

.lead {
  max-width: 760px;
  margin: 1.4rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.action-row,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  color: inherit;
}

.section .button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.signal-panel,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.signal-panel {
  padding: 1.35rem;
}

.signal-panel dl {
  margin: 0;
}

.signal-panel div + div {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

dd {
  margin: 0.2rem 0 0;
  font-weight: 700;
}

.text-link {
  display: inline-block;
  margin-top: 1.15rem;
  color: var(--accent-strong);
  font-weight: 800;
}

.status-dot {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  margin-right: 0.5rem;
  border-radius: 999px;
  background: var(--muted);
}

.status-dot[data-state="ok"] {
  background: var(--ok);
}

.status-dot[data-state="incident"] {
  background: var(--danger);
}

.status-dot[data-state="maintenance"] {
  background: var(--gold);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.readable {
  max-width: 780px;
}

.readable h1 {
  color: var(--surface-strong);
}

.readable h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.readable p {
  color: var(--muted);
}

.analytics-admin {
  background: #0d0d0e;
}

.analytics-admin .dashboard {
  width: 100%;
  max-width: none;
}

.analytics-admin .dashboard-page {
  min-height: 100vh;
  background: #0d0d0e;
  padding: 0;
}

.analytics-admin .auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
  background: #08090a;
  color: #f6f1e6;
}

.analytics-admin .auth-panel {
  display: grid;
  justify-items: center;
  width: min(100%, 360px);
  padding: 0;
  text-align: center;
}

.analytics-admin .auth-logo {
  display: grid;
  gap: 0.95rem;
  justify-items: center;
  margin: 0;
  color: #f7f7f5;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.04rem;
}

.analytics-admin .auth-logo img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.analytics-admin .auth-subtitle {
  max-width: 270px;
  margin: 1rem 0 1.4rem;
  color: #85848a;
  font-size: 0.92rem;
  line-height: 1.45;
}

.analytics-admin .auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 208px);
  min-height: 40px;
  margin-top: 0.6rem;
  border: 0;
  border-radius: 8px;
  background: #f7f7f5;
  color: #08090a;
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 18px 38px rgba(255, 255, 255, 0.08);
}

.analytics-admin .auth-panel form {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  width: 100%;
  margin-top: 0.7rem;
}

.analytics-admin .auth-panel label {
  color: #85848a;
  font-size: 0.82rem;
}

.analytics-admin .auth-panel input {
  width: min(100%, 260px);
  min-height: 38px;
  border: 1px solid #27272b;
  border-radius: 8px;
  background: #151517;
  color: #f6f1e6;
  padding: 0.62rem 0.75rem;
  font: inherit;
}

.analytics-admin .auth-footnote,
.analytics-admin .dashboard-separator,
.analytics-admin .dashboard-muted {
  color: #85848a;
}

.analytics-admin .auth-footnote {
  margin: 1.3rem 0 0;
  font-size: 0.82rem;
}

.analytics-admin .notice {
  width: min(100%, 330px);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.analytics-admin .notice.danger {
  border: 1px solid #2c2d31;
  background: #151517;
  color: #c9c9cf;
}

.analytics-admin .dashboard-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  background: #eef0f4;
}

.analytics-admin .dashboard-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 100vh;
  border-right: 1px solid #25252a;
  background: #141417;
  padding: 1.25rem;
  color: #fff;
}

.analytics-admin .dashboard-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
}

.analytics-admin .dashboard-mark span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: #15100a;
  font-size: 0.82rem;
  font-weight: 900;
}

.analytics-admin .dashboard-mark img {
  border-radius: 6px;
}

.analytics-admin .dashboard-mark strong {
  font-size: 0.95rem;
}

.analytics-admin .dashboard-sidebar nav {
  display: grid;
  gap: 0.35rem;
}

.analytics-admin .dashboard-sidebar nav a {
  border-radius: 8px;
  color: #a6a6ad;
  padding: 0.72rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.analytics-admin .dashboard-sidebar nav a.active,
.analytics-admin .dashboard-sidebar nav a:hover {
  background: #24242a;
  color: #fff;
}

.analytics-admin .sidebar-status {
  display: grid;
  gap: 0.2rem;
  margin-top: auto;
  border: 1px solid #2b2b31;
  border-radius: 8px;
  background: #1b1b1f;
  padding: 0.85rem;
}

.analytics-admin .sidebar-status span {
  color: #888891;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-admin .sidebar-status strong {
  color: #36b37e;
  font-size: 1.35rem;
  line-height: 1;
}

.analytics-admin .dashboard-main {
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 2rem);
}

.analytics-admin .dashboard-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.analytics-admin .dashboard-top h1 {
  max-width: 780px;
  color: #17171a;
  font-size: clamp(2rem, 4vw, 3.05rem);
  line-height: 1;
}

.analytics-admin .dashboard-title {
  min-width: 0;
}

.analytics-admin .eyebrow {
  color: #81756a;
  font-size: 0.72rem;
  letter-spacing: 0.12rem;
}

.analytics-admin .dashboard-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.analytics-admin .dashboard-badges span,
.analytics-admin .dashboard-refresh,
.analytics-admin .live-status {
  border: 1px solid #ded7cb;
  border-radius: 999px;
  background: #f7f8fb;
  padding: 0.34rem 0.62rem;
  color: #434751;
  font-size: 0.78rem;
  font-weight: 900;
}

.analytics-admin .dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}

.analytics-admin .button.secondary {
  border: 1px solid #d9dce4;
  background: #fff;
  color: #25252a;
}

.analytics-admin .button.primary {
  border: 0;
  background: #17171a;
  color: #fff;
}

.analytics-admin .auth-button.button.primary {
  background: #f7f7f5;
  color: #08090a;
}

.analytics-admin .dashboard-controls {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 1rem;
}

.analytics-admin .dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  border: 1px solid #d9dce4;
  border-radius: 8px;
  background: #fff;
  padding: 0.32rem;
}

.analytics-admin .dashboard-tabs a {
  border-radius: 6px;
  color: #656772;
  padding: 0.5rem 0.72rem;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.analytics-admin .dashboard-tabs a.active {
  background: #17171a;
  color: #fff;
}

.analytics-admin .dashboard-export,
.analytics-admin .dashboard-search {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.analytics-admin .dashboard-search input {
  width: min(100%, 430px);
  min-height: 40px;
  border: 1px solid #d9dce4;
  border-radius: 8px;
  background: #fff;
  padding: 0.62rem 0.78rem;
  font: inherit;
}

.analytics-admin .metric-grid,
.analytics-admin .dashboard-grid,
.analytics-admin .insight-grid {
  display: grid;
  gap: 1rem;
}

.analytics-admin .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.analytics-admin .dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-admin .insight-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.analytics-admin .metric-card,
.analytics-admin .dashboard-card,
.analytics-admin .insight-card {
  border: 1px solid #dfe2ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(26, 27, 33, 0.06);
}

.analytics-admin .metric-card {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  padding: 1rem;
}

.analytics-admin .metric-card::before {
  display: block;
  width: 2rem;
  height: 0.2rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  background: #36b37e;
  content: "";
}

.analytics-admin .metric-card:nth-child(3n)::before {
  background: #24a6a6;
}

.analytics-admin .metric-card:nth-child(4n)::before {
  background: #26262c;
}

.analytics-admin .metric-card span,
.analytics-admin .insight-card span {
  display: block;
  color: #737782;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-admin .metric-card strong {
  display: block;
  margin-top: 0.35rem;
  color: #17171a;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  line-height: 1;
}

.analytics-admin .metric-card em,
.analytics-admin .insight-card em {
  display: block;
  margin-top: 0.45rem;
  color: #737782;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.analytics-admin .dashboard-card {
  margin-bottom: 1rem;
  padding: 1rem;
}

.analytics-admin .insight-card {
  display: grid;
  gap: 0.25rem;
  align-content: start;
  min-height: 126px;
  padding: 1rem;
}

.analytics-admin .insight-card strong {
  min-width: 0;
  color: #17171a;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.analytics-admin .dashboard-card h2 {
  margin-bottom: 0.85rem;
  color: #17171a;
  font-size: 1.02rem;
}

.analytics-admin .live-card {
  border-color: #cfd4de;
}

.analytics-admin .live-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.analytics-admin .live-card-head h2,
.analytics-admin .live-card-head .eyebrow {
  margin-bottom: 0;
}

.analytics-admin .table-wrap {
  width: 100%;
  overflow-x: auto;
}

.analytics-admin table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.analytics-admin th,
.analytics-admin td {
  border-top: 1px solid #ebeef3;
  padding: 0.58rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.analytics-admin th {
  color: #737782;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.analytics-admin td {
  max-width: 420px;
}

.analytics-admin tbody tr:hover {
  background: #f7f8fb;
}

.analytics-admin td code {
  border: 1px solid #d9dce4;
  border-radius: 999px;
  background: #f6f7fa;
  padding: 0.18rem 0.38rem;
  color: #17171a;
  font-size: 0.76rem;
}

.analytics-admin .rank-list {
  display: grid;
  gap: 0.85rem;
}

.analytics-admin .rank-row {
  display: grid;
  gap: 0.3rem;
}

.analytics-admin .rank-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.analytics-admin .rank-main span {
  min-width: 0;
  color: #30323a;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.analytics-admin .rank-main strong {
  color: #17171a;
}

.analytics-admin .rank-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #737782;
  font-size: 0.8rem;
}

.analytics-admin .rank-meter,
.analytics-admin .trend-meter {
  display: block;
  width: 100%;
  height: 0.58rem;
  border: 0;
  border-radius: 999px;
  background: #e8ebf1;
}

.analytics-admin .rank-meter::-webkit-meter-bar,
.analytics-admin .trend-meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: #e8ebf1;
}

.analytics-admin .rank-meter::-webkit-meter-optimum-value,
.analytics-admin .trend-meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: #24a6a6;
}

.analytics-admin .rank-meter::-moz-meter-bar,
.analytics-admin .trend-meter::-moz-meter-bar {
  border-radius: 999px;
  background: #24a6a6;
}

.analytics-admin .trend-card {
  margin-bottom: 1rem;
}

.analytics-admin .trend-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.analytics-admin .trend-day {
  display: grid;
  gap: 0.35rem;
  color: #737782;
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.analytics-admin .trend-value {
  color: #17171a;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline-meta {
  color: var(--muted);
}

.timeline-meta strong,
.timeline-meta span {
  display: block;
}

.timeline-meta strong {
  color: var(--text);
}

.timeline-item p,
.card p,
.stack-list p,
.section-heading p + h2 {
  margin-bottom: 0;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 1.25rem;
}

.card p {
  color: var(--muted);
}

.stack-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.stack-list article {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.credential-card {
  align-self: stretch;
}

.check-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.4rem;
}

.check-list li::before {
  position: absolute;
  left: 0;
  color: var(--accent);
  content: "+";
  font-weight: 900;
}

.contact-band {
  background: var(--surface-strong);
  color: #fff;
}

.contact-band h2 {
  max-width: 720px;
}

.contact-actions {
  justify-content: flex-start;
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.25rem 0;
}

.footer-grid {
  grid-template-columns: 1fr auto;
  gap: 1rem;
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
}

.footer-grid nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-grid a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    inset: 72px 1rem auto 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 0.75rem;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.7rem;
  }

  .hero-grid,
  .split,
  .contact-grid,
  .footer-grid,
  .timeline-item,
  .card-grid.three,
  .dashboard-grid,
  .metric-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-top {
    display: block;
  }

  .dashboard-actions {
    flex-wrap: wrap;
    margin-top: 1rem;
    white-space: normal;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-brand {
    min-height: 360px;
  }

  .auth-brand h1 {
    font-size: 2.55rem;
  }

  .auth-status div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .live-card-head {
    display: block;
  }

  .live-status {
    display: inline-block;
    margin-top: 0.75rem;
  }

  .dashboard-controls,
  .dashboard-search,
  .dashboard-export {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-search,
  .dashboard-export {
    justify-content: stretch;
  }

  .dashboard-search input {
    width: 100%;
  }

  .section {
    padding: 64px 0;
  }

  .section:first-of-type {
    padding-top: 72px;
  }

  .footer-grid nav {
    justify-content: flex-start;
  }
}

@media (max-width: 1040px) {
  .analytics-admin .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .analytics-admin .dashboard-sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #25252a;
  }

  .analytics-admin .dashboard-sidebar nav {
    display: flex;
    flex-wrap: wrap;
  }

  .analytics-admin .sidebar-status {
    display: none;
  }

  .analytics-admin .metric-grid,
  .analytics-admin .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .analytics-admin .auth-shell {
    min-height: 100vh;
    padding: 1.25rem;
  }

  .analytics-admin .dashboard-main {
    padding: 1rem;
  }

  .analytics-admin .dashboard-top,
  .analytics-admin .dashboard-controls,
  .analytics-admin .dashboard-search,
  .analytics-admin .dashboard-export,
  .analytics-admin .metric-grid,
  .analytics-admin .dashboard-grid,
  .analytics-admin .insight-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analytics-admin .dashboard-actions {
    flex-wrap: wrap;
    margin-top: 0.4rem;
    white-space: normal;
  }

  .analytics-admin .dashboard-tabs,
  .analytics-admin .dashboard-search,
  .analytics-admin .dashboard-export {
    justify-content: stretch;
  }

  .analytics-admin .dashboard-search input {
    width: 100%;
  }

  .analytics-admin .live-card-head {
    display: block;
  }

  .analytics-admin .live-status {
    display: inline-block;
    margin-top: 0.75rem;
  }
}

.analytics-admin .dashboard-shell-modern {
  grid-template-columns: 264px minmax(0, 1fr);
  background: #f4f6fb;
  color: #172033;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.analytics-admin .dashboard-shell-modern .dashboard-sidebar {
  border-right: 0;
  background: linear-gradient(180deg, #111827 0%, #0f172a 55%, #111827 100%);
  box-shadow: 16px 0 40px rgba(15, 23, 42, 0.18);
}

.analytics-admin .dashboard-shell-modern .dashboard-mark {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.75rem;
}

.analytics-admin .dashboard-shell-modern .dashboard-mark span {
  background: #eef2ff;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.26);
}

.analytics-admin .dashboard-shell-modern .dashboard-mark small {
  display: block;
  color: #93a4bd;
  font-size: 0.72rem;
  font-weight: 800;
  margin-top: 0.1rem;
}

.analytics-admin .dashboard-shell-modern .dashboard-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid transparent;
  color: #aebbd0;
}

.analytics-admin .dashboard-shell-modern .dashboard-sidebar nav a i {
  width: 1.05rem;
  color: #60a5fa;
  text-align: center;
}

.analytics-admin .dashboard-shell-modern .dashboard-sidebar nav a.active,
.analytics-admin .dashboard-shell-modern .dashboard-sidebar nav a:hover {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.analytics-admin .dashboard-shell-modern .sidebar-status {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

.analytics-admin .dashboard-shell-modern .sidebar-status small {
  color: #93a4bd;
  font-size: 0.76rem;
  font-weight: 800;
}

.analytics-admin .dashboard-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.analytics-admin .dashboard-topbar h1 {
  color: #111827;
  font-size: clamp(2.1rem, 3.1vw, 3.25rem);
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.analytics-admin .dashboard-commandbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.analytics-admin .dashboard-commandbar .dashboard-search {
  position: relative;
  align-items: center;
  border: 1px solid #dfe5f0;
  border-radius: 8px;
  background: #fff;
  padding: 0.25rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.analytics-admin .dashboard-commandbar .dashboard-search i {
  color: #8a94a8;
  margin-left: 0.55rem;
}

.analytics-admin .dashboard-commandbar .dashboard-search input {
  border: 0;
  box-shadow: none;
  min-width: 0;
}

.analytics-admin .dashboard-commandbar .dashboard-search select {
  min-height: 38px;
  border: 1px solid #dfe5f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  font-weight: 800;
  padding: 0.45rem 0.55rem;
}

.analytics-admin .dashboard-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 38px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.analytics-admin .button.primary,
.analytics-admin .button.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-weight: 900;
  text-decoration: none;
}

.analytics-admin .button.primary {
  background: #2563eb;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
}

.analytics-admin .button.secondary {
  background: #fff;
}

.analytics-admin .metric-grid-modern {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analytics-admin .metric-grid-modern .metric-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 132px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.analytics-admin .metric-grid-modern .metric-card:hover {
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.11);
  transform: translateY(-2px);
}

.analytics-admin .metric-grid-modern .metric-card::before {
  display: none;
}

.analytics-admin .metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
}

.analytics-admin .metric-blue .metric-icon { background: #2563eb; }
.analytics-admin .metric-indigo .metric-icon { background: #4f46e5; }
.analytics-admin .metric-green .metric-icon { background: #16a34a; }
.analytics-admin .metric-amber .metric-icon { background: #d97706; }
.analytics-admin .metric-red .metric-icon { background: #dc2626; }
.analytics-admin .metric-cyan .metric-icon { background: #0891b2; }
.analytics-admin .metric-purple .metric-icon { background: #7c3aed; }
.analytics-admin .metric-slate .metric-icon { background: #475569; }

.analytics-admin .metric-grid-modern .metric-card strong {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  overflow-wrap: anywhere;
}

.analytics-admin .sparkline {
  grid-column: 1 / -1;
  width: 100%;
  height: 30px;
  margin-top: 0.15rem;
}

.analytics-admin .sparkline polyline {
  fill: none;
  stroke: #2563eb;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.analytics-admin .dashboard-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  gap: 1rem;
}

.analytics-admin .intelligence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr) minmax(260px, 0.7fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.analytics-admin .insight-feed ol {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding-left: 1.25rem;
}

.analytics-admin .insight-feed li {
  color: #334155;
  line-height: 1.45;
}

.analytics-admin .funnel-list,
.analytics-admin .quality-card {
  display: grid;
  gap: 0.75rem;
}

.analytics-admin .funnel-list div,
.analytics-admin .quality-row {
  display: grid;
  gap: 0.35rem;
}

.analytics-admin .funnel-list span,
.analytics-admin .quality-row {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
}

.analytics-admin .funnel-list strong,
.analytics-admin .quality-row strong {
  color: #111827;
  font-size: 1rem;
  margin-right: 0.45rem;
}

.analytics-admin .funnel-list meter,
.analytics-admin .quality-row meter,
.analytics-admin .visitor-verdict meter {
  width: 100%;
  height: 0.55rem;
}

.analytics-admin .dashboard-visual-grid .trend-card,
.analytics-admin .dashboard-visual-grid .dashboard-card:nth-child(4) {
  min-height: 320px;
}

.analytics-admin .dashboard-card,
.analytics-admin .insight-card {
  border-color: #e2e8f0;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.analytics-admin .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.analytics-admin .card-head h2 {
  margin: 0;
}

.analytics-admin .card-head > span {
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  padding: 0.35rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.analytics-admin .world-map {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #dbeafe;
  background:
    radial-gradient(circle at 20% 30%, rgba(34, 197, 94, 0.12), transparent 28%),
    radial-gradient(circle at 75% 35%, rgba(37, 99, 235, 0.16), transparent 30%),
    linear-gradient(180deg, #e0f2fe 0%, #f8fafc 100%);
}

.analytics-admin .world-map-empty {
  display: grid;
  min-height: 260px;
  align-content: center;
  justify-items: center;
  padding: 2rem;
  text-align: center;
}

.analytics-admin .world-map-empty .empty-visual {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 8px;
  background: #dbeafe;
  color: #2563eb;
  font-size: 1.55rem;
  margin-bottom: 0.85rem;
}

.analytics-admin .world-map-empty strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.analytics-admin .world-map-empty p {
  max-width: 420px;
  color: #64748b;
  margin: 0.45rem 0 0;
  line-height: 1.55;
}

.analytics-admin .world-map svg {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
}

.analytics-admin .world-map path {
  fill: #b7c4d6;
  stroke: #fff;
  stroke-width: 4;
}

.analytics-admin .map-marker {
  position: absolute;
  display: block;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.16), 0 10px 24px rgba(37, 99, 235, 0.28);
  transform: translate(-50%, -50%);
}

.analytics-admin .heatmap-grid {
  display: grid;
  grid-template-columns: 42px repeat(24, minmax(8px, 1fr));
  gap: 0.25rem;
  align-items: center;
}

.analytics-admin .heatmap-label,
.analytics-admin .heatmap-hours {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
}

.analytics-admin .heatmap-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #e2e8f0;
}

.analytics-admin .heat-1 { background: #bfdbfe; }
.analytics-admin .heat-2 { background: #60a5fa; }
.analytics-admin .heat-3 { background: #2563eb; }
.analytics-admin .heat-4 { background: #1e3a8a; }

.analytics-admin .heatmap-hours {
  display: grid;
  grid-template-columns: 42px repeat(4, 1fr) 1fr;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.analytics-admin .heatmap-hours span:first-child {
  grid-column: 2;
}

.analytics-admin .country-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  min-width: 2rem;
  height: 1.35rem;
  border: 1px solid #dbe3ef;
  border-radius: 5px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0;
  vertical-align: middle;
}

.analytics-admin .cell-note {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
  margin-top: 0.2rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.analytics-admin .visitor-intel-card {
  margin-top: 0;
}

.analytics-admin .visitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.analytics-admin .visitor-card {
  display: grid;
  gap: 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfdff;
  padding: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.analytics-admin .visitor-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.analytics-admin .intent-score {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  background: #eff6ff;
  color: #1d4ed8;
  line-height: 1;
}

.analytics-admin .intent-score strong {
  font-size: 1.1rem;
}

.analytics-admin .intent-score span {
  color: #2563eb;
  font-size: 0.65rem;
  font-weight: 900;
}

.analytics-admin .visitor-verdict {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.analytics-admin .traffic-class,
.analytics-admin .reason-list span {
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  padding: 0.28rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 900;
}

.analytics-admin .traffic-possible-bot,
.analytics-admin .traffic-likely-bot,
.analytics-admin .traffic-confirmed-bot {
  background: #fff7ed;
  color: #c2410c;
}

.analytics-admin .traffic-unknown {
  background: #f1f5f9;
  color: #475569;
}

.analytics-admin .bot-risk-meter::-webkit-meter-optimum-value {
  background: #f59e0b;
}

.analytics-admin .bot-risk-meter::-moz-meter-bar {
  background: #f59e0b;
}

.analytics-admin .visitor-verdict small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
}

.analytics-admin .visitor-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #eef2ff;
}

.analytics-admin .visitor-head strong {
  display: block;
  color: #111827;
  font-size: 0.98rem;
}

.analytics-admin .visitor-head span,
.analytics-admin .visitor-facts,
.analytics-admin .visitor-times,
.analytics-admin .visitor-timeline small {
  color: #64748b;
}

.analytics-admin .visitor-facts {
  display: grid;
  gap: 0.38rem;
  font-size: 0.82rem;
}

.analytics-admin .visitor-facts span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  overflow-wrap: anywhere;
}

.analytics-admin .visitor-facts i {
  width: 1rem;
  color: #2563eb;
  text-align: center;
}

.analytics-admin .visitor-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.analytics-admin .reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.analytics-admin .action-list,
.analytics-admin .utm-list {
  display: grid;
  gap: 0.45rem;
}

.analytics-admin .action-list {
  display: flex;
  flex-wrap: wrap;
}

.analytics-admin .action-list span {
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.26rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 900;
}

.analytics-admin .utm-list div {
  display: grid;
  gap: 0.25rem;
}

.analytics-admin .utm-list span {
  color: #475569;
  font-size: 0.76rem;
  font-weight: 900;
}

.analytics-admin .utm-list code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.analytics-admin .visitor-stats span,
.analytics-admin .event-pill {
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  padding: 0.26rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 900;
}

.analytics-admin .visitor-times {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.75rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.analytics-admin .visitor-timeline {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analytics-admin .visitor-timeline li {
  display: grid;
  grid-template-columns: 108px minmax(130px, 0.6fr) minmax(0, 1fr);
  gap: 0.4rem 0.65rem;
  align-items: start;
  font-size: 0.78rem;
}

.analytics-admin .visitor-timeline time {
  color: #64748b;
  font-weight: 900;
}

.analytics-admin .visitor-timeline span {
  color: #111827;
  font-weight: 900;
}

.analytics-admin .visitor-timeline small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.analytics-admin .modern-table th,
.analytics-admin .modern-table td {
  white-space: nowrap;
}

.analytics-admin .modern-table td:nth-child(4) {
  max-width: 280px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.analytics-admin .dashboard-grid-modern {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1280px) {
  .analytics-admin .metric-grid-modern,
  .analytics-admin .dashboard-grid-modern {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-admin .visitor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .analytics-admin .dashboard-shell-modern {
    grid-template-columns: 1fr;
  }

  .analytics-admin .dashboard-visual-grid {
    grid-template-columns: 1fr;
  }

  .analytics-admin .intelligence-grid {
    grid-template-columns: 1fr;
  }

  .analytics-admin .dashboard-commandbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  html,
  body,
  .analytics-admin,
  .analytics-admin .dashboard-page,
  .analytics-admin .dashboard {
    max-width: 100%;
    overflow-x: hidden;
  }

  .analytics-admin .dashboard-page {
    padding: 0;
    background: #f4f6fb;
  }

  .analytics-admin .dashboard-shell-modern .dashboard-sidebar {
    padding: 1rem;
  }

  .analytics-admin .dashboard-shell-modern .dashboard-sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-admin .dashboard-shell-modern .dashboard-sidebar nav a {
    min-height: 46px;
  }

  .analytics-admin .dashboard-topbar,
  .analytics-admin .metric-grid-modern,
  .analytics-admin .dashboard-grid-modern,
  .analytics-admin .visitor-grid {
    grid-template-columns: 1fr;
  }

  .analytics-admin .dashboard-topbar .dashboard-actions {
    justify-content: stretch;
  }

  .analytics-admin .dashboard-commandbar .dashboard-search {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .analytics-admin .dashboard-commandbar .dashboard-search select,
  .analytics-admin .dashboard-commandbar .dashboard-search .dashboard-toggle,
  .analytics-admin .dashboard-commandbar .dashboard-search .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .analytics-admin .metric-grid-modern .metric-card {
    min-height: 128px;
  }

  .analytics-admin .heatmap-card {
    overflow-x: auto;
  }

  .analytics-admin .heatmap-grid {
    grid-template-columns: 38px repeat(24, 14px);
    min-width: 430px;
  }

  .analytics-admin .heatmap-hours {
    min-width: 430px;
  }

  .analytics-admin .world-map {
    min-height: 220px;
  }

  .analytics-admin .visitor-head,
  .analytics-admin .visitor-verdict,
  .analytics-admin .visitor-times,
  .analytics-admin .visitor-timeline li {
    grid-template-columns: 1fr;
  }

  .analytics-admin .visitor-timeline small {
    grid-column: auto;
  }
}

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