:root {
  --bg: #0f1419;
  --card: #1a2332;
  --border: #2d3a4f;
  --text: #e7ecf3;
  --muted: #8b9bb4;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #22c55e;
  --error: #ef4444;
  --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 960px; margin: 0 auto; padding: 1.5rem; }
.container.narrow { max-width: 480px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
h1, h2, h3 { margin-bottom: 0.75rem; font-weight: 600; }
.muted { color: var(--muted); font-size: 0.95rem; }
.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid var(--error); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.15); border: 1px solid var(--success); color: #86efac; }
.alert-info { background: rgba(59,130,246,0.15); border: 1px solid var(--primary); color: #93c5fd; }
label { display: block; margin-bottom: 1rem; font-size: 0.9rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea, select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
}
input:focus, textarea:focus { outline: none; border-color: var(--primary); }
fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
legend { padding: 0 0.5rem; color: var(--muted); font-size: 0.85rem; }
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-danger { background: var(--error); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 2rem;
}
.nav-brand { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.nav-links a { margin-left: 1.25rem; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.check-list { list-style: none; margin: 1.5rem 0; }
.check-list li { padding: 0.4rem 0; }
.check-list .ok::before { content: "✓ "; color: var(--success); }
.check-list .fail::before { content: "✗ "; color: var(--error); }
.table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.table th, .table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; background: var(--border); }
.code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  margin: 1rem 0;
  white-space: pre-wrap;
}
.faq-cat { margin-bottom: 2rem; }
.faq-item { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.faq-q { padding: 1rem; background: var(--card); cursor: pointer; font-weight: 500; }
.faq-a { padding: 1rem; display: none; border-top: 1px solid var(--border); color: var(--muted); }
.faq-item.open .faq-a { display: block; }
.footer { text-align: center; padding: 2rem; color: var(--muted); font-size: 0.85rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.install-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.consent-scopes { margin: 1rem 0; padding-left: 1.25rem; }
.consent-scopes li { margin: 0.3rem 0; }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  margin-bottom: 2rem;
}
.hero-content h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 1rem;
}
.brand-accent {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}
.hero-user { margin-bottom: 1rem; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ===== Projects ===== */
.projects-section { margin-bottom: 2.5rem; }
.section-title { text-align: center; margin-bottom: 0.5rem; }
.section-sub { text-align: center; margin-bottom: 2rem; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  text-decoration: none;
  color: var(--text);
}
.project-logo {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.logo-prefix {
  color: var(--text);
  padding-right: 2px;
}
.logo-badge {
  background: var(--primary);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  margin-left: 2px;
}
.logo-obmen { color: #f59e0b; }
.logo-region {
  background: #f59e0b;
  color: #111;
}
.project-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}
.project-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.15rem;
}
.project-card p {
  color: var(--muted);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}
.project-link {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
}

/* Themes */
.theme-fly .logo-badge { background: #0ea5e9; }
.theme-fly:hover { border-color: #0ea5e9; }
.theme-zap .logo-badge { background: #f97316; }
.theme-zap:hover { border-color: #f97316; }
.theme-search .logo-badge { background: #8b5cf6; }
.theme-search:hover { border-color: #8b5cf6; }
.theme-reviews .logo-badge { background: #f59e0b; color: #111; }
.theme-reviews:hover { border-color: #f59e0b; }
.theme-host .logo-badge { background: #22c55e; }
.theme-host:hover { border-color: #22c55e; }

/* Steps */
.steps { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.25rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  width: 32px; height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}

/* ===== Admin Analytics ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem;
  text-align: center;
}
.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}
.stat-card .label {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}
.stat-card .delta {
  font-size: 0.8rem;
  margin-top: 0.35rem;
}
.delta-up { color: var(--success); }
.delta-down { color: var(--error); }
.delta-zero { color: var(--muted); }

.load-bar-wrap {
  background: var(--bg);
  border-radius: 8px;
  height: 14px;
  overflow: hidden;
  margin: 0.75rem 0;
  border: 1px solid var(--border);
}
.load-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.4s;
}
.load-ok { background: var(--success); }
.load-warn { background: #f59e0b; }
.load-crit { background: var(--error); }

.alert-warn {
  background: rgba(245,158,11,0.15);
  border: 1px solid #f59e0b;
  color: #fcd34d;
}
