/* SuperAngels Voting — Stylesheet
   Designsprache: superangels.fund
   Primär: #0641f3 | Akzent: #ffbc28 | Dunkel: #042538 | BG: #eeeeee */

:root {
  --primary:       #0641f3;
  --primary-light: #0641f320;
  --accent:        #ffbc28;
  --bg:            #eeeeee;
  --dark:          #042538;
  --text:          #0d0d0d;
  --text-muted:    #4a4a4a;
  --white:         #ffffff;
  --border:        #e2e8f0;
  --success:       #22c55e;
  --success-bg:    #22c55e18;
  --success-text:  #16a34a;
  --danger:        #ef4444;
  --danger-bg:     #ef444418;
  --danger-text:   #dc2626;
  --neutral:       #94a3b8;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 2px 8px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

header {
  background: #ffffff;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.10);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.logo {
  height: 72px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.admin-badge {
  background: var(--accent);
  color: var(--dark);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── Status Banner ──────────────────────────────────────────────────────── */

.status-banner {
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 14px;
  text-align: center;
}

.status-banner.none {
  background: var(--white);
  border: 2px dashed var(--border);
}

.status-banner.running {
  background: var(--primary);
  color: var(--white);
}

.status-banner.closed {
  background: var(--primary);
  color: var(--white);
}

.status-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}

.status-sub {
  font-size: 13px;
  opacity: .85;
}

/* ── Form elements ──────────────────────────────────────────────────────── */

label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-field,
.name-select {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s;
}

.name-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%234a4a4a' d='M5 8l5 5 5-5H5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  padding-right: 40px;
}

.input-field:focus,
.name-select:focus { outline: none; border-color: var(--primary); }

/* ── Vote Buttons ───────────────────────────────────────────────────────── */

.vote-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 18px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.vote-btn .btn-icon { font-size: 26px; line-height: 1; }
.vote-btn .btn-label-sub { font-size: 10px; font-weight: 400; opacity: .7; }

.vote-btn:hover:not(.selected-ja):not(.selected-nein):not(.selected-enthaltung) {
  border-color: var(--primary);
  color: var(--primary);
}

.vote-btn.selected-ja {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success-text);
}

.vote-btn.selected-nein {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger-text);
}

.vote-btn.selected-enthaltung {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.vote-btn:active { transform: scale(.96); }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(.98); }

.btn-primary  { background: var(--primary); color: var(--white); }
.btn-primary:hover  { background: #0535d4; }

.btn-danger   { background: var(--danger); color: var(--white); }
.btn-danger:hover   { background: #dc2626; }

.btn + .btn { margin-top: 10px; }

/* ── Vote list (live status) ────────────────────────────────────────────── */

.vote-list { display: flex; flex-direction: column; gap: 6px; }

.vote-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
}

.vote-item .name    { font-weight: 500; }
.vote-item .initials { font-size: 11px; color: var(--text-muted); margin-left: 6px; }

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-ja          { background: var(--success-bg); color: var(--success-text); }
.badge-nein        { background: var(--danger-bg);  color: var(--danger-text); }
.badge-enthaltung  { background: var(--primary-light); color: var(--primary); }
.badge-abwesend    { background: #fef3c7; color: #92400e; }
.badge-pending     { background: #f1f5f9; color: var(--neutral); }
.badge-voted       { background: #dcfce7; color: var(--success-text); }

/* ── Section heading ────────────────────────────────────────────────────── */

.section-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin: 18px 0 8px;
}

.section-heading:first-child { margin-top: 0; }

/* ── Divider ────────────────────────────────────────────────────────────── */

.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Progress bar ───────────────────────────────────────────────────────── */

.vote-progress {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

.progress-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width .4s ease;
}

/* ── Result summary (große Zahlen) ──────────────────────────────────────── */

.result-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 6px;
}

.result-box {
  text-align: center;
  padding: 20px 8px;
  border-radius: var(--radius);
}

.result-box .count {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.result-box .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.ja-box           { background: var(--success-bg); }
.ja-box .count    { color: var(--success-text); }
.ja-box .label    { color: var(--success-text); }

.nein-box         { background: var(--danger-bg); }
.nein-box .count  { color: var(--danger-text); }
.nein-box .label  { color: var(--danger-text); }

.enthaltung-box         { background: var(--primary-light); }
.enthaltung-box .count  { color: var(--primary); }
.enthaltung-box .label  { color: var(--primary); }

/* ── Partner Hinweis ────────────────────────────────────────────────────── */

.partner-note {
  background: var(--accent);
  color: var(--dark);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

/* ── Hilfstexte & Empty state ───────────────────────────────────────────── */

.hint {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

.empty-state {
  text-align: center;
  padding: 64px 20px;
}

.empty-icon  { font-size: 52px; margin-bottom: 16px; }

.empty-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-sub { color: var(--text-muted); font-size: 15px; }

/* ── Loading spinner ────────────────────────────────────────────────────── */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile refinements ─────────────────────────────────────────────────── */

@media (max-width: 380px) {
  .vote-btn { padding: 14px 4px; font-size: 12px; }
  .vote-btn .btn-icon { font-size: 22px; }
  .result-box .count { font-size: 32px; }
  .status-title { font-size: 18px; }
}
