/* ============================================================
   75 HARD — huisstijl (donker, energiek, "fire")
   ============================================================ */
:root {
  --bg:#0E1117; --bg2:#161B26; --card:#1A2030; --card2:#222A3D; --line:#2A3346;
  --txt:#EAEEF6; --muted:#93A0B5; --muted2:#6B7689;
  --fire1:#FF6B35; --fire2:#E94560; --gold:#FFC107; --green:#2ECC71; --green-d:#1E8449;
  --jason:#3B82F6; --danique:#EC4899;
  --accent:var(--fire1);
  --radius:18px; --radius-sm:12px;
  --grad:linear-gradient(135deg,var(--fire1),var(--fire2));
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bot:env(safe-area-inset-bottom,0px);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { margin:0; padding:0; height:100%; }
body {
  background:var(--bg); color:var(--txt); font-family:var(--font);
  font-size:16px; line-height:1.45; overscroll-behavior-y:none;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3 { margin:0; font-weight:800; letter-spacing:-.01em; }
button { font-family:inherit; cursor:pointer; border:none; background:none; color:inherit; }
input,textarea,select { font-family:inherit; }
a { color:var(--fire1); }

/* ---------- Splash ---------- */
.splash {
  position:fixed; inset:0; z-index:100; display:flex; flex-direction:column;
  align-items:center; justify-content:center; background:var(--bg);
  transition:opacity .4s ease; gap:2px;
}
.splash.hide { opacity:0; pointer-events:none; }
.splash-mark {
  font-size:92px; font-weight:900; line-height:.9;
  background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.splash-sub { font-size:26px; font-weight:900; letter-spacing:.5em; padding-left:.5em; color:var(--txt); }

/* ---------- App bar ---------- */
.appbar {
  position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:10px;
  padding:calc(var(--safe-top) + 10px) 14px 10px; background:rgba(14,17,23,.86);
  backdrop-filter:blur(12px); border-bottom:1px solid var(--line);
}
.appbar-brand { display:flex; align-items:center; gap:6px; font-weight:900; font-size:18px; }
.flame { filter:drop-shadow(0 0 6px rgba(255,107,53,.6)); }
.brand-text { background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.user-switch { display:flex; gap:6px; margin-left:auto; background:var(--bg2); padding:4px; border-radius:999px; border:1px solid var(--line); }
.user-switch button {
  padding:6px 14px; border-radius:999px; font-weight:700; font-size:13px; color:var(--muted);
  transition:all .15s;
}
.user-switch button.active { color:#fff; }
.user-switch button.active[data-user="J"] { background:var(--jason); }
.user-switch button.active[data-user="D"] { background:var(--danique); }
.icon-btn { font-size:20px; padding:6px; border-radius:10px; }

/* ---------- View / layout ---------- */
.view { padding:16px 14px calc(96px + var(--safe-bot)); max-width:560px; margin:0 auto; }
.view section { margin-bottom:18px; }
.muted { color:var(--muted); }
.tiny { font-size:12.5px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex;
  padding:8px 8px calc(8px + var(--safe-bot)); background:rgba(14,17,23,.92);
  backdrop-filter:blur(12px); border-top:1px solid var(--line);
}
.tab {
  flex:1; display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:6px 0; font-size:11px; font-weight:600; color:var(--muted2); border-radius:12px;
}
.tab .tab-ico { font-size:21px; filter:grayscale(.4) opacity(.8); transition:.15s; }
.tab.active { color:var(--txt); }
.tab.active .tab-ico { filter:none; transform:translateY(-1px); }

/* ---------- Cards ---------- */
.card {
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; margin-bottom:14px;
}
.card.flush { padding:0; overflow:hidden; }
.card-title { font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-bottom:12px; }
.row { display:flex; align-items:center; gap:10px; }
.between { justify-content:space-between; }

/* ---------- Day header ---------- */
.dayhead { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.dayhead .nav { width:42px; height:42px; border-radius:12px; background:var(--card); border:1px solid var(--line); font-size:20px; display:flex; align-items:center; justify-content:center; }
.dayhead .nav:disabled { opacity:.3; }
.day-center { text-align:center; }
.day-center .big { font-size:30px; font-weight:900; line-height:1; }
.day-center .big span { background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.day-center .date { font-size:12.5px; color:var(--muted); margin-top:3px; }

/* ---------- Progress ring ---------- */
.ringwrap { display:flex; align-items:center; gap:16px; }
.ring { position:relative; width:96px; height:96px; flex:none; }
.ring svg { transform:rotate(-90deg); }
.ring .ring-bg { stroke:var(--line); }
.ring .ring-fg { stroke:url(#fireGrad); stroke-linecap:round; transition:stroke-dashoffset .5s ease; }
.ring .ring-txt { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ring .ring-txt .n { font-size:26px; font-weight:900; line-height:1; }
.ring .ring-txt .l { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.1em; }
.ring.complete .ring-txt .n { color:var(--green); }

/* ---------- Task list ---------- */
.tasks { display:grid; gap:10px; }
.task {
  display:flex; align-items:center; gap:13px; padding:13px 14px; border-radius:var(--radius-sm);
  background:var(--card2); border:1px solid var(--line); text-align:left; width:100%; transition:.15s;
}
.task:active { transform:scale(.99); }
.task .t-ico { font-size:22px; flex:none; width:30px; text-align:center; }
.task .t-main { flex:1; min-width:0; }
.task .t-label { font-weight:700; font-size:15px; }
.task .t-hint { font-size:12px; color:var(--muted); }
.task .t-check {
  width:28px; height:28px; border-radius:50%; border:2px solid var(--muted2); flex:none;
  display:flex; align-items:center; justify-content:center; font-size:16px; color:transparent;
}
.task.done { background:rgba(46,204,113,.10); border-color:rgba(46,204,113,.45); }
.task.done .t-check { background:var(--green); border-color:var(--green); color:#08210f; }
.task.done .t-label { color:#bdf0cf; }

/* ---------- Mini info cards (eten/training) ---------- */
.mini-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.mini { background:var(--card); border:1px solid var(--line); border-radius:var(--radius-sm); padding:13px; }
.mini .m-top { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-bottom:5px; }
.mini .m-big { font-weight:800; font-size:15px; }
.mini .m-sub { font-size:12px; color:var(--muted); margin-top:3px; }
.pill-out { display:inline-block; padding:2px 9px; border-radius:999px; font-size:11px; font-weight:800; background:var(--grad); color:#fff; }

/* ---------- Buttons ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:13px 18px; border-radius:999px; font-weight:800; font-size:15px; background:var(--card2); border:1px solid var(--line); color:var(--txt); width:100%; }
.btn.primary { background:var(--grad); border:none; color:#fff; box-shadow:0 6px 18px rgba(233,69,96,.28); }
.btn.ghost { background:transparent; }
.btn.danger { color:#ff8d8d; border-color:rgba(255,80,80,.4); }
.btn-row { display:flex; gap:10px; }
.btn.sm { padding:10px 14px; font-size:13.5px; }

/* ---------- Media ---------- */
.media-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.thumb { position:relative; width:74px; height:74px; border-radius:12px; overflow:hidden; background:var(--bg2); border:1px solid var(--line); flex:none; }
.thumb img, .thumb video { width:100%; height:100%; object-fit:cover; display:block; }
.thumb .play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:24px; color:#fff; text-shadow:0 1px 4px #000; }
.thumb .del { position:absolute; top:2px; right:2px; width:20px; height:20px; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; font-size:12px; display:flex; align-items:center; justify-content:center; }
.thumb.add { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:var(--muted); font-size:11px; border-style:dashed; }
.thumb.add .plus { font-size:26px; line-height:1; color:var(--fire1); }

/* ---------- Inputs ---------- */
.field { margin-bottom:12px; }
.field label { display:block; font-size:12px; color:var(--muted); margin-bottom:5px; font-weight:600; }
.input, textarea.input { width:100%; padding:12px 13px; border-radius:12px; background:var(--bg2); border:1px solid var(--line); color:var(--txt); font-size:15px; }
textarea.input { resize:vertical; min-height:64px; }
.inline2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

/* ---------- Progress grid (75) ---------- */
.stat-row { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; margin-bottom:14px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:var(--radius-sm); padding:13px; text-align:center; }
.stat .v { font-size:24px; font-weight:900; }
.stat .v.fire { background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.stat .k { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-top:2px; }
.grid75 { display:grid; grid-template-columns:repeat(10,1fr); gap:5px; }
.cell {
  aspect-ratio:1; border-radius:7px; background:var(--card2); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; font-size:10px; color:var(--muted2); font-weight:700;
}
.cell.partial { background:rgba(255,193,7,.18); border-color:rgba(255,193,7,.4); color:var(--gold); }
.cell.done { background:var(--green-d); border-color:var(--green); color:#eafff1; }
.cell.today { box-shadow:0 0 0 2px var(--fire1); }

/* ---------- Plan sub-tabs ---------- */
.subtabs { display:flex; gap:7px; overflow-x:auto; padding-bottom:4px; margin-bottom:14px; -webkit-overflow-scrolling:touch; }
.subtabs::-webkit-scrollbar { display:none; }
.subtab { padding:8px 14px; border-radius:999px; font-size:13px; font-weight:700; background:var(--card); border:1px solid var(--line); color:var(--muted); white-space:nowrap; }
.subtab.active { background:var(--grad); color:#fff; border-color:transparent; }

/* ---------- Tables / lists in plan ---------- */
.plist { display:grid; gap:8px; }
.pitem { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:12px 13px; }
.pitem .pi-t { font-weight:800; font-size:14px; }
.pitem .pi-d { font-size:13px; color:var(--muted); margin-top:2px; }
.kv { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--line); font-size:14px; }
.kv:last-child { border-bottom:none; }
.kv .k { color:var(--muted); }
.kv .v { font-weight:700; text-align:right; }

/* menu */
.menu-meal { margin-bottom:12px; }
.menu-meal .mm-h { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--fire1); margin-bottom:6px; }
.menu-line { display:flex; justify-content:space-between; gap:10px; font-size:14px; padding:5px 0; border-bottom:1px solid var(--line); }
.menu-line:last-child { border-bottom:none; }
.menu-line .ml-q { font-weight:800; color:var(--txt); white-space:nowrap; }
.menu-total { background:var(--grad); border-radius:12px; padding:12px 14px; color:#fff; font-weight:800; display:flex; justify-content:space-between; align-items:center; margin-top:6px; }
.menu-total .mt-macros { font-size:12px; font-weight:700; opacity:.95; }

/* shopping checkbox */
.shop-item { display:flex; align-items:center; gap:11px; padding:11px 13px; background:var(--card); border:1px solid var(--line); border-radius:11px; }
.shop-item .s-check { width:22px; height:22px; border-radius:6px; border:2px solid var(--muted2); flex:none; display:flex; align-items:center; justify-content:center; font-size:13px; color:transparent; }
.shop-item.checked { opacity:.55; }
.shop-item.checked .s-check { background:var(--green); border-color:var(--green); color:#08210f; }
.shop-item.checked .s-label { text-decoration:line-through; }

/* ---------- Gallery ---------- */
.gal-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.gal-cell { position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden; background:var(--bg2); border:1px solid var(--line); }
.gal-cell img, .gal-cell video { width:100%; height:100%; object-fit:cover; }
.gal-cell .tag { position:absolute; left:4px; bottom:4px; font-size:9px; font-weight:800; padding:1px 6px; border-radius:999px; background:rgba(0,0,0,.6); }
.gal-cell .play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:26px; color:#fff; }

/* ---------- Modal ---------- */
.modal-bg { position:fixed; inset:0; z-index:50; background:rgba(0,0,0,.6); backdrop-filter:blur(4px); display:flex; align-items:flex-end; justify-content:center; }
.modal { background:var(--bg2); border:1px solid var(--line); border-radius:22px 22px 0 0; width:100%; max-width:560px; padding:20px 18px calc(20px + var(--safe-bot)); max-height:88vh; overflow:auto; }
.modal.center { border-radius:22px; align-self:center; margin:0 14px; }
.modal-h { font-size:18px; font-weight:900; margin-bottom:14px; display:flex; justify-content:space-between; align-items:center; }
.modal-h .x { font-size:22px; color:var(--muted); }
.viewer-bg { position:fixed; inset:0; z-index:60; background:rgba(0,0,0,.92); display:flex; align-items:center; justify-content:center; }
.viewer-bg img, .viewer-bg video { max-width:96vw; max-height:86vh; border-radius:12px; }
.viewer-close { position:fixed; top:calc(var(--safe-top) + 14px); right:18px; font-size:30px; color:#fff; z-index:61; }

/* ---------- Onboarding ---------- */
.onb { text-align:center; padding:24px 8px; }
.onb .mark { font-size:64px; font-weight:900; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.onb h2 { margin:8px 0 4px; font-size:22px; }

.empty { text-align:center; color:var(--muted); padding:30px 10px; }
.empty .e-ico { font-size:40px; opacity:.5; }

.toast { position:fixed; left:50%; bottom:calc(86px + var(--safe-bot)); transform:translateX(-50%); background:#fff; color:#111; font-weight:700; font-size:14px; padding:11px 18px; border-radius:999px; z-index:70; box-shadow:0 8px 24px rgba(0,0,0,.4); animation:toastin .25s ease; }
@keyframes toastin { from { opacity:0; transform:translate(-50%,8px); } }

.banner { background:linear-gradient(135deg,rgba(255,107,53,.16),rgba(233,69,96,.16)); border:1px solid rgba(255,107,53,.35); border-radius:14px; padding:13px 14px; font-size:13.5px; }
.warn { background:rgba(255,193,7,.12); border:1px solid rgba(255,193,7,.4); border-radius:12px; padding:11px 13px; font-size:13px; color:#ffe08a; }

/* ---------- Pijler-kaarten (gedetailleerde dagchecklist) ---------- */
.pillar { padding:14px 16px; }
.pillar-h { display:flex; align-items:center; gap:11px; cursor:pointer; user-select:none; }
.pillar-h .p-ico { font-size:22px; flex:none; width:28px; text-align:center; }
.pillar-h .p-name { font-weight:800; font-size:16px; flex:1; }
.pillar-h .p-prog { font-size:12px; color:var(--muted); font-weight:800; background:var(--card2); padding:3px 10px; border-radius:999px; }
.pillar-h .p-check { width:24px; height:24px; border-radius:50%; border:2px solid var(--muted2); flex:none; display:flex; align-items:center; justify-content:center; font-size:13px; color:transparent; }
.pillar-h .p-chev { color:var(--muted2); transition:transform .2s; font-size:13px; }
.pillar.open .p-chev { transform:rotate(180deg); }
.pillar.pdone { border-color:rgba(46,204,113,.45); background:rgba(46,204,113,.06); }
.pillar.pdone .p-check { background:var(--green); border-color:var(--green); color:#08210f; }
.pillar.pdone .p-prog { color:var(--green); background:rgba(46,204,113,.14); }
.pillar-b { margin-top:14px; }

.check-line { display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); }
.check-line:last-child { border-bottom:none; }
.check-line:active { opacity:.7; }
.check-line .cl-box { width:25px; height:25px; border-radius:7px; border:2px solid var(--muted2); flex:none; display:flex; align-items:center; justify-content:center; font-size:14px; color:transparent; transition:.12s; }
.check-line .cl-main { flex:1; font-size:14.5px; }
.check-line .cl-q { font-weight:800; font-size:13px; white-space:nowrap; color:var(--txt); }
.check-line.on .cl-box { background:var(--green); border-color:var(--green); color:#08210f; }
.check-line.on .cl-main { color:var(--muted); text-decoration:line-through; }
.meal-group-h { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--fire1); margin:14px 0 2px; }
.menu-tag-row { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:6px; }
.menu-tag-row a { cursor:pointer; }

.water-big, .counter-big { font-size:32px; font-weight:900; text-align:center; line-height:1; }
.water-big small { font-size:15px; color:var(--muted); font-weight:700; }
.water-bar { height:12px; border-radius:999px; background:var(--card2); overflow:hidden; margin:12px 0; }
.water-fill { height:100%; background:linear-gradient(90deg,#3aa0ff,#2E86C1); transition:width .35s ease; }

/* ---------- Weekplan menu-keuze ---------- */
.menu-pick { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.mp { display:flex; flex-direction:column; align-items:center; gap:2px; padding:10px 4px; border-radius:12px; background:var(--card2); border:1px solid var(--line); font-weight:900; font-size:18px; color:var(--muted); }
.mp small { font-size:9px; font-weight:600; line-height:1.1; text-align:center; color:var(--muted2); }
.mp.on { background:var(--grad); color:#fff; border-color:transparent; }
.mp.on small { color:rgba(255,255,255,.9); }
