/* ===== Local Inter font ===== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/Inter-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/Inter-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/Inter-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/Inter-Bold.woff2') format('woff2'); }

/* ===== Design Tokens (Light) ===== */
:root {
  --accent: #3B6EB5;
  --accent-hover: #2D5A9E;
  --accent-subtle: #D6E4F5;
  --bg-page: #EFF3F8;
  --bg-card: #F7F9FC;
  --bg-elevated: #E4EAF2;
  --bg-header: #FFFFFF;
  --border: #D0DAE6;
  --text-primary: #1A2B42;
  --text-secondary: #5A6F87;
  --text-muted: #8B9DB5;
  --white: #FFFFFF;
  --badge-active: #2E8B57;
  --badge-active-bg: #D4EDDA;
  --badge-closed: #C0392B;
  --badge-closed-bg: #F5D5D5;
  --success: #2E8B57;
  --success-bg: #D4EDDA;
  --vote-no: #D4850A;
  --vote-info: #8B9DB5;
}

/* ===== Design Tokens (Dark) ===== */
[data-theme="dark"] {
  --accent: #5B8ED8;
  --accent-hover: #4A7DC4;
  --accent-subtle: #253A52;
  --bg-page: #1B2231;
  --bg-card: #242D3D;
  --bg-elevated: #2E3A4C;
  --bg-header: #1E2736;
  --border: #354050;
  --text-primary: #E4EAF2;
  --text-secondary: #9AABBE;
  --text-muted: #7088A0;
  --white: #E4EAF2;
  --badge-active: #3EA86C;
  --badge-active-bg: #1C3328;
  --badge-closed: #E05545;
  --badge-closed-bg: #3A2228;
  --success: #3EA86C;
  --success-bg: #1C3328;
  --vote-no: #F0993E;
  --vote-info: #7088A0;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== Base ===== */
html {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
}

/* ===== Typography ===== */
h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.3;
  color: var(--text-primary);
}

h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.4;
  color: var(--text-primary);
}

h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== Header ===== */
.site-header {
  width: 100%;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo i,
.logo svg {
  color: var(--accent);
  width: 24px;
  height: 24px;
}

.logo span {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 500;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* ===== Main Content ===== */
main {
  flex: 1;
  width: 100%;
}

.page-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-header .subtitle {
  font-size: 15px;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.site-footer {
  width: 100%;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-inner p {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ===== Info Banner ===== */
.info-banner {
  border-radius: 10px;
  background: var(--accent-subtle);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.info-banner i,
.info-banner > svg {
  flex-shrink: 0;
  color: var(--accent);
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.info-banner .banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-banner .banner-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.info-banner p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-banner a {
  color: var(--accent);
  font-weight: 500;
}

.info-banner a:hover {
  text-decoration: underline;
}

/* ===== Voter Counter (header) ===== */
.voter-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: 99px;
}

.voter-counter i,
.voter-counter svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.voter-counter strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-active {
  background: var(--badge-active-bg);
  color: var(--badge-active);
}

.badge-closed {
  background: var(--badge-closed-bg);
  color: var(--badge-closed);
}

/* ===== Voting Card ===== */
.voting-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.voting-card {
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px #0D1B2A12;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

[data-theme="dark"] .voting-card {
  box-shadow: 0 1px 3px #0D1B2A30;
}

.voting-card:hover {
  box-shadow: 0 2px 6px #0D1B2A0A;
  transform: translateY(-1px);
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.card-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

.card-description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.15s;
}

.card-link:hover {
  opacity: 0.8;
}

.card-link-secondary {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  transition: color 0.15s;
}

.card-link-secondary:hover {
  color: var(--text-secondary);
}

/* ===== Featured Card ===== */
.voting-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.voting-card.featured .card-body {
  padding: 32px;
  gap: 16px;
  flex: 1;
}

.voting-card.featured .card-title {
  font-size: 24px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.voting-card.featured .card-description {
  font-size: 15px;
  line-height: 1.7;
}

.voting-card.featured .card-footer {
  border-top: none;
  border-left: 1px solid var(--border);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 48px;
  gap: 16px;
  margin-top: 0;
}

.voting-card.featured .card-link {
  font-size: 15px;
}

@media (max-width: 768px) {
  .voting-card.featured {
    flex-direction: column;
  }

  .voting-card.featured .card-footer {
    border-left: none;
    border-top: 1px solid var(--border);
    flex-direction: row;
    padding: 14px 24px;
  }
}

/* ===== Back Link ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.back-link i,
.back-link svg {
  width: 16px;
  height: 16px;
}

.back-link:hover {
  color: var(--text-primary);
}

/* ===== Subtitle ===== */
.subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

/* ===== Vote Card (form container) ===== */
.vote-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 1px 3px #0D1B2A12;
}

[data-theme="dark"] .vote-card {
  box-shadow: 0 1px 3px #0D1B2A30;
}

.vote-card h3 {
  margin-bottom: 20px;
}

/* ===== Vote Options ===== */
.vote-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.vote-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}

.vote-option:hover {
  border-color: var(--accent);
}

.vote-option.selected {
  border: 2px solid var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 0 1px var(--accent);
}

.vote-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.vote-option.selected .radio-circle {
  border-color: var(--accent);
}

.vote-option.selected .radio-circle::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.option-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ===== Button ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* ===== Context Section ===== */
.context-section {
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.section-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.context-body p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

.context-body p:last-child {
  margin-bottom: 0;
}

/* ===== Results Card ===== */
.results-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 6px #0D1B2A0A;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

[data-theme="dark"] .results-card {
  box-shadow: 0 2px 6px #0D1B2A20;
}

.hemicycle-container {
  width: 500px;
  max-width: 100%;
}

.hemicycle-svg {
  width: 100%;
  height: auto;
}

.results-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== Alerts ===== */
.alert {
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
}

.alert-error {
  background: var(--badge-closed-bg);
  color: var(--badge-closed);
}

.alert-info {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* ===== Cert Warning ===== */
.cert-warning {
  background: var(--accent-subtle);
  border-radius: 10px;
  padding: 28px;
}

.cert-warning h2 {
  color: var(--accent);
  margin-bottom: 8px;
}

.cert-warning p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ===== Como Funciona Page ===== */
.como-funciona {
  gap: 56px !important;
}

.hero-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 720px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: -8px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-card h3 {
  font-size: 17px;
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.divider {
  border: none;
  height: 1px;
  background: var(--border);
}

.principles-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.principle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.principle-icon {
  color: var(--accent);
  width: 28px;
  height: 28px;
}

.principle-card h3 {
  font-size: 16px;
}

.principle-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.anonymity-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.anon-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.anon-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-icon {
  color: var(--accent);
  width: 24px;
  height: 24px;
}

.anon-step-card h3 {
  font-size: 15px;
}

.anon-step-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Legal Page ===== */
.legal-page h2 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-page h2:first-of-type {
  margin-top: 8px;
}

.legal-page h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-page p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-page strong {
  color: var(--text-primary);
}

.legal-page ul,
.legal-page ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-page li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 6px;
}

.legal-page li strong {
  color: var(--text-primary);
}

.legal-page code {
  font-size: 13px;
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 64px 16px;
  color: var(--text-muted);
}

/* ===== Utility classes (replacing inline styles for CSP) ===== */
.hidden { display: none; }
.text-center { text-align: center; }
.empty-placeholder { text-align: center; padding: 3rem 1rem; }
.btn-inline-link { display: inline-block; margin-top: 1rem; text-decoration: none; }

/* Legend dot color variants */
.legend-dot--accent { background: var(--accent); }
.legend-dot--no { background: var(--vote-no); }
.legend-dot--info { background: var(--vote-info); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .steps-grid,
  .anon-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 32px 16px;
  }

  .header-inner {
    padding: 14px 16px;
  }

  h1 {
    font-size: 24px;
  }

  .hero-title {
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  .voting-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .hemicycle-container {
    width: 100%;
  }

  .results-legend {
    gap: 16px;
  }

  .como-funciona {
    gap: 40px !important;
  }
}

@media (max-width: 480px) {
  .header-nav {
    gap: 16px;
  }

  .nav-link {
    font-size: 13px;
  }

  .page-content {
    padding: 24px 16px;
  }

  .voting-grid,
  .steps-grid,
  .anon-steps-grid {
    grid-template-columns: 1fr;
  }

  .info-banner {
    flex-direction: column;
    gap: 10px;
  }

  .vote-card {
    padding: 20px;
  }
}

/* ===== Admin Panel ===== */

.admin-login {
  max-width: 400px;
  margin: 80px auto;
}

.admin-panel {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-header h2 {
  font-size: 22px;
  color: var(--text-primary);
}

.admin-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.admin-status-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* ── Admin Form ─── */

.admin-form .field-group {
  margin-bottom: 18px;
}

.admin-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}

.admin-form input:disabled,
.admin-form textarea:disabled,
.admin-form select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-form textarea {
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* ── Options list ── */

.option-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.option-row .option-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}

.option-row .option-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.btn-remove {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--badge-closed);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover {
  background: var(--badge-closed-bg);
}

/* ── Admin Table ── */

.table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-primary);
}

.admin-table tr:hover td {
  background: var(--bg-elevated);
}

/* ── Admin Buttons ── */

.btn-primary {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--bg-elevated);
}

.btn-danger {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--badge-closed);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.btn-link:hover {
  text-decoration: underline;
}

/* ── Status row ── */

.status-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.status-row select {
  flex: 1;
  max-width: 250px;
}

/* ── Tally display ── */

.tally-display {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 12px 16px;
}

.tally-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-primary);
}

.tally-row + .tally-row {
  border-top: 1px solid var(--border);
}

/* ── Alerts ── */

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

/* ── Badge draft ── */

.badge-draft {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-muted);
}
