/* CronPing — real uptime monitor (palette: teal-deep + emerald + cyan)
 * © אופיר ברנס (Ofir Baranes) 2026
 */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg-1: #04101a;
  --bg-2: #06151f;
  --bg-3: #0b2330;

  --teal-200: #ccfbf1;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-700: #0f766e;
  --teal-900: #134e4a;

  --emerald-200: #a7f3d0;
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;

  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;

  --rose-300: #fda4af;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;

  --amber-300: #fcd34d;
  --amber-400: #fbbf24;

  --text-primary: #ecfeff;
  --text-secondary: rgba(236,254,255,0.74);
  --text-muted: rgba(236,254,255,0.46);
  --text-faint: rgba(236,254,255,0.30);

  --surface: rgba(236,254,255,0.04);
  --surface-strong: rgba(236,254,255,0.08);
  --surface-input: rgba(4,16,26,0.55);

  --border: rgba(94,234,212,0.16);
  --border-strong: rgba(94,234,212,0.32);
  --border-em: rgba(52,211,153,0.40);

  --shadow-card: 0 16px 38px -18px rgba(0,0,0,0.55);
  --shadow-glass: 0 30px 60px -25px rgba(0,0,0,0.85);
  --shadow-emerald: 0 10px 30px rgba(16,185,129,0.30);
  --bezier: cubic-bezier(.34,1.56,.64,1);
  --bezier-soft: cubic-bezier(.4,0,.2,1);
}

html, body {
  background: var(--bg-1);
  color: var(--text-primary);
  font-family: 'Heebo', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(ellipse 800px 700px at 75% -10%, rgba(45,212,191,0.16), transparent 60%),
    radial-gradient(ellipse 500px 600px at -10% 50%, rgba(34,211,238,0.08), transparent 70%),
    radial-gradient(ellipse 700px 900px at 50% 110%, rgba(15,118,110,0.38), transparent 70%),
    linear-gradient(180deg, #04101a 0%, #061721 60%, #0b2330 110%);
  background-attachment: fixed;
  position: relative;
}
.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
a { color: var(--teal-300); text-decoration: none; }
a:hover { color: var(--teal-200); text-decoration: underline; }
code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.92em;
  color: var(--emerald-300);
  background: rgba(52,211,153,0.08);
  padding: 1px 6px;
  border-radius: 4px;
}
code.break { word-break: break-all; }

/* ===== Ambient ===== */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.40; }
.orb.o1 { width: 540px; height: 540px; top: -180px; right: -160px; background: radial-gradient(circle, #2dd4bf 0%, transparent 70%); animation: drift1 30s ease-in-out infinite; }
.orb.o2 { width: 380px; height: 380px; bottom: 5%; left: -120px; background: radial-gradient(circle, #22d3ee 0%, transparent 70%); opacity: 0.22; animation: drift2 36s ease-in-out infinite; }
.orb.o3 { width: 300px; height: 300px; top: 40%; right: 28%; background: radial-gradient(circle, #6ee7b7 0%, transparent 70%); opacity: 0.18; animation: drift3 42s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px,50px) scale(1.10); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px,-40px) scale(1.08); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,-40px) scale(1.12); } }
.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.92 0 0 0 0 0.98 0 0 0 0 0.96 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: overlay;
}

/* ===== Topbar ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 26px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(4,16,26,0.92) 0%, rgba(4,16,26,0.55) 100%);
  backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(52,211,153,0.20), transparent 60%),
    linear-gradient(135deg, var(--teal-900), var(--bg-3));
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 22px rgba(52,211,153,0.16), inset 0 1px 0 rgba(255,255,255,0.06);
  overflow: hidden;
}
.brand-mark img { display: block; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 18px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.brand-sub { font-size: 10px; color: var(--text-muted); letter-spacing: 0.06em; }

.topbar-nav {
  flex: 1; display: flex; gap: 4px; justify-content: center;
}
.nav-link {
  padding: 8px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s var(--bezier-soft);
  position: relative;
  background: none; border: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-link:hover { color: var(--text-primary); background: var(--surface); text-decoration: none; }
.nav-link.active { color: var(--emerald-300); background: rgba(52,211,153,0.10); }
.nav-link.active::after {
  content: ''; position: absolute; inset: auto 12px 4px;
  height: 2px; background: var(--emerald-400); border-radius: 2px;
}

.topbar-right { flex-shrink: 0; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  font-size: 12px; border-radius: 100px;
  background: rgba(52,211,153,0.10);
  color: var(--emerald-300);
  border: 1px solid rgba(52,211,153,0.28);
  cursor: pointer; transition: all 0.2s;
  font-family: inherit; font-weight: 500;
}
.status-pill:hover { background: rgba(52,211,153,0.16); }
.status-pill.down {
  background: rgba(244,63,94,0.10);
  color: var(--rose-400);
  border-color: rgba(244,63,94,0.28);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald-400);
  box-shadow: 0 0 0 0 rgba(52,211,153,0.6);
  animation: pulse 2s ease-in-out infinite;
}
.status-pill.down .pulse-dot {
  background: var(--rose-400);
  box-shadow: 0 0 0 0 rgba(244,63,94,0.6);
  animation: pulse-rose 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
}
@keyframes pulse-rose {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244,63,94,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(244,63,94,0); }
}

main {
  position: relative; z-index: 1;
  padding: 28px 26px 60px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex; flex-direction: column;
  gap: 28px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(45,212,191,0.10) 0%, rgba(34,211,238,0.06) 100%);
  box-shadow: var(--shadow-glass);
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('hero_bg.png');
  background-size: cover;
  background-position: center left;
  opacity: 0.55;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(95deg, rgba(4,16,26,0.15) 0%, rgba(4,16,26,0.50) 45%, rgba(4,16,26,0.92) 100%),
    radial-gradient(ellipse 70% 60% at 100% 50%, rgba(52,211,153,0.10), transparent 60%);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  padding: 44px 42px;
  max-width: 720px;
  margin-right: 0;
}
.hero-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--emerald-300);
  margin-bottom: 18px;
}
.hero-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.10;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 18px;
}
.hero-em {
  background: linear-gradient(135deg, var(--emerald-300), var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-em-2 {
  background: linear-gradient(135deg, var(--cyan-300), var(--teal-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 26px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border: none; border-radius: 12px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--bezier);
}
.btn-primary {
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  color: var(--bg-1);
  font-weight: 700;
  box-shadow: var(--shadow-emerald);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(16,185,129,0.45); }
.btn-primary:disabled {
  opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none;
}
.btn-secondary {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: rgba(236,254,255,0.14); }
.btn-secondary:disabled {
  opacity: 0.4; cursor: not-allowed;
}
.btn-ghost {
  background: rgba(236,254,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-ghost:hover { background: rgba(236,254,255,0.12); }

/* ===== Stats row ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat-card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 20px;
  transition: all 0.3s var(--bezier-soft);
  position: relative;
  overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.stat-card.up { border-color: rgba(52,211,153,0.25); }
.stat-card.down { border-color: rgba(244,63,94,0.25); }
.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.dot-up, .dot-down {
  width: 8px; height: 8px; border-radius: 50%;
}
.dot-up { background: var(--emerald-400); box-shadow: 0 0 6px rgba(52,211,153,0.7); }
.dot-down { background: var(--rose-400); box-shadow: 0 0 6px rgba(244,63,94,0.7); }
.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.stat-card.up .stat-value {
  background: linear-gradient(135deg, var(--emerald-300), var(--teal-400));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card.down .stat-value {
  background: linear-gradient(135deg, var(--rose-300), var(--rose-500));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Card base ===== */
.card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}
.card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.section-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 22px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}
.section-sub {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.55;
  max-width: 720px;
}
.head-actions { display: flex; gap: 8px; }
.link-btn {
  background: none; border: 1px solid var(--border);
  color: var(--emerald-300);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 100px;
  transition: all 0.2s;
}
.link-btn:hover { background: rgba(52,211,153,0.08); color: var(--emerald-400); }

/* ===== Monitor list ===== */
.monitor-list { display: flex; flex-direction: column; gap: 10px; }
.monitor-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: rgba(236,254,255,0.025);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.25s var(--bezier);
  cursor: pointer;
}
.monitor-row:hover { background: rgba(236,254,255,0.05); border-color: var(--border-strong); transform: translateY(-1px); }
.monitor-row.down { border-color: rgba(244,63,94,0.30); background: linear-gradient(90deg, rgba(244,63,94,0.06), transparent 100%); }
.monitor-row.up { border-color: rgba(52,211,153,0.18); }
.monitor-row.pending { border-color: rgba(236,254,255,0.10); }

.monitor-indicator {
  position: relative;
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.monitor-indicator.up { background: var(--emerald-400); box-shadow: 0 0 12px rgba(52,211,153,0.7); }
.monitor-indicator.down { background: var(--rose-400); box-shadow: 0 0 12px rgba(244,63,94,0.7); }
.monitor-indicator.pending { background: var(--text-muted); }
.monitor-indicator.up::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid var(--emerald-400);
  opacity: 0; animation: ring 2s ease-out infinite;
}
@keyframes ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.monitor-info { min-width: 0; }
.monitor-name {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.monitor-url {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.monitor-meta {
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
}
.monitor-uptime {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.monitor-uptime.up { color: var(--emerald-300); }
.monitor-uptime.down { color: var(--rose-400); }
.monitor-meta-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.monitor-actions {
  display: flex; gap: 4px;
  flex-shrink: 0;
}
.mon-act-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.mon-act-btn:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 14px; }
.empty-state h3 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-state p { font-size: 13px; margin-bottom: 18px; }

/* ===== Settings ===== */
.settings-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 32px 32px;
  background:
    radial-gradient(ellipse 60% 80% at 100% 50%, rgba(52,211,153,0.12), transparent 60%),
    linear-gradient(135deg, rgba(45,212,191,0.06), transparent 100%);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}
.settings-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.settings-lead {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.65;
  max-width: 560px;
}
.settings-hero-img {
  display: grid; place-items: center;
}
.settings-hero-img img {
  width: 100%; max-width: 280px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(16,185,129,0.30));
}

.how-to {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.how-step {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: all 0.25s var(--bezier);
}
.how-step:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.how-num {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--emerald-400);
  letter-spacing: 0.14em;
  padding: 4px 10px;
  background: rgba(52,211,153,0.12);
  border: 1px solid var(--border-em);
  border-radius: 8px;
  height: fit-content;
}
.how-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.how-step p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-group {
  display: flex; flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  font-weight: 500;
}
.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  transition: all 0.2s;
}
.input.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.input:focus {
  outline: none;
  border-color: var(--emerald-400);
  background: rgba(4,16,26,0.7);
  box-shadow: 0 0 0 3px rgba(52,211,153,0.14);
}
.input::placeholder { color: var(--text-faint); }
input[type="number"], input[type="date"], input[type="time"], select.input {
  color-scheme: dark;
}
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}
.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  color: var(--text-primary) !important;
  cursor: pointer;
  font-family: inherit !important;
}
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--emerald-500);
  cursor: pointer;
}

.status-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.status-badge.none { background: rgba(236,254,255,0.06); color: var(--text-muted); border: 1px solid var(--border); }
.status-badge.set { background: rgba(52,211,153,0.12); color: var(--emerald-300); border: 1px solid rgba(52,211,153,0.30); }
.status-badge.tested { background: rgba(34,211,238,0.12); color: var(--cyan-400); border: 1px solid rgba(34,211,238,0.30); }

/* Docs grid */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.doc-item {
  padding: 18px 20px;
  background: rgba(236,254,255,0.025);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.25s var(--bezier);
}
.doc-item:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.doc-num {
  display: inline-block;
  font-size: 11px;
  color: var(--emerald-400);
  letter-spacing: 0.14em;
  margin-bottom: 8px;
  padding: 3px 8px;
  background: rgba(52,211,153,0.10);
  border: 1px solid var(--border-em);
  border-radius: 6px;
}
.doc-item h4 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.doc-item p { font-size: 12px; color: var(--text-secondary); line-height: 1.55; }

/* ===== Modal ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  animation: modal-fade 0.25s var(--bezier-soft);
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%; max-width: 540px;
  background: linear-gradient(180deg, #0c2129 0%, #07171f 100%);
  border: 1px solid var(--border-strong);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  padding: 20px 22px 32px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  animation: modal-slide 0.4s var(--bezier);
  max-height: 92vh;
  overflow-y: auto;
}
@keyframes modal-slide { from { transform: translateY(100%); } to { transform: translateY(0); } }
.handle {
  width: 38px; height: 4px;
  background: var(--border-strong);
  border-radius: 4px;
  margin: 0 auto 16px;
}
.modal-card h3 {
  font-family: 'Frank Ruhl Libre', serif;
  color: var(--text-primary);
  font-size: 22px; font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.modal-actions {
  display: flex; gap: 8px;
  margin-top: 16px;
}
.btn-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 12px 14px;
  font-size: 13px; font-weight: 500;
  border-radius: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-mini:hover { background: var(--surface-strong); color: var(--text-primary); }
.btn-mini.danger { color: var(--rose-400); border-color: rgba(244,63,94,0.30); }
.btn-mini.danger:hover { background: rgba(244,63,94,0.12); }

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  bottom: 22px; left: 22px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 200; pointer-events: none;
}
.toast {
  background: linear-gradient(135deg, rgba(11,35,48,0.95), rgba(4,16,26,0.95));
  border: 1px solid var(--border-strong);
  border-right: 3px solid var(--emerald-400);
  border-radius: 12px;
  padding: 12px 18px;
  color: var(--text-primary);
  font-size: 13px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.5);
  pointer-events: auto;
  backdrop-filter: blur(20px);
  animation: toast-in 0.4s var(--bezier);
  display: flex; align-items: center; gap: 10px;
  max-width: 380px;
}
.toast.success { border-right-color: var(--emerald-400); }
.toast.danger { border-right-color: var(--rose-400); }
.toast.info { border-right-color: var(--cyan-400); }
@keyframes toast-in {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
  .how-to { grid-template-columns: 1fr; }
  .settings-hero { grid-template-columns: 1fr; padding: 24px; }
  .settings-hero-img img { max-width: 200px; }
  .topbar-nav { display: none; }
}
@media (max-width: 640px) {
  main { padding: 20px 16px 40px; gap: 20px; }
  .topbar { padding: 12px 16px; gap: 14px; }
  .brand-name { display: none; }
  .stats-row { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .hero-content { padding: 28px 22px; }
  .monitor-row {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  .monitor-meta, .monitor-actions { grid-column: 1 / -1; justify-content: space-between; display: flex; }
}
