/* ============================================
   hallo, 2030 — Deelnemer App
   Brand: hallo, (blauw #0080C9, rood #EA516D,
   paars #82358C, groen #00A47A)
   Mobile-first, max 480px container
   ============================================ */

:root {
  --blue: #0080c9;
  --red: #ea516d;
  --purple: #82358c;
  --green: #00a47a;
  --white: #ffffff;
  --bg: #f5f7fa;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: 100%;
  max-width: 480px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---- Header ---- */
.header {
  text-align: center;
  padding: 8px 0;
}
.header .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
}
.header .logo span {
  color: var(--red);
}
.header .subtitle {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 2px;
}
.header .now-badge {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 6px;
}

/* ---- Connection dot ---- */
.conn-dot {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  z-index: 1000;
  transition: background 0.3s;
}
.conn-dot.online {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.conn-dot.offline {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}
.conn-dot.reconnecting {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  animation: pulse-dot 0.8s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ---- Screen container ---- */
.screen {
  display: none;
}
.screen.active {
  display: block;
}

/* ---- Card ---- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.card .desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 48px;
  width: 100%;
  text-align: center;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover {
  background: #006ba8;
}
.btn-red {
  background: var(--red);
  color: var(--white);
}
.btn-green {
  background: var(--green);
  color: var(--white);
}
.btn-purple {
  background: var(--purple);
  color: var(--white);
}
.btn-outline {
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.btn-eens {
  background: var(--green);
  color: var(--white);
  flex: 1;
  font-size: 1.25rem;
  min-height: 64px;
}
.btn-oneens {
  background: var(--red);
  color: var(--white);
  flex: 1;
  font-size: 1.25rem;
  min-height: 64px;
}
.btn-switch {
  background: var(--purple);
  color: var(--white);
  margin-top: 12px;
}
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--blue);
  color: var(--white);
  width: auto;
}

/* ---- Inputs ---- */
.input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.input:focus {
  border-color: var(--blue);
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}
.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

/* ---- Statement ---- */
.statement-text {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 16px;
  text-align: center;
}
.statement-buttons {
  display: flex;
  gap: 12px;
}
.stmt-counter {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 12px;
}
.voted-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
}
.voted-eens {
  background: #d1fae5;
  color: #065f46;
}
.voted-oneens {
  background: #fee2e2;
  color: #991b1b;
}

/* ---- Tags / Chips ---- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.tag.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.tag .count {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ---- Maturity ---- */
.maturity-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.maturity-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.9rem;
}
.maturity-option.selected {
  border-color: var(--blue);
  background: #eff6ff;
}
.maturity-option .level-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.maturity-option.selected .level-num {
  background: var(--blue);
  color: var(--white);
}

/* ---- Add-item row ---- */
.add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.add-row .input {
  flex: 1;
}
.item-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.item-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.item-entry .remove-btn {
  background: none;
  border: none;
  color: var(--red);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.item-entry .cat-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--purple);
  color: var(--white);
  margin-right: 8px;
}

/* ---- Priority voting ---- */
.priority-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.priority-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.priority-item.selected {
  border-color: var(--blue);
  background: #eff6ff;
}
.priority-item .check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.priority-item.selected .check {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* ---- Inspiration ---- */
.inspo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.inspo-card {
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.inspo-card:hover,
.inspo-card:active {
  border-color: var(--purple);
}
.inspo-card .inspo-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.inspo-card .inspo-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.inspo-card .inspo-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.4;
}
.inspo-card .inspo-used {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 600;
}

/* ---- Timeline ---- */
.timeline-milestones {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.timeline-milestone {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--blue);
}
.timeline-milestone.tech {
  border-left-color: #f59e0b;
}
.timeline-milestone.process {
  border-left-color: var(--green);
}
.timeline-milestone.people {
  border-left-color: var(--blue);
}
.timeline-milestone.klant {
  border-left-color: var(--purple);
}
.milestone-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  min-width: 70px;
  flex-shrink: 0;
}
.milestone-text {
  flex: 1;
  font-size: 0.85rem;
}
.milestone-cat {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--white);
}
.cat-tech {
  background: #f59e0b;
}
.cat-process {
  background: var(--green);
}
.cat-people {
  background: var(--blue);
}
.cat-klant {
  background: var(--purple);
}
.add-milestone-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.add-milestone-row .input {
  flex: 1;
  font-size: 0.85rem;
  padding: 10px 12px;
}
.add-milestone-row select {
  width: auto;
  font-size: 0.8rem;
  padding: 10px 8px;
}

/* ---- Focus / Pause ---- */
.focus-content {
  text-align: center;
  padding: 60px 20px;
}
.focus-content .focus-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.focus-content h2 {
  font-size: 1.3rem;
  color: var(--text-light);
}
.focus-content p {
  margin-top: 8px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ---- Summary ---- */
.summary-section {
  margin-bottom: 16px;
}
.summary-section h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 8px;
}
.summary-section p,
.summary-section li {
  font-size: 0.9rem;
  line-height: 1.5;
}
.summary-section ul {
  list-style: none;
  padding: 0;
}
.summary-section li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

/* ---- Group info ---- */
.group-tag {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---- Utility ---- */
.text-center {
  text-align: center;
}
.mt-8 {
  margin-top: 8px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.mb-8 {
  margin-bottom: 8px;
}
.mb-16 {
  margin-bottom: 16px;
}

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

.screen.active {
  animation: fadeIn 0.25s ease;
}

/* ---- Confetti (end screen) ---- */
@keyframes confetti-fall {
  0% {
    transform: translateY(-60vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

#scr-summary.active::before,
#scr-summary.active::after {
  content: "";
  position: fixed;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  z-index: 1001;
  animation: confetti-fall 3s ease-in forwards;
  pointer-events: none;
}

#scr-summary.active::before {
  left: 15%;
  background: var(--purple);
  animation-delay: 0.1s;
  box-shadow:
    30vw -10px 0 var(--blue),
    60vw -20px 0 var(--green),
    10vw -30px 0 var(--red),
    80vw -15px 0 var(--purple),
    45vw -35px 0 var(--blue),
    70vw -5px 0 var(--green),
    20vw -40px 0 var(--red),
    55vw -25px 0 var(--purple),
    85vw -45px 0 var(--blue),
    35vw -8px 0 var(--green);
}

#scr-summary.active::after {
  left: 25%;
  background: var(--green);
  animation-delay: 0.5s;
  box-shadow:
    40vw -12px 0 var(--red),
    75vw -22px 0 var(--purple),
    5vw -32px 0 var(--blue),
    65vw -18px 0 var(--green),
    50vw -42px 0 var(--red),
    90vw -6px 0 var(--purple),
    15vw -38px 0 var(--green),
    60vw -28px 0 var(--blue),
    30vw -16px 0 var(--red),
    80vw -44px 0 var(--purple);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 999;
  animation: fadeIn 0.2s ease;
}

/* ---- Facilitator styles ---- */
.fac-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}
.fac-wrap h1 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.fac-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.fac-header-row h1 {
  margin-bottom: 0;
  flex: 1;
}
.screen-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.screen-btn {
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.screen-btn:hover {
  border-color: var(--blue);
}
.screen-btn.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

/* ---- Two-column statement ---- */
.stmt-two-col {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.stmt-col {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius);
}
.stmt-col.eens-col {
  background: #d1fae5;
}
.stmt-col.oneens-col {
  background: #fee2e2;
}
.stmt-col .col-header {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
  text-align: center;
}
.stmt-col .col-count {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
.stmt-col .col-name {
  font-size: 0.8rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.stmt-col .col-name:last-child {
  border-bottom: none;
}
.switched-icon {
  margin-left: 2px;
}

/* ---- Missing participants ---- */
.missing-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.missing-section .missing-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.missing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.missing-chip {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 12px;
  font-weight: 500;
}

/* ---- Next statement ---- */
.next-stmt-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

/* ---- Login / QR ---- */
.login-card {
  max-width: 360px;
  margin: 60px auto;
}
.qr-box {
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  margin-top: 16px;
}
.qr-box canvas {
  max-width: 200px;
}
.qr-url {
  font-size: 0.8rem;
  color: var(--text-light);
  word-break: break-all;
  margin-top: 8px;
}
