:root {
  --ink: #14213d;
  --ink-soft: #4b5d7b;
  --sand: #fffaf0;
  --paper: #ffffff;
  --sun: #f7c873;
  --sea: #bde8f0;
  --sage: #d8e7c9;
  --border: rgba(20, 33, 61, 0.12);
  --shadow: 0 20px 50px rgba(20, 33, 61, 0.08);
  --danger: #b3261e;
  --success: #2a7a4b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(247, 200, 115, 0.45), transparent 30%),
    radial-gradient(circle at top right, rgba(189, 232, 240, 0.55), transparent 35%),
    linear-gradient(180deg, #fffdf7 0%, #f8f4ea 100%);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.25rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar__user {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.page {
  display: grid;
  gap: 1.25rem;
}

.flash {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
}

.flash--alert {
  border-color: rgba(179, 38, 30, 0.2);
  color: var(--danger);
}

.flash--notice {
  border-color: rgba(42, 122, 75, 0.2);
  color: var(--success);
}

.hero,
.panel,
.auth-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 1.5rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--sun);
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.hero h1,
.panel h2,
.auth-card h1 {
  margin: 0 0 0.5rem;
}

.hero p,
.muted,
.panel__subtle {
  color: var(--ink-soft);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid--plans {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--dashboard {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 1024px) {
  .grid--dashboard {
    grid-template-columns: 1fr;
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
}

.card--voting {
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card--voting:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(20, 33, 61, 0.06);
}

.card--selected {
  border: 2px solid var(--sun);
  background: linear-gradient(180deg, #ffffff 0%, rgba(247, 200, 115, 0.05) 100%);
}

.card__badge {
  position: absolute;
  top: -10px;
  right: 15px;
  background: var(--sun);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(247, 200, 115, 0.3);
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--sea);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.avatar:first-child {
  margin-left: 0;
}

.stat--featured {
  background: linear-gradient(135deg, var(--sun) 0%, #f9d8a1 100%);
  color: var(--ink);
}

.form-toggle {
  display: none;
}

.form-toggle:checked + .form-content {
  display: block;
}

.form-content {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.label-button {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.label-button:hover {
  color: var(--ink);
}

.panel {
  padding: 1.25rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.stat {
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(189, 232, 240, 0.42), rgba(216, 231, 201, 0.38));
}

.stat strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
}

.button,
button,
input[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 700;
  min-height: 42px;
  padding: 0.75rem 1.1rem;
  text-decoration: none;
}

.button--ghost {
  background: rgba(20, 33, 61, 0.08);
  color: var(--ink);
}

.button--soft {
  background: var(--sun);
  color: var(--ink);
}

.stack,
form {
  display: grid;
  gap: 0.9rem;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  font: inherit;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.96);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.card-list {
  display: grid;
  gap: 0.8rem;
}

.card {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
}

.badge {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.auth-card {
  max-width: 560px;
  margin: 2rem auto;
  padding: 1.5rem;
}

.list {
  margin: 0;
  padding-left: 1.1rem;
}

.split-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.empty-state {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed var(--border);
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar__actions {
    width: 100%;
    flex-wrap: wrap;
  }
}
