/* Algemene layout */
:root {
  --bg: #020617;
  --bg-elevated: #020617;
  --card-bg: #020617;
  --card-border: rgba(148, 163, 184, 0.3);
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --accent-strong: rgba(34, 197, 94, 0.28);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --surface-soft: rgba(15, 23, 42, 0.85);
  --border-soft: rgba(75, 85, 99, 0.6);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.9);
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0f172a 0%, #020617 45%, #000 100%);
  color: var(--text);
  min-height: 100%;
}

body {
  padding: 16px;
}

.page {
  max-width: 960px;
  margin: 0 auto;
}

/* Link bovenaan */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* Card */
.app-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.98));
  border-radius: 20px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  padding: 18px 18px 16px;
}

/* Header */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-header h1 {
  font-size: 1.4rem;
  margin: 0;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: radial-gradient(circle at top left, #22c55e, #16a34a);
  color: #ecfdf5;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5), 0 8px 18px rgba(22, 163, 74, 0.4);
}

/* Sections */
.card-section {
  padding: 12px 0;
}

.section-title {
  font-size: 1rem;
  margin: 0 0 6px;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mode-label {
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

/* Divider */
.divider {
  margin: 6px 0;
  border: none;
  border-top: 1px dashed rgba(71, 85, 105, 0.65);
}

/* Tekst */
.small {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 7px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.1s ease;
  background: #020617;
  color: var(--text);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.btn-primary {
  background: radial-gradient(circle at top left, #22c55e, #16a34a);
  color: #ecfdf5;
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.6);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.7);
}

.btn-outline {
  background: rgba(15, 23, 42, 0.9);
  border-color: var(--border-soft);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--border-soft);
}

/* Icon pulse */
.icon-pulse {
  position: relative;
}

.icon-pulse::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1px solid rgba(34, 197, 94, 0.3);
  opacity: 0;
  transform: scale(0.98);
  animation: pulse 1.5s infinite;
  pointer-events: none;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
    transform: scale(0.98);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

/* Live blokken */
.live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.live-block {
  padding: 10px;
  border-radius: 14px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(75, 85, 99, 0.7);
}

/* Hartslag waarde */
.hr-live-value {
  font-size: 3rem;
  font-weight: 700;
  margin: 4px 0;
  letter-spacing: 0.05em;
  color: #e5e7eb;
  text-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.1s ease;
}

.hr-live-value.bump {
  transform: scale(1.03);
}

/* Zone */
.hr-zone {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--accent);
}

/* Status */
.status {
  font-size: 0.8rem;
  margin-top: 6px;
}

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

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.stat {
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(75, 85, 99, 0.7);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 600;
}

.stat-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 4px;
}

/* AI-block */
.ai-block {
  padding: 10px;
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.1), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(74, 222, 128, 0.5);
}

.ai-title {
  margin: 0 0 4px;
  font-weight: 600;
}

.ai-text {
  margin: 0;
}

/* Textarea */
.textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  padding: 7px 9px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 70px;
}

.textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Chart */
.chart-canvas {
  width: 100%;
  max-height: 260px;
  margin-top: 12px;
}

/* Footer */
.card-footer {
  border-top: 1px dashed rgba(75, 85, 99, 0.7);
  margin-top: 10px;
  padding-top: 10px;
}

/* Responsiveness */
@media (max-width: 720px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .app-card {
    padding: 14px 12px 12px;
  }

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

  .hr-live-value {
    font-size: 2.5rem;
  }
}

/* === STARTMENU – TEKST ALTIJD LEESBAAR (FINAL) === */

.menu-tile {
  color: #020617;
}

.menu-tile .tile-title {
  color: #020617 !important;
  font-weight: 700;
  opacity: 1 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.menu-tile .tile-icon {
  opacity: 1 !important;
  filter: none;
}



@media only screen and (max-width: 600px) {
  body {
    font-size: 16px;
    padding: 10px;
  }
  .menu-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .tile, button {
    width: 100% !important;
    font-size: 18px !important;
    padding: 16px !important;
  }
  input, select, textarea {
    font-size: 16px !important;
  }
}



/* ===== FIX: Leesbaarheid symptoom-buttons ===== */
.symptom-header {
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.95),
    rgba(15, 23, 42, 0.95)
  );
  color: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.symptom-header .label {
  color: #f9fafb;
}

.symptom-header:hover {
  background: linear-gradient(
    180deg,
    rgba(51, 65, 85, 0.95),
    rgba(30, 41, 59, 0.95)
  );
}

.symptom-header.active {
  background: linear-gradient(
    180deg,
    rgba(34, 197, 94, 0.25),
    rgba(15, 23, 42, 0.95)
  );
  border-color: rgba(34, 197, 94, 0.7);
  color: #ecfdf5;
}

.symptom-header span[id^="arrow"] {
  color: #e5e7eb;
  font-weight: 700;
}

.symptom-body {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}



/* ===== FIX v2: Altijd leesbare symptoom-buttons (ook zonder hover) ===== */
.symptom-header {
  background: #111827 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  font-weight: 700;
}

.symptom-header .label {
  color: #ffffff !important;
  opacity: 1 !important;
}

.symptom-header span[id^="arrow"] {
  color: #ffffff !important;
  opacity: 1 !important;
}

.symptom-header.active {
  background: #064e3b !important;
  border-color: #22c55e !important;
  color: #ecfdf5 !important;
}

.symptom-body {
  background: #020617 !important;
  color: #f9fafb !important;
}



/* ===== FIX v3: Activiteiten-buttons gelijk aan symptomen ===== */

/* Activiteiten buttons (zelfde leesbaarheid) */
.activity-button,
.activity-header,
.activity-item {
  background: #111827 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  font-weight: 700;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important; /* links uitlijnen */
  gap: 10px;
  padding-left: 14px !important;
  text-align: left !important;
}

/* Icoon altijd links */
.activity-button .icon,
.activity-header .icon,
.activity-item .icon {
  margin: 0 !important;
  flex-shrink: 0;
}

/* Actieve activiteit */
.activity-button.active,
.activity-header.active,
.activity-item.active {
  background: #064e3b !important;
  border-color: #22c55e !important;
  color: #ecfdf5 !important;
}



/* ===== FIX v4 (FORCED): Activiteiten altijd leesbaar + links uitgelijnd ===== */

/* Alle activiteit-gerelateerde buttons afdwingen */
.quick-buttons button,
button.activity,
button[data-activity],
.activity-row button,
.activity-list button {
  background-color: #111827 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.35) !important;

  font-weight: 700 !important;
  text-align: left !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 10px !important;
  padding-left: 14px !important;
}

/* Iconen altijd links, nooit gecentreerd */
.quick-buttons button span,
.activity-row button span,
.activity-list button span {
  margin: 0 !important;
  opacity: 1 !important;
  color: #ffffff !important;
}

/* Actieve activiteit */
.quick-buttons button.active,
.activity-row button.active,
.activity-list button.active {
  background-color: #064e3b !important;
  border-color: #22c55e !important;
  color: #ecfdf5 !important;
}


.contact-button,.profile-button{display:inline-block;margin:10px 8px;padding:12px 16px;border-radius:14px;text-decoration:none;font-weight:800;background:#2ecc71;color:#fff}
