:root {
  --green-900: #0f3d2e;
  --green-700: #1a5c42;
  --green-600: #1e6b4f;
  --green-500: #2a8a5f;
  --green-400: #3da876;
  --green-200: #c8ead9;
  --green-100: #e9f5ef;
  --green-50: #f4faf7;
  --text: #1a1f1d;
  --text-light: #4a5a53;
  --muted: #6b7c74;
  --bg: #ffffff;
  --bg-soft: #fafcfb;
  --border: #e2ebe6;
  --shadow-sm: 0 2px 8px rgba(15, 61, 46, 0.04);
  --shadow: 0 4px 20px rgba(15, 61, 46, 0.06);
  --shadow-lg: 0 8px 32px rgba(15, 61, 46, 0.1);
  --shadow-hover: 0 12px 40px rgba(15, 61, 46, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "Inter", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  animation: fadeIn 400ms ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Header & Navigation */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 220ms ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand__badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-100) 0%, var(--green-200) 100%);
  display: grid;
  place-items: center;
  color: var(--green-700);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  transition: all 220ms ease;
}

.brand:hover .brand__badge {
  background: linear-gradient(135deg, var(--green-200) 0%, var(--green-400) 100%);
  color: white;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand__subtitle {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 400;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--green-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 999px;
  transition: all 220ms ease;
  background: var(--green-50);
  border: 1px solid transparent;
}

.nav a:hover {
  background: var(--green-100);
  border-color: var(--green-200);
  transform: translateY(-1px);
}

.nav a.active {
  background: var(--green-700);
  color: white;
}

/* Cards */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: all 280ms ease;
  animation: fadeInUp 400ms ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0ms; }
.card:nth-child(2) { animation-delay: 60ms; }
.card:nth-child(3) { animation-delay: 120ms; }
.card:nth-child(4) { animation-delay: 180ms; }
.card:nth-child(5) { animation-delay: 240ms; }

.card--soft {
  background: var(--green-50);
  border-color: var(--green-100);
  box-shadow: none;
}

.card--clickable {
  cursor: pointer;
}

.card--clickable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--green-200);
}

.card--highlight {
  background: linear-gradient(135deg, var(--green-50) 0%, white 100%);
  border-color: var(--green-200);
}

/* Typography */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  color: var(--text);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

p {
  margin-bottom: 16px;
  color: var(--text-light);
  line-height: 1.65;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* Buttons */
.button {
  appearance: none;
  border: none;
  background: var(--green-700);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 220ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 2px solid transparent;
}

.button:hover {
  background: var(--green-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 107, 79, 0.25);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button--secondary {
  background: transparent;
  color: var(--green-700);
  border: 2px solid var(--green-200);
}

.button--secondary:hover {
  background: var(--green-50);
  border-color: var(--green-400);
  box-shadow: none;
}

.button--ghost {
  background: transparent;
  color: var(--green-700);
  border: 1px solid var(--border);
  padding: 12px 20px;
}

.button--ghost:hover {
  background: var(--green-50);
  border-color: var(--green-200);
  box-shadow: none;
}

.button--small {
  padding: 10px 16px;
  font-size: 0.875rem;
}

.button--full {
  width: 100%;
}

/* Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  transition: all 220ms ease;
  background: var(--bg);
}

.input:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(42, 138, 95, 0.1);
}

.input::placeholder {
  color: var(--muted);
}

.input--error {
  border-color: #e53935;
}

.input--error:focus {
  box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.1);
}

.input--small {
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.925rem;
  color: var(--text-light);
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green-500);
  cursor: pointer;
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.925rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: fadeInUp 300ms ease-out;
}

.alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert--success {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-200);
}

.alert--info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Grid */
.grid {
  display: grid;
  gap: 20px;
}

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

.grid--tight {
  gap: 12px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge--active {
  background: var(--green-100);
  color: var(--green-700);
}

.badge--closed {
  background: #f3f4f6;
  color: #6b7280;
}

/* Poll Cards */
.poll-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.poll-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.poll-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.poll-card__question {
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

.poll-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* Progress Bars */
.progress {
  height: 10px;
  background: var(--green-50);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--green-100);
}

.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green-500) 0%, var(--green-400) 100%);
  width: 0;
  transition: width 400ms ease;
  border-radius: 999px;
}

.progress__bar--secondary {
  background: var(--green-200);
}

/* Results */
.result-row {
  margin-bottom: 16px;
}

.result-row__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.result-row__label {
  font-weight: 600;
  color: var(--text);
}

.result-row__value {
  color: var(--muted);
}

/* Utilities */
.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.flex--start {
  justify-content: flex-start;
}

.flex--center {
  justify-content: center;
}

.flex--wrap {
  flex-wrap: wrap;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--muted);
}

.text-small {
  font-size: 0.875rem;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.hidden {
  display: none !important;
}

/* Footer */
.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer__admin {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
}

.footer__admin a {
  color: #999;
  text-decoration: none;
}

.footer__admin a:hover {
  color: #666;
  text-decoration: underline;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* Link */
.link {
  color: var(--green-700);
  text-decoration: none;
  font-weight: 500;
  transition: all 200ms ease;
}

.link:hover {
  color: var(--green-500);
  text-decoration: underline;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 32px 0 48px;
}

.hero__title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 32px 16px 60px;
  }
  
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .nav {
    width: 100%;
  }
  
  .nav a {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  .hero__title {
    font-size: 1.75rem;
  }
  
  .card {
    padding: 20px;
  }
}
