/* ═══════════════════════════════════════════════════
   NEUPALO.RU — Design System
   Premium uptime monitoring for Russian businesses
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Variables ─────────────────────────────── */
:root {
  /* Primary palette */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);

  /* Accent */
  --accent: #06b6d4;
  --accent-light: #22d3ee;

  /* Status colors */
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.3);
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.3);
  --yellow: #f59e0b;
  --yellow-glow: rgba(245, 158, 11, 0.3);

  /* Dark theme */
  --bg-primary: #0a0a1a;
  --bg-secondary: #111127;
  --bg-card: rgba(17, 17, 39, 0.8);
  --bg-card-hover: rgba(25, 25, 55, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --bg-input: rgba(255, 255, 255, 0.05);

  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(99, 102, 241, 0.5);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0a1a;

  /* Sizing */
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--primary-glow);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ─── Reset & Base ──────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--accent-light);
}

/* ─── Animated Background ───────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.bg-gradient-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.bg-gradient-orbs::before,
.bg-gradient-orbs::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: orbFloat 20s ease-in-out infinite;
}

.bg-gradient-orbs::before {
  width: 600px;
  height: 600px;
  background: var(--primary);
  top: -200px;
  right: -100px;
}

.bg-gradient-orbs::after {
  width: 500px;
  height: 500px;
  background: var(--accent);
  bottom: -150px;
  left: -100px;
  animation-delay: -10s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -40px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 30px) scale(0.95);
  }
}

/* ─── Container ─────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navigation ────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 26, 0.8);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 20px var(--primary-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), #dc2626);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--green), #059669);
  color: white;
}

/* ─── Hero Section ──────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.3);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Section ───────────────────────────────────── */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Cards ─────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ─── Problems Section ──────────────────────────── */
.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.problem-card {
  text-align: center;
  padding: 40px 32px;
}

.problem-card .icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.problem-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.problem-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ─── Features Grid ─────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ─── Pricing ───────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  text-align: center;
  padding: 40px 32px;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 40px var(--primary-glow);
  transform: scale(1.04);
}

.pricing-card.featured:hover {
  transform: scale(1.06);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 4px 20px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.pricing-price {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.pricing-price .currency {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pricing-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card .btn {
  width: 100%;
}

/* ─── How It Works ──────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  opacity: 0.3;
}

.step-card {
  text-align: center;
  padding: 36px 24px;
  position: relative;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 auto 24px;
  color: white;
  box-shadow: 0 0 24px var(--primary-glow);
  position: relative;
  z-index: 1;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ─── FAQ ───────────────────────────────────────── */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  padding: 24px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition-fast);
}

.faq-question:hover {
  color: var(--primary-light);
}

.faq-question .arrow {
  transition: var(--transition);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.faq-item.active .faq-question .arrow {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding-bottom: 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ─── CTA Section ───────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 80px 0;
}

.cta-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  opacity: 0.1;
}

.cta-box h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.1rem;
  position: relative;
}

/* ─── Footer ────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─── Modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  transform: translateY(20px) scale(0.95);
  transition: var(--transition);
  position: relative;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.modal h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal .subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ─── Forms ─────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-error {
  color: var(--red);
  font-size: 0.8rem;
  margin-top: 4px;
}

.form-switch {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 16px;
  text-align: center;
}

.form-switch a {
  color: var(--primary-light);
  font-weight: 600;
}

/* ─── Dashboard ─────────────────────────────────── */
.dashboard {
  display: none;
  min-height: 100vh;
  padding-top: 72px;
}

.dashboard.active {
  display: block;
}

.landing.hidden {
  display: none;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 24px;
}

.dash-title {
  font-size: 1.8rem;
  font-weight: 800;
}

.dash-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  backdrop-filter: blur(20px);
}

.dash-stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.dash-stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
}

.dash-stat-card .stat-value.green {
  color: var(--green);
}

.dash-stat-card .stat-value.red {
  color: var(--red);
}

.dash-stat-card .stat-value.yellow {
  color: var(--yellow);
}

/* ─── Sites Table ───────────────────────────────── */
.sites-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.sites-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.sites-table-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.sites-table {
  width: 100%;
  border-collapse: collapse;
}

.sites-table th {
  text-align: left;
  padding: 12px 24px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.sites-table td {
  padding: 16px 24px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition-fast);
}

.sites-table tr:hover td {
  background: var(--bg-glass);
}

.sites-table tr:last-child td {
  border-bottom: none;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.status-dot::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.up::before {
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}

.status-dot.down::before {
  background: var(--red);
  box-shadow: 0 0 8px var(--red-glow);
  animation: pulse 1.5s infinite;
}

.status-dot.unknown::before {
  background: var(--text-muted);
}

.uptime-bar {
  width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.uptime-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
  transition: width 0.5s ease;
}

.site-url {
  display: flex;
  flex-direction: column;
}

.site-url .name {
  font-weight: 600;
  color: var(--text-primary);
}

.site-url .url {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.response-time {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ─── Toast Notifications ───────────────────────── */
.toast-container {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  font-size: 0.9rem;
}

.toast.success {
  border-left: 3px solid var(--green);
}

.toast.error {
  border-left: 3px solid var(--red);
}

.toast.info {
  border-left: 3px solid var(--primary);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

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

/* ─── Loader ────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .steps-grid::before {
    display: none;
  }

  .pricing-card.featured {
    transform: none;
  }

  .pricing-card.featured:hover {
    transform: translateY(-4px);
  }

  .modal {
    margin: 16px;
    padding: 28px;
  }

  .dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .sites-table th:nth-child(3),
  .sites-table td:nth-child(3),
  .sites-table th:nth-child(4),
  .sites-table td:nth-child(4) {
    display: none;
  }
}

/* ─── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ═══════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════ */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ───────────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 50;
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 20px var(--primary-glow);
}

.sidebar-title {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  margin-bottom: 4px;
}

.sidebar-link .icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--bg-glass-hover);
  color: var(--primary-light);
  border: 1px solid var(--border);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* ─── Dashboard Main Content ────────────────────── */
.dashboard-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 32px;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.page-actions {
  display: flex;
  gap: 12px;
}

/* ─── Toolbar (Search + Filter) ─────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 300px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  background: var(--bg-glass-hover);
}

.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 10px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
}

/* ─── Stats Grid ────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.stat-value.green {
  color: var(--green);
}

.stat-value.red {
  color: var(--red);
}

/* ─── Sites Grid (Cards) ────────────────────────── */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.site-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.site-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--green));
  opacity: 0;
  transition: var(--transition);
}

.site-card.status-up::before {
  background: linear-gradient(90deg, var(--green), var(--green));
  opacity: 1;
}

.site-card.status-down::before {
  background: linear-gradient(90deg, var(--red), var(--red));
  opacity: 1;
  animation: pulse 2s infinite;
}

.site-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.site-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.site-card-title {
  flex: 1;
  min-width: 0;
}

.site-card-title h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-card-title .url {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.site-status-badge.up {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.site-status-badge.down {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.site-status-badge.unknown {
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.site-status-badge .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.site-status-badge.up .pulse-dot {
  animation: pulse 2s infinite;
}

.site-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.site-card-stat {
  display: flex;
  flex-direction: column;
}

.site-card-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.site-card-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.site-card-graph {
  height: 40px;
  margin-top: 8px;
  opacity: 0.6;
}

/* ─── Site Detail Page ──────────────────────────── */
.site-detail-header {
  margin-bottom: 32px;
}

.site-detail-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.site-detail-title h1 {
  font-size: 2rem;
  font-weight: 800;
}

.site-detail-url {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-detail-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 32px;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
}

.detail-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.response-chart-container {
  position: relative;
  height: 250px;
}

.response-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-period-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.chart-period-tab {
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.chart-period-tab.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

.uptime-timeline {
  display: flex;
  gap: 2px;
  height: 32px;
  margin-top: 12px;
}

.uptime-day {
  flex: 1;
  border-radius: 3px;
  transition: var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.uptime-day.up {
  background: var(--green);
  opacity: 0.8;
}

.uptime-day.down {
  background: var(--red);
  opacity: 0.9;
}

.uptime-day.unknown {
  background: var(--bg-glass);
  opacity: 0.4;
}

.uptime-day:hover {
  opacity: 1;
  transform: scaleY(1.2);
}

.incident-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.incident-item {
  padding: 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--red);
}

.incident-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.incident-message {
  font-weight: 600;
  color: var(--red);
}

.incident-duration {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.incident-time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ssl-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.ssl-info-item {
  display: flex;
  flex-direction: column;
}

.ssl-info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ssl-info-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ssl-info-value.warning {
  color: var(--yellow);
}

.ssl-info-value.danger {
  color: var(--red);
}

/* ─── Settings Page ─────────────────────────────── */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(20px);
}

.settings-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.settings-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row span:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.settings-row span:last-child {
  color: var(--text-primary);
  font-weight: 600;
}

/* ─── Landing Hidden When Dashboard Active ─────── */
.landing.hidden {
  display: none;
}

/* ─── Overview Dashboard ────────────────────────── */
.date-range-selector {
  display: flex;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.range-btn {
  padding: 8px 16px;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.range-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.range-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.section-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* Comparison Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.comparison-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}

.comparison-table th.sortable:hover {
  color: var(--primary-light);
}

.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.comparison-table tr:hover td {
  background: rgba(99, 102, 241, 0.05);
}

.table-site-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.table-site-url {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Heatmap */
#heatmap-container {
  overflow-x: auto;
  padding: 8px 0;
}

#heatmap-container canvas {
  display: block;
}

/* PDF Button */
.btn-pdf {
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  color: var(--primary-light) !important;
  font-weight: 600;
}

.btn-pdf:hover {
  background: rgba(99, 102, 241, 0.1) !important;
  border-color: var(--primary) !important;
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }

  .dashboard-main {
    margin-left: 220px;
  }

  .sites-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0;
    padding: 16px;
    padding-bottom: 80px;
    padding-top: 60px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .filter-buttons {
    flex-wrap: wrap;
  }

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

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

  .site-card-stats {
    grid-template-columns: 1fr;
  }

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

  /* Show mobile elements */
  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-bottom-nav {
    display: flex;
  }
}

/* ─── Mobile Menu Toggle ────────────────────────── */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 110;
  width: 44px;
  height: 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu-toggle:hover span {
  background: var(--text-primary);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Mobile Bottom Nav ─────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: center;
  backdrop-filter: blur(20px);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: var(--transition-fast);
  min-width: 64px;
  text-align: center;
}

.mobile-nav-item .icon {
  font-size: 1.3rem;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--primary-light);
}

/* ─── Mobile Overlay ────────────────────────────── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

.mobile-overlay.active {
  display: block;
}

/* ─── PWA Install Banner ────────────────────────── */
.install-banner {
  display: none;
  position: fixed;
  bottom: 80px;
  left: 16px;
  right: 16px;
  z-index: 200;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 16px;
  animation: slideUp 0.3s ease;
}

.install-banner.show {
  display: flex;
}

.install-banner-text {
  flex: 1;
}

.install-banner-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.install-banner-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

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

/* ─── Safe Area Insets ──────────────────────────── */
@supports (padding: max(0px)) {
  .dashboard-main {
    padding-left: max(32px, env(safe-area-inset-left));
    padding-right: max(32px, env(safe-area-inset-right));
  }
}

/* ─── Touch Targets ─────────────────────────────── */
@media (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  .sidebar-link {
    min-height: 44px;
  }

  .filter-btn {
    min-height: 44px;
  }

  .faq-question {
    min-height: 48px;
  }
}