:root {
  --ink: #111827;
  --muted: #475569;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(15, 23, 42, 0.12);
  --brand: #14532d;
  --brand-soft: #ecfdf5;
}

.site-header {
  margin-bottom: 18px;
}

.auth-cta {
  border: 1px solid #2d9e67;
  border-radius: 999px;
  background: #14532d;
  color: #ecfdf5;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(21, 128, 61, 0.34);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 12px 22px rgba(21, 128, 61, 0.42);
}

.auth-cta-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #86efac;
  box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.18);
  flex: 0 0 8px;
}

.auth-cta.is-authenticated {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

.hero {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: radial-gradient(circle at top left, rgba(45, 158, 103, 0.06), rgba(255, 255, 255, 1) 40%);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: clamp(22px, 4vw, 42px);
  margin-bottom: 16px;
  animation: fadeUp 0.45s ease-out both;
}

.eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--line);
}

h1 {
  margin: 14px 0 10px;
  max-width: 850px;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.1;
  font-weight: 700;
}

.lead {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: #14532d;
  color: #ecfdf5;
  border-color: #2d9e67;
  box-shadow: 0 4px 16px rgba(21, 128, 61, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--line);
  color: var(--ink);
}

.btn.disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.install-box {
  margin-top: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  padding: 10px 12px;
  max-width: 860px;
}

.install-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: #334155;
}

.install-box pre {
  margin: 0;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  padding: 8px 10px;
}

.install-box code {
  font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: #0f172a;
}

.live-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  margin-bottom: 16px;
  animation: fadeUp 0.45s ease-out both;
}

.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.live-header h2 {
  margin: 0;
  font-size: 18px;
}

.live-updated {
  font-size: 12px;
  color: var(--muted);
}

.live-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.kpi-card {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
}

.kpi-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 24px;
  line-height: 1;
}

.live-chart-wrap {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
}

.live-chart {
  height: 72px;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
}

.live-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.9), rgba(20, 83, 45, 0.95));
  transition: height 0.25s ease;
}

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

.card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  animation: fadeUp 0.45s ease-out both;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.mini-link {
  display: inline-block;
  margin-top: 10px;
  color: #0f172a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.hidden-auth-trigger {
  position: fixed;
  left: -9999px;
  top: -9999px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .live-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .site-header {
    margin-bottom: 12px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .live-kpis {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 20px;
  }
}
