/* ZilverWerkt Dilemma App — Huisstijl */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --dark-blue: #272740;
  --mint: #c2ded0;
  --coral: #f85051;
  --white: #ffffff;
  --beige: #bda397;
  --mint-light: #e8f4ef;
  --shadow: 0 2px 12px rgba(39,39,64,0.10);
  --radius: 12px;
}

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

body {
  font-family: 'Poppins', Arial, sans-serif;
  background: var(--mint-light);
  color: var(--dark-blue);
  min-height: 100vh;
}

/* Header */
.header {
  background: var(--dark-blue);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header img { height: 36px; }
.header nav a {
  color: var(--mint);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-left: 16px;
  opacity: 0.8;
  transition: opacity .2s;
}
.header nav a:hover { opacity: 1; }
.header nav a.active { opacity: 1; color: var(--white); }

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

/* Dilemma kaart */
.dilemma-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 8px;
}
.dilemma-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-blue);
  line-height: 1.3;
  margin-bottom: 10px;
}
.dilemma-desc {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}
.deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--beige);
  font-weight: 500;
}

/* Naam input */
.name-section { margin-bottom: 20px; }
.name-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 6px;
}
.input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 15px;
  color: var(--dark-blue);
  transition: border-color .2s;
  background: var(--white);
}
.input:focus {
  outline: none;
  border-color: var(--dark-blue);
}

/* Keuze knoppen */
.choices { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.choice-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: all .2s;
  font-family: 'Poppins', Arial, sans-serif;
  width: 100%;
}
.choice-btn:hover {
  border-color: var(--dark-blue);
  background: var(--mint-light);
}
.choice-btn.selected-a {
  border-color: var(--dark-blue);
  background: var(--dark-blue);
  color: var(--white);
}
.choice-btn.selected-b {
  border-color: var(--coral);
  background: var(--coral);
  color: var(--white);
}
.choice-letter {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  min-width: 32px;
  color: inherit;
}
.choice-btn:not(.selected-a):not(.selected-b) .choice-letter-a { color: var(--dark-blue); }
.choice-btn:not(.selected-a):not(.selected-b) .choice-letter-b { color: var(--coral); }
.choice-text {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: inherit;
}

/* Motivatie */
.motivatie-section { margin-bottom: 20px; }
.motivatie-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 6px;
}
textarea.input {
  min-height: 80px;
  resize: vertical;
  font-size: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 8px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--coral);
  color: var(--white);
  width: 100%;
}
.btn-primary:hover { background: #e03e3f; }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.btn-secondary {
  background: var(--dark-blue);
  color: var(--white);
}
.btn-secondary:hover { background: #1a1a30; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--dark-blue);
  color: var(--dark-blue);
}
.btn-outline:hover { background: var(--mint-light); }
.btn-danger {
  background: transparent;
  border: 2px solid var(--coral);
  color: var(--coral);
  font-size: 13px;
  padding: 8px 14px;
}
.btn-danger:hover { background: var(--coral); color: var(--white); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* Resultaten */
.result-bar-wrap { margin-bottom: 16px; }
.result-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}
.result-bar-bg {
  height: 12px;
  background: #e8e8e8;
  border-radius: 99px;
  overflow: hidden;
}
.result-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .6s ease;
}
.bar-a { background: var(--dark-blue); }
.bar-b { background: var(--coral); }
.result-count {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

/* Succes/fout berichten */
.alert {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-success { background: #e6f9f0; color: #1a7a4a; border-left: 4px solid #2ecc71; }
.alert-error { background: #fef0f0; color: #c0392b; border-left: 4px solid var(--coral); }
.alert-info { background: var(--mint-light); color: var(--dark-blue); border-left: 4px solid var(--dark-blue); }

/* Lege staat */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #999;
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; }

/* Loader */
.loader {
  display: flex;
  justify-content: center;
  padding: 40px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--mint);
  border-top-color: var(--dark-blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Admin — dilemma lijst */
.dilemma-item {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 10px;
  background: var(--white);
}
.dilemma-item-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}
.dilemma-item-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
}
.dilemma-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.badge-active { background: #e6f9f0; color: #1a7a4a; }
.badge-inactive { background: #f0f0f0; color: #888; }
.badge-revealed { background: #fff0e0; color: #e67e22; }

/* Dashboard stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--dark-blue);
  color: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--mint);
}
.stat-label {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

/* Motivaties lijst */
.motivation-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.motivation-item:last-child { border-bottom: none; }
.motivation-name { font-weight: 600; font-size: 13px; }
.motivation-choice-a { color: var(--dark-blue); }
.motivation-choice-b { color: var(--coral); }
.motivation-text { color: #555; margin-top: 2px; }

/* Pagina titel */
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 14px;
  color: #888;
  margin-bottom: 20px;
}

/* Form groepen */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 6px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 99px;
  transition: .3s;
}
.toggle-slider:before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .3s;
}
.toggle input:checked + .toggle-slider { background: var(--dark-blue); }
.toggle input:checked + .toggle-slider:before { transform: translateX(18px); }

/* Divider */
.divider {
  height: 1px;
  background: #eee;
  margin: 20px 0;
}

/* Footer nav (mobiel) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid #e8e8e8;
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  text-decoration: none;
  color: #aaa;
  font-size: 11px;
  font-weight: 500;
  transition: color .2s;
}
.bottom-nav a .nav-icon { font-size: 20px; margin-bottom: 2px; }
.bottom-nav a.active { color: var(--dark-blue); }
.bottom-nav a:hover { color: var(--dark-blue); }

/* Responsive */
@media (max-width: 400px) {
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dilemma-title { font-size: 19px; }
}

/* Confetti animatie */
@keyframes fall {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -20px;
  z-index: 999;
  animation: fall linear forwards;
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 16px;
  font-weight: 700;
}
