:root {
  --bg: #020617;
  --bg-2: #0f172a;
  --card: rgba(15, 23, 42, 0.88);
  --line: rgba(148, 163, 184, 0.22);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --green: #22c55e;
  --green-2: #16a34a;
  --danger: #f87171;
  --blue: #93c5fd;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(34, 197, 94, 0.16), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(37, 99, 235, 0.14), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}
body.has-site-nav { display: flex; flex-direction: column; min-height: 100vh; }
a { color: #86efac; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
.page-wrap { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 48px; flex: 1; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.home-intro { text-align: center; margin: 12px auto 28px; max-width: 760px; }
.home-intro h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0 0 12px; }
.group-lead, .muted, .meta { color: var(--muted); }
.group-lead { font-size: 1.05rem; }
.groups-list { display: grid; gap: 12px; }
.groups-list-item, .poll-item {
  display: flex; gap: 14px; align-items: center;
  text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px;
}
.groups-list-item:hover, .poll-item:hover { border-color: rgba(34, 197, 94, 0.45); }
.groups-list-body { flex: 1; min-width: 0; }
.groups-list-body h2 { margin: 0 0 6px; font-size: 1.15rem; }
.groups-list-body p { margin: 0 0 8px; color: var(--muted); }
.group-catalog-badge, .badge, .territory-badge, .status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  color: #cbd5e1; font-size: 0.82rem;
}
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700;
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--green), var(--green-2)); color: #052e16; }
.btn-secondary, .btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-facebook { color: var(--blue); text-decoration: none; font-weight: 700; }
.form-grid, .group-form-grid { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
label { font-size: 0.9rem; color: #cbd5e1; }
input, select, textarea {
  width: 100%; border-radius: 12px; border: 1px solid var(--line);
  background: #020617; color: var(--text); padding: 12px 14px; font: inherit;
}
.section-label { font-weight: 800; margin-bottom: 8px; }
.flash, .error { color: var(--danger); }
.success { color: #86efac; }
.poll-header, .poll-title-row, .title-actions, .result-label {
  display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap;
}
.poll-title { margin: 0; }
.poll-options, .result-list { display: grid; gap: 10px; margin: 16px 0; }
.poll-option, .result-row { background: rgba(2, 6, 23, 0.45); border-radius: 12px; padding: 12px; }
.progress-bar { height: 8px; border-radius: 999px; background: #1e293b; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green), #4ade80); }
.status-badge.live { color: #86efac; }
.status-badge.ended { color: #94a3b8; }
.pill { display: inline-flex; gap: 8px; align-items: center; border-radius: 999px; padding: 6px 10px; background: rgba(34, 197, 94, 0.12); }
.pill-expired { background: rgba(248, 113, 113, 0.12); }
.site-footer { border-top: 1px solid var(--line); background: rgba(2, 6, 23, 0.72); }
.site-footer-inner { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 28px; }
.site-footer p { margin: 0 0 10px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: white; }
.login-wrap { max-width: 460px; margin: 0 auto; }
@media (max-width: 700px) {
  .groups-list-item { flex-wrap: wrap; }
  .groups-list-cta { width: 100%; }
}
