/* ============================================================
   PULSE — Complete Stylesheet
   K/20X Labs · Dark Premium SaaS Theme
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  --bg: #0A0A0A;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --accent: #FFD400;
  --accent-dim: rgba(255, 212, 0, 0.12);
  --text: #F5F5F5;
  --text-muted: #888;
  --text-subtle: #555;
  --border: #222;
  --border-light: #2a2a2a;
  --ok: #22c55e;
  --ok-dim: rgba(34, 197, 94, 0.12);
  --bad: #ef4444;
  --bad-dim: rgba(239, 68, 68, 0.12);
  --warn: #f59e0b;
  --warn-dim: rgba(245, 158, 11, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --nav-h: 60px;
  --transition: 0.15s ease;
}

/* ---------- Reset & Normalize ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 600; }
p { color: var(--text-muted); }
hr { border: none; border-top: 1px solid var(--border); }

/* ---------- Typography ---------- */
.mono, code, pre, kbd { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.875em;
  color: var(--accent);
}
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
}
pre code { background: none; border: none; padding: 0; color: var(--text); }

.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.75rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 2rem; }
.text-4xl  { font-size: 2.75rem; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-ok    { color: var(--ok); }
.text-bad   { color: var(--bad); }
.text-warn  { color: var(--warn); }
.font-mono  { font-family: 'JetBrains Mono', monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold  { font-weight: 700; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uppercase  { text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-sm { max-width: 640px; }
.container-md { max-width: 800px; }

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-wrap  { flex-wrap: wrap; }
.flex-1     { flex: 1; }
.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }

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

.mt-1  { margin-top: 0.25rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-3  { margin-top: 0.75rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.mt-8  { margin-top: 2rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-8  { margin-bottom: 2rem; }
.ml-auto { margin-left: auto; }

.p-2  { padding: 0.5rem; }
.p-4  { padding: 1rem; }
.p-6  { padding: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.relative { position: relative; }
.hidden { display: none !important; }
.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;
}

/* ---------- Navigation Bar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo:hover { opacity: 1; }
.logo .dot { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-links a.btn-primary { color: #000; }
.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0;
  transition: color var(--transition);
}
.btn-link:hover { color: var(--text); }

/* ---------- Main Content Offset ---------- */
main { padding-top: var(--nav-h); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  background: #ffe033;
  border-color: #ffe033;
  color: #000;
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--text-muted);
  color: var(--text);
  opacity: 1;
}

.btn-danger {
  background: transparent;
  color: var(--bad);
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover:not(:disabled) {
  background: var(--bad-dim);
  border-color: var(--bad);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
  opacity: 1;
}

.btn-sm {
  padding: 0.4rem 0.875rem;
  font-size: 0.8rem;
  border-radius: 6px;
}
.btn-lg {
  padding: 0.825rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.card-body { color: var(--text-muted); }

/* ---------- Status Pills ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}
.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-ok {
  background: var(--ok-dim);
  color: var(--ok);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.status-ok::before { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.status-down {
  background: var(--bad-dim);
  color: var(--bad);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.status-down::before { background: var(--bad); box-shadow: 0 0 6px var(--bad); }
.status-warn {
  background: var(--warn-dim);
  color: var(--warn);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-warn::before { background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.status-paused {
  background: rgba(136, 136, 136, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(136, 136, 136, 0.2);
}
.status-paused::before { background: var(--text-muted); }

/* ---------- Type Badges ---------- */
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.type-badge.http   { color: #60a5fa; border-color: rgba(96, 165, 250, 0.25); background: rgba(96, 165, 250, 0.08); }
.type-badge.sgtm   { color: var(--accent); border-color: rgba(255, 212, 0, 0.25); background: var(--accent-dim); }
.type-badge.meta   { color: #a78bfa; border-color: rgba(167, 139, 250, 0.25); background: rgba(167, 139, 250, 0.08); }
.type-badge.ga4    { color: #34d399; border-color: rgba(52, 211, 153, 0.25); background: rgba(52, 211, 153, 0.08); }
.type-badge.tiktok { color: #f472b6; border-color: rgba(244, 114, 182, 0.25); background: rgba(244, 114, 182, 0.08); }

/* ---------- Forms ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}
.form-group:last-child { margin-bottom: 0; }
label {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
}
.input, input[type="text"], input[type="email"], input[type="url"],
input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.875rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus, input[type="text"]:focus, input[type="email"]:focus,
input[type="url"]:focus, input[type="password"]:focus,
input[type="number"]:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.1);
}
.input::placeholder, input::placeholder, textarea::placeholder {
  color: var(--text-subtle);
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.25rem; }
textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.775rem; color: var(--text-subtle); margin-top: 0.25rem; }
.form-error { font-size: 0.775rem; color: var(--bad); margin-top: 0.25rem; }

.toggle-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-light);
  border-radius: 20px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--accent-dim); border: 1px solid rgba(255, 212, 0, 0.3); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); background: var(--accent); }

/* ---------- Navigation / Tabs ---------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.tab {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead th {
  background: var(--surface);
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
tbody tr:hover { background: var(--surface-2); }
tbody td {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  vertical-align: middle;
}
tbody td:first-child { color: var(--text); }
.td-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Monitor List Card ---------- */
.monitor-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0.625rem;
  transition: border-color var(--transition);
}
.monitor-row:hover { border-color: var(--border-light); }
.monitor-name { font-weight: 600; color: var(--text); }
.monitor-url {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-family: 'JetBrains Mono', monospace;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.latency-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text);
}
.uptime-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
}
.uptime-val.good  { color: var(--ok); }
.uptime-val.warn  { color: var(--warn); }
.uptime-val.bad   { color: var(--bad); }

/* ---------- Stat Cards ---------- */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.stat-value.ok   { color: var(--ok); }
.stat-value.bad  { color: var(--bad); }
.stat-value.warn { color: var(--warn); }
.stat-sub {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* ---------- Sparkline / Chart Container ---------- */
.chart-container {
  position: relative;
  width: 100%;
  height: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  overflow: hidden;
}
.chart-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.sparkline-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sparkline {
  flex: 1;
  height: 36px;
}

/* ---------- Uptime Bar ---------- */
.uptime-bar-row {
  display: flex;
  gap: 2px;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
}
.uptime-segment {
  flex: 1;
  border-radius: 1px;
}
.uptime-segment.ok   { background: var(--ok); }
.uptime-segment.bad  { background: var(--bad); }
.uptime-segment.warn { background: var(--warn); }
.uptime-segment.none { background: var(--border); }

/* ---------- Pricing Cards ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: start;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 20px 60px rgba(255, 212, 0, 0.08);
}
.popular-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.75rem;
  border-radius: 0 0 8px 8px;
  white-space: nowrap;
}
.plan-name {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
  margin-bottom: 0.25rem;
}
.plan-price .amount {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.plan-price .currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  align-self: flex-start;
  margin-top: 0.375rem;
}
.plan-price .period {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}
.plan-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 2.5rem;
}
.plan-features {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.75rem;
  flex: 1;
}
.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.plan-feature::before {
  content: '✓';
  color: var(--ok);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05em;
}
.pricing-card .btn { width: 100%; margin-top: auto; }

/* ---------- Feature Section ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  line-height: 1;
}
.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---------- Stack List ---------- */
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.stack-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
}
.stack-item:hover { border-color: var(--border-light); }
.stack-icon { font-size: 1.25rem; flex-shrink: 0; }
.stack-name { font-weight: 600; color: var(--text); font-size: 0.95rem; }
.stack-desc { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border: none;
  transition: background var(--transition);
  gap: 1rem;
}
.faq-question:hover { background: var(--surface-2); }
.faq-icon {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ---------- Section Styles ---------- */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { max-width: 720px; }
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 560px;
}
.hero-ctas { display: flex; gap: 0.875rem; flex-wrap: wrap; }

/* ---------- Plan Info Bar ---------- */
.plan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.plan-bar strong { color: var(--text); }
.plan-bar .usage-bar {
  width: 120px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.plan-bar .usage-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ---------- Empty State ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.empty-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ---------- Toast Notifications ---------- */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  color: var(--text);
  pointer-events: auto;
  animation: toastIn 0.25s ease forwards;
  max-width: 340px;
  min-width: 260px;
}
.toast.success { border-left: 3px solid var(--ok); }
.toast.error   { border-left: 3px solid var(--bad); }
.toast.warn    { border-left: 3px solid var(--warn); }
.toast.info    { border-left: 3px solid #60a5fa; }
.toast.hiding  { animation: toastOut 0.2s ease forwards; }
.toast-icon    { font-size: 1rem; flex-shrink: 0; }
.toast-msg     { flex: 1; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(1rem); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(1rem); }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(1rem) scale(0.98);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.375rem;
  line-height: 1;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--surface-2); }
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
.spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Page Header ---------- */
.page-header {
  padding: 2rem 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.page-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--text); opacity: 1; }

/* ---------- Status Page (Public) ---------- */
.status-hero {
  padding: 4rem 0 3rem;
  text-align: center;
}
.status-hero .big-status {
  font-size: 1.125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.big-status.ok   { background: var(--ok-dim); color: var(--ok); border: 1px solid rgba(34, 197, 94, 0.25); }
.big-status.bad  { background: var(--bad-dim); color: var(--bad); border: 1px solid rgba(239, 68, 68, 0.25); }
.big-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px currentColor; }
  50% { opacity: 0.7; box-shadow: 0 0 16px currentColor; }
}

/* ---------- Divider ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.divider-sm { margin: 1rem 0; }

/* ---------- Alert/Banner ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
}
.alert-info    { background: rgba(96, 165, 250, 0.08); border: 1px solid rgba(96, 165, 250, 0.2); color: #93c5fd; }
.alert-success { background: var(--ok-dim); border: 1px solid rgba(34, 197, 94, 0.2); color: #86efac; }
.alert-warn    { background: var(--warn-dim); border: 1px solid rgba(245, 158, 11, 0.2); color: #fcd34d; }
.alert-error   { background: var(--bad-dim); border: 1px solid rgba(239, 68, 68, 0.2); color: #fca5a5; }

/* ---------- Login / Auth Page ---------- */
.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
}
.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.375rem;
  text-align: center;
}
.auth-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

/* ---------- Incidents ---------- */
.incident-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--bad-dim);
  border-left: 3px solid var(--bad);
  border-radius: var(--radius);
  margin-bottom: 0.625rem;
}
.incident-item.resolved {
  border-color: var(--border);
  border-left-color: var(--ok);
  opacity: 0.8;
}
.incident-title { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.incident-meta  { font-size: 0.8rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
}
.footer p {
  font-size: 0.825rem;
  color: var(--text-muted);
  text-align: center;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

/* ---------- Powered-by Badge ---------- */
.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  text-decoration: none;
}
.powered-by:hover { color: var(--text-muted); border-color: var(--border-light); opacity: 1; }
.powered-by .dot { color: var(--accent); }

/* ---------- Utility ---------- */
.no-scroll { overflow: hidden; }
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .hero { padding: 3rem 0 3rem; min-height: auto; }
  .hero h1 { font-size: 2.25rem; }
  .pricing-grid { grid-template-columns: 1fr; gap: 0.875rem; }
  .pricing-card.popular { order: -1; }
  .feature-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .monitor-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    gap: 0.5rem;
  }
  .nav-links { gap: 1rem; }
  .section-title { font-size: 1.75rem; }
  .modal { max-width: 100%; }
  .auth-card { padding: 2rem 1.5rem; }
  table { font-size: 0.8rem; }
  thead th, tbody td { padding: 0.6rem 0.75rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero h1 { font-size: 2rem; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .nav-links .btn-sm { display: none; }
  .page-header { flex-direction: column; align-items: flex-start; }
  #toast-container { left: 1rem; right: 1rem; }
  .toast { max-width: 100%; min-width: 0; }
}
