/* Santorini vibes */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;1,9..144,400&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --aegean: #1a5490;
  --aegean-deep: #0d3a6b;
  --aegean-light: #4a90bf;
  --sky: #87ceeb;
  --sky-soft: #c5e4f0;
  --whitewash: #fafafa;
  --stucco: #f5f1e8;
  --stucco-shadow: #e8e2d5;
  --sun: #f4c430;
  --sun-deep: #e8b020;
  --terracotta: #c76b4a;
  --olive: #7ba05b;
  --bougainvillea: #c13584;
  --ink: #0a1f3d;
  --ink-soft: #3a4f6b;
  --muted: #6b7a8c;
  --line: #d8d2c4;
  --line-soft: #e8e4d8;
  --grecian: #003f87; /* Griekse vlag blauw */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--stucco);
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(ellipse at top, #e8f1f8 0%, transparent 50%),
    linear-gradient(180deg, #f5f1e8 0%, #f5f1e8 40%, #faf7f0 100%);
}

.serif { font-family: 'Fraunces', Georgia, serif; font-optical-sizing: auto; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 100px;
  background: transparent;
}

@media (min-width: 900px) {
  .app { max-width: 520px; }
}

/* ───── Greek meander border ───── */
.meander {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='16' viewBox='0 0 32 16'><path d='M0 15 L0 4 L8 4 L8 11 L4 11 L4 8 L12 8 L12 15 M16 15 L16 4 L24 4 L24 11 L20 11 L20 8 L28 8 L28 15' fill='none' stroke='%23003f87' stroke-width='1.2'/></svg>");
  background-repeat: repeat-x;
  height: 16px;
}

/* ───── Shared cards ───── */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(13, 58, 107, 0.04), 0 8px 24px rgba(13, 58, 107, 0.06);
  border: 1px solid rgba(26, 84, 144, 0.06);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--sky-soft);
  color: var(--aegean-deep);
}

.btn {
  appearance: none;
  border: none;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 12px;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--aegean);
  color: white;
}
.btn-primary:hover { background: var(--aegean-deep); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover { background: rgba(0,0,0,0.04); }

/* ───── Top app bar ───── */
.topbar {
  padding: 18px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--aegean-deep);
}

/* ───── Avatar ───── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 14px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.4);
}

/* ───── Bottom nav ───── */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 456px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 999px;
  padding: 6px;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 8px 32px rgba(13, 58, 107, 0.15), 0 0 0 1px rgba(26, 84, 144, 0.08);
  z-index: 100;
}

.bottom-nav button {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 4px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.2s;
  min-width: 0;
}
.bottom-nav button .icon { font-size: 17px; line-height: 1; }
.bottom-nav button .gr-icon {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}
.bottom-nav button.active {
  background: var(--aegean);
  color: white;
  box-shadow: 0 4px 12px rgba(26, 84, 144, 0.3);
}
/* Birthday confetti hero */
.bday-hero {
  background:
    radial-gradient(circle at 20% 30%, rgba(244,196,48,0.4), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(193,53,132,0.35), transparent 45%),
    linear-gradient(135deg, #c13584 0%, #f4c430 60%, #e8b020 100%);
  color: white;
  border-radius: 22px;
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(193,53,132,0.3);
}
.bday-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.6) 2px, transparent 3px),
    radial-gradient(circle, rgba(255,255,255,0.4) 1px, transparent 2px);
  background-size: 40px 40px, 25px 25px;
  background-position: 0 0, 15px 20px;
  opacity: 0.4;
  pointer-events: none;
}
@keyframes bounce-crown {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}
.crown-bounce { display: inline-block; animation: bounce-crown 2s ease-in-out infinite; }

/* ───── Countdown ───── */
.countdown {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.countdown .unit {
  flex: 1;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 12px 4px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.25);
}
.countdown .num {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}
.countdown .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.8;
  margin-top: 4px;
}

/* ───── Task checkbox ───── */
.check {
  width: 26px; height: 26px; border-radius: 8px;
  border: 2px solid var(--line);
  background: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.check:hover { border-color: var(--aegean); }
.check.done {
  background: var(--olive);
  border-color: var(--olive);
  color: white;
}
.check.done svg { animation: pop 0.3s ease; }
@keyframes pop {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ───── Warning banner ───── */
.banner-warn {
  background: linear-gradient(135deg, #fff4d6, #ffe8a8);
  border: 1px solid rgba(232, 176, 32, 0.4);
  color: #6b4a00;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  animation: pulseWarn 2s ease-in-out infinite;
}
@keyframes pulseWarn {
  0%,100% { box-shadow: 0 0 0 0 rgba(232,176,32,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(232,176,32,0); }
}

.banner-urgent {
  background: linear-gradient(135deg, #fde0d4, #f8b599);
  border: 1px solid rgba(199, 107, 74, 0.4);
  color: #6b2a10;
  animation: pulseUrgent 1.2s ease-in-out infinite;
}
@keyframes pulseUrgent {
  0%,100% { box-shadow: 0 0 0 0 rgba(199,107,74,0.5); }
  50% { box-shadow: 0 0 0 10px rgba(199,107,74,0); }
}

/* ───── Scroll hide native scrollbar for day picker ───── */
.hscroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* ───── Decoratieve zon / zee ───── */
.sun-ring {
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,196,48,0.3) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

/* ───── Name picker grid ───── */
.name-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.name-card {
  background: white;
  border: 2px solid var(--line-soft);
  border-radius: 16px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.name-card:hover {
  border-color: var(--aegean-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(26,84,144,0.1);
}
.name-card .avatar { width: 48px; height: 48px; font-size: 18px; }
.name-card .name { font-size: 13px; font-weight: 600; }

/* Week heatmap / schedule table */
.sched-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.sched-row:last-child { border-bottom: none; }

.task-chip {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* hero banner */
.hero {
  position: relative;
  border-radius: 20px;
  padding: 24px 22px;
  color: white;
  overflow: hidden;
  background:
    linear-gradient(160deg, #1a5490 0%, #0d3a6b 60%, #081f45 100%);
  box-shadow: 0 8px 24px rgba(13, 58, 107, 0.25);
}

.hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #f4c430 0%, rgba(244,196,48,0.4) 50%, transparent 70%);
  filter: blur(8px);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -10px; right: -10px;
  height: 50px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,255,255,0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 10%, rgba(255,255,255,0.08) 0%, transparent 40%);
}

.hero-inner { position: relative; z-index: 2; }

/* Notif toast */
.toast-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}
.toast {
  background: white;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(13,58,107,0.2);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 4px solid var(--terracotta);
  margin-bottom: 8px;
  pointer-events: auto;
  animation: slideIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.closing { animation: slideOut 0.3s ease forwards; }
@keyframes slideOut {
  to { opacity: 0; transform: translateY(-20px); }
}

/* tweak panel */
.tweak-panel {
  position: fixed;
  bottom: 100px;
  right: 16px;
  width: 260px;
  background: white;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(13,58,107,0.25);
  z-index: 150;
  font-size: 13px;
  border: 1px solid rgba(26,84,144,0.1);
}
.tweak-panel h4 {
  margin: 0 0 10px;
  font-family: 'Fraunces', serif;
  font-size: 15px;
  color: var(--aegean-deep);
}
.tweak-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}
.tweak-row label { font-weight: 500; }

/* Prog bar */
.progress {
  height: 6px;
  background: rgba(26,84,144,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--aegean-light), var(--aegean));
  transition: width 0.5s ease;
  border-radius: 999px;
}

/* Screen container */
.screen {
  padding: 4px 16px 20px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.3px;
  margin: 22px 0 12px;
  color: var(--ink);
}
.section-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: -6px;
  margin-bottom: 14px;
}

/* Task row */
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.task-row:last-child { border-bottom: none; }
.task-row .info { flex: 1; min-width: 0; }
.task-row .info .top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.task-row .info .label { font-weight: 600; font-size: 15px; }
.task-row .info .time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-row .info .sub { font-size: 13px; color: var(--ink-soft); margin-top: 4px; line-height: 1.45; }
.task-row.done .info .label { text-decoration: line-through; color: var(--muted); }

/* Opa card special */
.opa-card {
  background: linear-gradient(135deg, #fff8dc 0%, #ffeaa7 100%);
  border: 1px solid #e8b020;
  border-radius: 18px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.opa-card::before {
  content: '👑';
  position: absolute;
  top: -10px; right: -10px;
  font-size: 80px;
  opacity: 0.15;
  transform: rotate(15deg);
}

/* Boodschappen card */
.boodsch-card {
  background: linear-gradient(135deg, #fef4e0 0%, #fad98f 100%);
  border: 1px solid rgba(232, 176, 32, 0.3);
}

/* Reisdag card */
.travel-card {
  background: linear-gradient(135deg, #e8f1f8 0%, #c5e4f0 100%);
  border: 1px solid rgba(135, 206, 235, 0.4);
}

/* urgent now */
.now-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #c13584;
  color: white;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: flash 1s ease-in-out infinite;
}
@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 10px; height: 10px;
  pointer-events: none;
  z-index: 500;
}

/* hide scroll on lists */
.soft-scroll { overflow-y: auto; }

input[type="checkbox"] { accent-color: var(--aegean); }

.tiny-mute {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-weight: 600;
}
