/* AirVoting design system */
:root {
  --bg: #f3f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;

  --primary: #14b8a6;
  --primary-2: #5eead4;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius-lg: 16px;
  --radius-xl: 24px;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: #0f766e; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
::selection { background: rgba(20, 184, 166, 0.2); }
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25); }

/* Utilities */
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-6); width: 100%; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.text-muted { color: var(--muted); }

/* Layout */
.layout { display: flex; min-height: 100vh; gap: var(--space-6); padding: var(--space-6); }
.main { flex: 1; display: flex; flex-direction: column; gap: var(--space-5); }
.content { flex: 1; }

.sidebar {
  width: 260px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: sticky;
  top: var(--space-6);
  height: calc(100vh - var(--space-6) * 2);
}
.sidebar-logo { display: flex; gap: var(--space-3); align-items: center; }
.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.logo-title { font-size: 1rem; font-weight: 700; }
.logo-subtitle { font-size: 0.8rem; color: var(--muted); }
.sidebar-nav { display: flex; flex-direction: column; gap: var(--space-2); }
.sidebar-link {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.sidebar-link:hover { background: rgba(20, 184, 166, 0.08); color: #0f766e; }
.sidebar-link.is-active { background: rgba(20, 184, 166, 0.18); color: #0f766e; }
.sidebar-link.is-active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 60%;
  border-radius: 999px;
  background: var(--primary);
}
.sidebar-card {
  margin-top: auto;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.sidebar-card h4 { font-size: 0.95rem; margin-bottom: var(--space-2); }
.sidebar-card p { font-size: 0.85rem; color: var(--muted); margin-bottom: var(--space-3); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 999px;
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: var(--space-6);
  z-index: 10;
  backdrop-filter: blur(10px);
}
.topbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
}
.topbar-search input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 0.95rem;
  color: var(--text);
}
.topbar-actions { display: flex; align-items: center; gap: var(--space-3); }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* Admin topbar: hide sidebar hamburger on desktop */
@media (min-width: 721px) {
  .topbar-menu-btn { display: none; }
}

/* Notifications dropdown */
.notif-wrap { position: relative; }
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.25);
}
.notif-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  z-index: 60;
}
.notif-pop-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}
.notif-list { display: grid; }
.notif-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(20, 184, 166, 0.06); }
.notif-item-title { font-weight: 750; font-size: 0.92rem; }
.notif-item-sub { font-size: 0.82rem; }
.profile-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  box-shadow: var(--shadow-sm);
}
.profile-meta { display: flex; flex-direction: column; line-height: 1.1; }
.profile-name { font-size: 0.85rem; font-weight: 600; }
.profile-role { font-size: 0.7rem; color: var(--muted); }
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Typography */
.page-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.page-subtitle { color: var(--muted); }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  border: 1px solid rgba(226, 232, 240, 0.7);
}
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.card-title { font-size: 1.25rem; font-weight: 700; }
.card-subtitle { color: var(--muted); font-size: 0.95rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: white; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: #0f766e; }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

/* Badges */
.badge { display: inline-flex; padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.badge-warning { background: rgba(245, 158, 11, 0.18); color: #b45309; }
.badge-muted { background: rgba(148, 163, 184, 0.2); color: #475569; }

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { border-radius: var(--radius-lg); min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: none; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2); outline: none; }
.input.error { border-color: var(--danger); animation: shake 0.4s ease; }
.input.success { border-color: var(--success); }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* Progress */
.progress-bar { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.3s ease; }

/* Stat card */
.stat-card { display: flex; gap: var(--space-3); align-items: center; }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(20, 184, 166, 0.15);
  display: grid;
  place-items: center;
  color: #0f766e;
  font-weight: 700;
}
.stat-value { font-size: 1.6rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 0.9rem; }

/* Empty state */
.empty-state {
  border: 2px dashed rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  color: var(--muted);
}

/* Option cards */
.option-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s;
}
.option-card:hover { transform: translateY(-2px); border-color: rgba(20, 184, 166, 0.4); }
.option-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2); }

/* Rating */
.rating-pill, .score-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.rating-pill:hover, .score-btn:hover { border-color: var(--primary); }
.rating-pill.selected, .score-btn.selected { background: var(--primary); color: white; border-color: var(--primary); }
.rating-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

/* Toast */
.toast {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  background: var(--text);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Page-specific helpers */
.page-header { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.polls-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.poll-card { display: flex; flex-direction: column; gap: var(--space-4); min-height: 220px; }
.poll-card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.poll-badges { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.poll-menu {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.poll-menu:hover { color: #0f766e; }
.poll-meta { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.poll-stats { display: flex; align-items: center; gap: var(--space-2); color: var(--muted); font-size: 0.9rem; }
.poll-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: auto; }
.empty-state-cta {
  border: 2px dashed rgba(148, 163, 184, 0.6);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  text-align: center;
  display: grid;
  gap: var(--space-3);
  justify-items: center;
}
.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.15);
  display: grid;
  place-items: center;
  color: #0f766e;
  font-weight: 700;
}
.empty-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
.form-group { margin-bottom: var(--space-4); }
.form-group label { display: block; font-weight: 600; margin-bottom: var(--space-2); }
.builder-progress { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); }
.builder-step {
  flex: 1;
  padding: 0.7rem;
  text-align: center;
  background: #e2e8f0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}
.builder-step.done { background: rgba(34, 197, 94, 0.18); color: #15803d; }
.builder-step.active { background: var(--primary); color: white; }
.item-row { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4); background: #f8fafc; border-radius: var(--radius-lg); margin-bottom: var(--space-3); }
.item-row img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-lg); }
.item-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.invite-link { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; word-break: break-all; }
.result-row { margin-bottom: var(--space-4); }
.result-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.score-text { font-weight: 700; color: #0f766e; }
.vote-options { display: flex; flex-direction: column; gap: var(--space-4); }
.vote-option { cursor: pointer; display: block; text-align: left; }
.vote-option img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-lg); float: right; margin-left: var(--space-4); }
.vote-progress { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); font-weight: 600; color: var(--muted); }
.score-row { margin-bottom: var(--space-5); }
.score-btns { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.vote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.vote-card {
  display: grid;
  gap: var(--space-3);
  border-radius: var(--radius-xl);
  border: 2px solid transparent;
  background: white;
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.vote-card:hover { transform: translateY(-2px); border-color: rgba(20, 184, 166, 0.4); }
.vote-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2); }
.vote-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; height: 140px; background: rgba(20, 184, 166, 0.12); display: grid; place-items: center; }
.vote-media img { width: 100%; height: 100%; object-fit: cover; }
.vote-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #0f766e; font-size: 1.6rem; font-weight: 700; }
.vote-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: none;
  place-items: center;
  font-size: 0.9rem;
}
.vote-card.selected .vote-check { display: grid; }
.vote-body p { margin-top: 0.35rem; font-size: 0.9rem; }
.vote-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.vote-brand { display: flex; align-items: center; gap: var(--space-2); font-weight: 700; }
.vote-close { font-size: 1.5rem; color: var(--muted); }
.vote-progress-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.vote-score-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-4);
  align-items: center;
}
.vote-score-media {
  height: 140px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(20, 184, 166, 0.12);
  display: grid;
  place-items: center;
}
.vote-score-media img { width: 100%; height: 100%; object-fit: cover; }
.vote-score-placeholder { font-size: 1.8rem; font-weight: 700; color: #0f766e; }
.vote-score-body { display: grid; gap: var(--space-3); }
.vote-rating { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.vote-rating-labels { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); }
.vote-sticky {
  position: sticky;
  bottom: var(--space-4);
  margin-top: var(--space-3);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  display: grid;
  gap: var(--space-3);
}
.vote-sticky-links { display: flex; justify-content: space-between; font-size: 0.85rem; }
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.results-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.stat-tile { display: flex; align-items: center; gap: var(--space-3); }
.results-card { padding: var(--space-5); }
.results-list { display: grid; gap: var(--space-4); }
.result-item { display: grid; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-lg); border: 1px solid var(--border); background: #fff; }
.result-item.is-winner { border-color: rgba(34, 197, 94, 0.5); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15); }
.result-item-head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: flex-start; }
.result-item-meta { display: flex; align-items: center; gap: var(--space-2); color: var(--muted); font-size: 0.9rem; }
.score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.score-mini-title { font-weight: 600; margin-bottom: var(--space-2); }
.score-mini-value { font-size: 1.6rem; font-weight: 700; margin-bottom: var(--space-3); }
.score-mini-value span { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.score-bars { display: grid; gap: var(--space-2); }
.score-bar { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.score-bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-5); }
.auth-card { max-width: 420px; width: 100%; }
.auth-title { font-size: 1.8rem; font-weight: 700; margin-bottom: var(--space-2); }
.auth-subtitle { color: var(--muted); margin-bottom: var(--space-4); }
.voter-container { max-width: 680px; margin: 0 auto; }
.code-input { font-size: 1.4rem; letter-spacing: 0.3em; text-align: center; text-transform: uppercase; }

/* Code entry */
.code-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: rgba(15, 118, 110, 0.08);
}
.code-card { max-width: 420px; width: 100%; text-align: center; }
.code-lock {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.15);
  display: grid;
  place-items: center;
  margin: 0 auto var(--space-3);
  font-size: 1.3rem;
  color: #0f766e;
}
.code-form { display: grid; gap: var(--space-4); }
.code-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-2); }
.code-dot-input {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  background: white;
}
.code-dot-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2); outline: none; }
.code-error { animation: shake 0.4s ease; }
.btn-lg { padding: 0.9rem 1.8rem; font-size: 1rem; }

/* Thanks */
.thanks-card { max-width: 520px; width: 100%; text-align: center; display: grid; gap: var(--space-4); }
.thanks-hero { position: relative; display: grid; place-items: center; margin: 0 auto; }
.thanks-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.emoji-chip {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}
.chip-left { left: -10px; top: 6px; }
.chip-right { right: -10px; top: 6px; }
.thanks-title { font-size: 2rem; font-weight: 700; }
.thanks-copy { color: var(--muted); }
.thanks-actions { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }
.achievement-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #f8fafc;
}
.xp-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.18);
  color: #0f766e;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Wizard */
.wizard-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.wizard-step-label { color: var(--muted); font-weight: 600; letter-spacing: 0.08em; font-size: 0.75rem; }
.wizard-progress-meta { min-width: 220px; display: grid; gap: var(--space-2); font-size: 0.85rem; color: var(--muted); }
.stepper { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.stepper-item { display: flex; align-items: center; gap: var(--space-2); color: var(--muted); font-weight: 600; }
.stepper-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  background: white;
}
.stepper-item.is-active { color: #0f766e; }
.stepper-item.is-active .stepper-circle { border-color: var(--primary); color: #0f766e; }
.stepper-item.is-done .stepper-circle { background: rgba(34, 197, 94, 0.2); border-color: rgba(34, 197, 94, 0.4); color: #15803d; }
.wizard-card { max-width: 860px; }
.wizard-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}
.segment { display: inline-flex; background: #f1f5f9; border-radius: 999px; padding: 0.25rem; gap: 0.25rem; }
.segment-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.segment-btn.is-active { background: white; color: #0f766e; box-shadow: var(--shadow-sm); }
.segment-select { display: none; }
.option-list { display: grid; gap: var(--space-3); }
.option-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  background: #fff;
}
.option-item--no-thumb {
  grid-template-columns: 1fr auto;
}
.option-thumb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.12);
  display: grid;
  place-items: center;
  color: #0f766e;
  font-weight: 700;
  overflow: hidden;
}
.option-thumb img { width: 100%; height: 100%; object-fit: cover; }
.option-body p { margin-top: 0.25rem; font-size: 0.9rem; }
.option-actions { display: flex; gap: var(--space-2); align-items: center; }
.dashed-card { border: 2px dashed rgba(148, 163, 184, 0.5); background: rgba(255, 255, 255, 0.75); }
#poll-options,
#poll-add-option {
  scroll-margin-top: 6rem;
}

/* Invite screen */
.poll-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.poll-header-left { display: flex; align-items: center; gap: var(--space-3); }
.poll-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.15);
  display: grid;
  place-items: center;
  color: #0f766e;
  font-weight: 700;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}
.status-dot.muted { background: var(--border); }
.invite-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.invite-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.btn-accent { background: #fb923c; color: #1f2937; }
.btn-accent:hover { background: #f97316; }
.input-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.input-row .input { flex: 1; }
.mini-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.alert { padding: 0.8rem 1rem; border-radius: var(--radius-lg); margin-bottom: var(--space-4); font-size: 0.9rem; }
.alert-success { background: rgba(34, 197, 94, 0.15); color: #166534; }
.alert-danger { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }

/* Confetti container */
.confetti-container { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 9999; }

/* Mobile */
@media (max-width: 1024px) {
  .layout { padding: var(--space-4); gap: var(--space-4); }
  .sidebar { position: fixed; left: var(--space-4); top: var(--space-4); height: calc(100vh - var(--space-4) * 2); transform: translateX(-120%); transition: transform 0.25s ease; z-index: 20; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .main { gap: var(--space-4); }
  .topbar { position: sticky; top: var(--space-4); }
}

@media (max-width: 1100px) {
  .polls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vote-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; border-radius: var(--radius-lg); }
  .topbar-search { order: 3; width: 100%; }
  .container { padding: 0 var(--space-4); }
  .page-header { flex-direction: column; align-items: flex-start; }
  .vote-option img { float: none; margin: 0 0 var(--space-2) 0; width: 100%; height: auto; }
  .polls-grid { grid-template-columns: 1fr; }
  .option-item { grid-template-columns: 1fr; }
  .option-actions { justify-content: flex-start; }
  .stat-grid { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: 1fr; }
  .code-inputs { justify-content: center; grid-template-columns: repeat(6, 40px); }
  .code-dot-input { width: 40px; height: 40px; }
  .vote-score-card { grid-template-columns: 1fr; }
  .vote-progress-row { grid-template-columns: 1fr; }
}
