/* ════════════════════════════════════════
   MICRO DOELEN — PWA Stylesheet
   Palette: IJsblauw wit / Blauw / Donkerblauw
   Fonts: Nunito (display) + Inter (body)
   ════════════════════════════════════════ */

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

/* ─── TOKENS ─── */
:root {
  --bg:        #F0F6FF;
  --bg-card:   #FFFFFF;
  --blue:      #2563EB;
  --blue-dk:   #1E3A5F;
  --blue-lt:   #DBEAFE;
  --blue-mid:  #93C5FD;
  --blue-xlt:  #EFF6FF;
  --muted:     #64748B;
  --border:    rgba(37,99,235,0.12);
  --danger:    #EF4444;
  --success:   #22C55E;
  --radius:    18px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 2px 8px rgba(37,99,235,0.08);
  --shadow-md: 0 4px 20px rgba(37,99,235,0.12);
  --shadow-lg: 0 8px 40px rgba(37,99,235,0.16);
  --nav-h:     64px;
  --tab-h:     68px;
  --font-d:    'Nunito', sans-serif;
  --font-b:    'Inter', sans-serif;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 16px; }
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--blue-dk);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ─── LAYOUT SHELL ─── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* ─── TOP NAV ─── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 50;
  background: rgba(240,246,255,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
}
.top-nav-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue-lt);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
  transition: background var(--transition);
}
.top-nav-back:hover { background: var(--blue-mid); }
.top-nav-back svg { width: 18px; height: 18px; }
.top-nav-title {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--blue-dk);
  flex: 1;
}
.top-nav-logo {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-d);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--blue-dk);
}
.logo-dots { display: flex; gap: 3px; align-items: flex-end; }
.logo-dot {
  border-radius: 2px;
  background: var(--blue);
}
.logo-dot:nth-child(1) { width:5px; height:8px; opacity:0.5; }
.logo-dot:nth-child(2) { width:5px; height:12px; opacity:0.75; }
.logo-dot:nth-child(3) { width:5px; height:16px; }
.top-nav-action {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue-lt);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  transition: background var(--transition);
}
.top-nav-action:hover { background: var(--blue-mid); }
.top-nav-action svg { width: 18px; height: 18px; }

/* ─── SCREENS ─── */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--tab-h) + 8px);
  overflow-y: auto;
  animation: screenIn 0.28s ease;
}
.screen.active { display: flex; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screen-body {
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

/* ─── BOTTOM TABS ─── */
.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tab-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 50;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}
.tab-item.active { color: var(--blue); }
.tab-item svg { width: 22px; height: 22px; stroke-width: 1.8; }
.tab-item.active svg { stroke-width: 2.2; }
.tab-label {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.68rem;
}
.tab-pip {
  position: absolute;
  top: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0;
  transition: opacity var(--transition);
}
.tab-item.active .tab-pip { opacity: 1; }

/* ─── TYPOGRAPHY ─── */
.screen-title {
  font-family: var(--font-d);
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--blue-dk);
}
.screen-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 4px;
}
.section-label {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-pad { padding: 20px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 50px;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  width: 100%;
}
.btn-primary:hover { background: #1d4ed8; box-shadow: 0 6px 24px rgba(37,99,235,0.38); }
.btn-secondary {
  background: var(--blue-lt);
  color: var(--blue);
  width: 100%;
}
.btn-secondary:hover { background: var(--blue-mid); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  width: 100%;
}
.btn-danger {
  background: #FEF2F2;
  color: var(--danger);
  border: 1.5px solid #FECACA;
  width: 100%;
}
.btn-sm {
  font-size: 0.85rem;
  padding: 9px 18px;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── INPUTS ─── */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field label {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--blue-dk);
}
.field input,
.field textarea,
.field select {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--blue-dk);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─── CHIP / BADGE ─── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 50px;
}
.chip-blue { background: var(--blue-lt); color: var(--blue); }
.chip-green { background: #DCFCE7; color: #16A34A; }
.chip-muted { background: #F1F5F9; color: var(--muted); }
.chip-orange { background: #FEF3C7; color: #D97706; }

/* ════════════════════════════════════════
   DASHBOARD SCREEN
   ════════════════════════════════════════ */
.dashboard-greeting {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.greeting-name {
  font-family: var(--font-d);
  font-weight: 900;
  font-size: 1.7rem;
  color: var(--blue-dk);
}
.greeting-sub {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-d);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--blue);
  line-height: 1;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

/* Today's checkin card */
.checkin-card {
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 6px 24px rgba(37,99,235,0.3);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.checkin-card:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(37,99,235,0.36); }
.checkin-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.18);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.checkin-text { flex: 1; }
.checkin-title {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 2px;
}
.checkin-sub { font-size: 0.83rem; opacity: 0.8; }
.checkin-arrow { opacity: 0.7; }
.checkin-arrow svg { width: 20px; height: 20px; }

/* Goal list */
.goal-list { display: flex; flex-direction: column; gap: 10px; }

.goal-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  gap: 14px;
}
.goal-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.goal-item-emoji { font-size: 1.3rem; flex-shrink: 0; width: 32px; text-align: center; }
.goal-item-info { flex: 1; min-width: 0; }
.goal-item-name {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--blue-dk);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal-item-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.goal-item-progress { width: 60px; flex-shrink: 0; text-align: right; }
.progress-pct {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--blue);
}
.progress-bar-mini {
  height: 4px;
  background: var(--blue-lt);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.34,1.1,0.64,1);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
}
.empty-icon { font-size: 2.5rem; }
.empty-title {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--blue-dk);
}
.empty-sub { font-size: 0.88rem; color: var(--muted); max-width: 240px; line-height: 1.5; }

/* ════════════════════════════════════════
   CHECKIN SCREEN
   ════════════════════════════════════════ */
.checkin-goal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.checkin-goal-emoji { font-size: 1.4rem; }
.checkin-goal-name {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1rem;
  color: var(--blue-dk);
}

.step-list { display: flex; flex-direction: column; gap: 8px; }

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}
.step-item.done {
  background: var(--blue-xlt);
  border-color: var(--blue-lt);
}
.step-checkbox {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
  background: var(--bg);
}
.step-item.done .step-checkbox {
  background: var(--blue);
  border-color: var(--blue);
}
.step-checkbox svg { width: 13px; height: 13px; opacity: 0; transition: opacity 0.15s; }
.step-item.done .step-checkbox svg { opacity: 1; }
.step-text { flex: 1; }
.step-name {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--blue-dk);
  line-height: 1.4;
}
.step-item.done .step-name {
  text-decoration: line-through;
  color: var(--muted);
}

/* Progress bar in checkin */
.checkin-progress-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkin-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.checkin-progress-label {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue-dk);
}
.checkin-progress-pct {
  font-family: var(--font-d);
  font-weight: 800;
  color: var(--blue);
}
.progress-track {
  height: 10px;
  background: var(--blue-lt);
  border-radius: 5px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--blue), var(--blue-mid));
  transition: width 0.6s cubic-bezier(0.34,1.1,0.64,1);
}

.goal-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.goal-tab {
  padding: 7px 14px;
  border-radius: 50px;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  transition: all var(--transition);
}
.goal-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ════════════════════════════════════════
   NIEUW DOEL SCREEN
   ════════════════════════════════════════ */
.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.emoji-btn {
  width: 40px; height: 40px;
  border-radius: 8px;
  font-size: 1.2rem;
  border: 2px solid transparent;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.emoji-btn.selected {
  border-color: var(--blue);
  background: var(--blue-lt);
}

/* Micro steps builder */
.steps-builder { display: flex; flex-direction: column; gap: 8px; }
.step-builder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeUp 0.25s ease;
}
.step-builder-drag { color: var(--muted); padding: 4px; cursor: grab; flex-shrink: 0; }
.step-builder-drag svg { width: 16px; height: 16px; }
.step-builder-input {
  flex: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--blue-dk);
  outline: none;
  transition: border-color var(--transition);
}
.step-builder-input:focus { border-color: var(--blue); }
.step-builder-remove {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: #FEF2F2;
  color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.step-builder-remove:hover { background: #FECACA; }
.step-builder-remove svg { width: 14px; height: 14px; }

.add-step-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: var(--radius-xs);
  border: 1.5px dashed var(--blue-mid);
  color: var(--blue);
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--blue-xlt);
  cursor: pointer;
  transition: background var(--transition);
  width: 100%;
}
.add-step-btn:hover { background: var(--blue-lt); }
.add-step-btn svg { width: 16px; height: 16px; }

/* ════════════════════════════════════════
   STATISTIEKEN SCREEN
   ════════════════════════════════════════ */
.stat-hero {
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  border-radius: var(--radius);
  padding: 28px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.stat-hero-val {
  font-family: var(--font-d);
  font-weight: 900;
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-hero-label { font-size: 0.9rem; opacity: 0.8; }

.streak-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.streak-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 18px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.streak-icon { font-size: 1.4rem; margin-bottom: 4px; }
.streak-val {
  font-family: var(--font-d);
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--blue);
  line-height: 1;
}
.streak-label { font-size: 0.78rem; color: var(--muted); }

/* Week heatmap */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.week-day-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}
.week-day-dot {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--blue-lt);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue);
  transition: background 0.3s;
}
.week-day-dot.level-0 { background: var(--blue-lt); color: var(--blue-mid); }
.week-day-dot.level-1 { background: #BFDBFE; color: var(--blue); }
.week-day-dot.level-2 { background: #93C5FD; color: #fff; }
.week-day-dot.level-3 { background: var(--blue); color: #fff; }
.week-day-dot.today { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Goal detail stats */
.goal-stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.goal-stat-row:last-child { border-bottom: none; }
.goal-stat-emoji { font-size: 1.1rem; flex-shrink: 0; width: 28px; text-align: center; }
.goal-stat-info { flex: 1; }
.goal-stat-name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--blue-dk);
}
.goal-stat-bar { height: 6px; background: var(--blue-lt); border-radius: 3px; margin-top: 5px; overflow: hidden; }
.goal-stat-fill { height: 100%; background: var(--blue); border-radius: 3px; }
.goal-stat-pct {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--blue);
  flex-shrink: 0;
}

/* ════════════════════════════════════════
   INSTELLINGEN SCREEN
   ════════════════════════════════════════ */
.settings-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d);
  font-weight: 900;
  font-size: 1.8rem;
  color: #fff;
  flex-shrink: 0;
}
.settings-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.settings-name {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--blue-dk);
}
.settings-since { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.settings-edit-btn {
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 50px;
  background: var(--blue-lt);
  color: var(--blue);
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.settings-group {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.settings-group-label {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 14px 18px 8px;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.settings-row:first-of-type { border-top: none; }
.settings-row:hover { background: var(--bg); }
.settings-row-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--blue-lt);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.settings-row-label {
  flex: 1;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--blue-dk);
}
.settings-row-value { font-size: 0.83rem; color: var(--muted); }
.settings-row-arrow { color: var(--muted); }
.settings-row-arrow svg { width: 16px; height: 16px; }

/* Toggle switch */
.toggle {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #CBD5E1;
  border-radius: 12px;
  transition: background 0.25s;
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--blue); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ─── MODAL / OVERLAY ─── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,58,95,0.45);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: overlayIn 0.22s ease;
}
.overlay.open { display: flex; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 540px;
  padding: 28px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 80svh;
  overflow-y: auto;
  animation: sheetIn 0.3s cubic-bezier(0.34,1.1,0.64,1);
}
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.sheet-handle {
  width: 40px; height: 4px;
  background: #CBD5E1;
  border-radius: 2px;
  align-self: center;
  margin-bottom: 4px;
}
.sheet-title {
  font-family: var(--font-d);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--blue-dk);
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: calc(var(--tab-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--blue-dk);
  color: #fff;
  padding: 11px 20px;
  border-radius: 50px;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.88rem;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── CONFETTI ─── */
.confetti-piece {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 2px;
  z-index: 400;
  pointer-events: none;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--blue-lt); border-radius: 2px; }

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
