/* ============================================================
   CALNIVA — Tasarım Sistemi (mobil öncelikli, app hissi)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #F5F8F3;
  --bg-2: #EAF2EC;
  --surface: #FFFDFC;
  --surface-2: #F7FAF5;

  --green: #18A878;
  --green-2: #0D7E5D;
  --green-deep: #102F29;
  --mint: #31C996;
  --mint-soft: #DDF5EA;
  --leaf-bg: #E6F5EC;

  --coral: #FF7A59;
  --coral-soft: #FFE7DF;
  --amber: #F5B841;
  --amber-soft: #FDEFCB;
  --sky: #38BDF8;
  --sky-soft: #DDF2FD;
  --violet: #8B7CF6;
  --violet-soft: #ECE8FE;

  --ink: #10231F;
  --ink-soft: #596B64;
  --ink-faint: #8EA098;
  --line: rgba(16, 35, 31, 0.11);
  --line-soft: rgba(16, 35, 31, 0.07);

  --ok: #16A97A; --ok-bg: #DFF4EA;
  --warn: #D9902B; --warn-bg: #FBEFD6;
  --bad: #E5533B; --bad-bg: #FBE3DD;

  --grad-green: linear-gradient(135deg, #31C996, #18A878 54%, #0D7E5D);
  --grad-coral: linear-gradient(135deg, #FFB199, #FF7A59);
  --grad-hero: linear-gradient(145deg, #10231F 0%, #0D6E54 52%, #22B889 100%);
  --grad-card: linear-gradient(160deg, #FFFDFC, #F5FAF4);

  --shadow-sm: 0 2px 10px rgba(16, 35, 31, 0.07);
  --shadow: 0 14px 34px rgba(16, 35, 31, 0.11);
  --shadow-lg: 0 28px 68px rgba(16, 35, 31, 0.18);
  --shadow-green: 0 15px 32px rgba(13, 126, 93, 0.26);

  --r-xs: 10px; --r-sm: 14px; --r: 20px; --r-lg: 28px; --r-pill: 999px;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Manrope', 'Plus Jakarta Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 560px;           /* app içerik genişliği (telefon merkezli) */
  --tabbar-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.08; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; color: inherit; }
::selection { background: var(--mint-soft); }

/* ---------- yardımcı ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap-x { flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }
.mt { margin-top: 14px; } .mt-lg { margin-top: 24px; }
/* SVG ikon (emoji yerine) — container font-size'ına göre ölçeklenir */
.ico { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -0.16em; flex: none; }
.ico.sm { width: .95em; height: .95em; }
.ico.lg { width: 1.35em; height: 1.35em; }
button .ico, .btn .ico, .chip .ico, .pill .ico { pointer-events: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; }
.pill.green { background: var(--leaf-bg); color: var(--green-2); }
.pill.coral { background: var(--coral-soft); color: var(--coral); }
.pill.amber { background: var(--amber-soft); color: var(--warn); }
.pill.sky   { background: var(--sky-soft); color: #0C87C0; }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: var(--r-pill); font-weight: 800; font-size: 15px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), box-shadow .2s, background .2s; white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--grad-green); color: #fff; box-shadow: var(--shadow-green); }
.btn.coral { background: var(--grad-coral); color: #fff; box-shadow: 0 12px 24px rgba(255,122,89,.3); }
.btn.ghost { background: transparent; box-shadow: none; border: 1.5px solid var(--line); }
.btn.soft { background: var(--leaf-bg); color: var(--green-2); box-shadow: none; }
.btn.block { display: flex; width: 100%; }
.btn.sm { padding: 9px 14px; font-size: 13.5px; }
.btn.lg { padding: 16px 26px; font-size: 16px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); box-shadow: var(--shadow-sm); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- kart ---------- */
.card {
  background: var(--surface); border-radius: 18px; padding: 18px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line-soft);
}
.card.pad-lg { padding: 22px; }
.card-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 700; font-family: var(--font); }
.card-title.ct-ico { display: inline-flex; align-items: center; gap: 6px; }
.card-title.ct-ico .ico { width: 15px; height: 15px; }

/* ---------- form ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.input, select.input, textarea.input {
  width: 100%; padding: 13px 15px; border-radius: var(--r-sm); background: var(--surface-2);
  border: 1.5px solid var(--line); transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--mint-soft); background: #fff; }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.5; }
.input-row { display: flex; gap: 10px; }
.input-row > * { flex: 1; }
.hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 5px; }

/* seçim ızgarası (radyo kart) */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice {
  position: relative; padding: 14px; border-radius: var(--r-sm); background: var(--surface-2);
  border: 1.5px solid var(--line); text-align: center; transition: all .15s var(--ease); font-weight: 600; font-size: 14px;
}
.choice .emo { font-size: 24px; display: block; margin-bottom: 4px; }
.choice small { display: block; font-weight: 500; color: var(--ink-faint); font-size: 12px; margin-top: 2px; }
.choice.on { border-color: var(--green); background: var(--leaf-bg); color: var(--green-2); box-shadow: 0 0 0 3px var(--mint-soft); }
.choice:active { transform: scale(.97); }

/* chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: var(--r-pill);
  background: var(--surface); border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 600; transition: all .15s;
}
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.chip:active { transform: scale(.95); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px); transform: translate(-50%, 30px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 9999; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--green-2); } .toast.bad { background: var(--bad); } .toast.warn { background: var(--warn); }

/* ============================================================
   LANDING (index.html)
   ============================================================ */
.lp-hero {
  background: var(--grad-hero); color: #fff; padding: 26px 0 50px; position: relative; overflow: hidden;
  border-radius: 0 0 30px 30px;
}
.lp-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.88), transparent 76%);
}
.lp-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  background: linear-gradient(to top, rgba(16,35,31,.20), transparent);
}
.lp-nav { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: .10em; }
.brand .logo { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 12px 26px rgba(5, 31, 25, .28); }
.lp-hero-inner { position: relative; z-index: 2; text-align: center; padding-top: 30px; }
.lp-eyebrow {
  display: inline-block; color: rgba(255,255,255,.92);
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  padding: 7px 15px; border: 1px solid rgba(255,255,255,.36); border-radius: var(--r-pill);
  margin-bottom: 16px; backdrop-filter: blur(4px); background: rgba(255,255,255,.08);
}
.lp-hero h1 { color: #fff; font-size: clamp(36px, 9vw, 50px); }
.lp-hero .lead { color: rgba(255,255,255,.91); font-size: 16.5px; max-width: 34ch; margin: 14px auto 0; }
.lp-hero .cta-row { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.lp-badges { display: flex; justify-content: center; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.lp-badges .pill { background: rgba(255,255,255,.16); color: #fff; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.feature {
  background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--line-soft);
}
.feature .fico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-bottom: 10px; color: var(--green-deep); }
.feature .fico .ico { width: 24px; height: 24px; }
.lp-badges .pill .ico { width: 15px; height: 15px; }
.feature h3 { font-size: 17px; font-family: var(--font); font-weight: 700; }
.feature p { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.section-head { text-align: center; margin: 34px 0 4px; }
.section-head h2 { font-size: clamp(24px, 6vw, 30px); }
.section-head p { color: var(--ink-soft); margin-top: 6px; }

.steps-list { display: grid; gap: 12px; margin-top: 20px; }
.step-item { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-sm); }
.step-item .n { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--grad-green); color: #fff; display: grid; place-items: center; font-weight: 800; }
.lp-foot { text-align: center; padding: 34px 0 40px; color: var(--ink-faint); font-size: 13px; }

/* Auth kartı / modal */
.auth-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 26px 22px; }
.auth-tabs { display: flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 4px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; padding: 10px; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; color: var(--ink-soft); transition: all .2s; }
.auth-tabs button.on { background: #fff; color: var(--green-2); box-shadow: var(--shadow-sm); }

/* ============================================================
   MODAL / BOTTOM SHEET
   ============================================================ */
.overlay {
  position: fixed; inset: 0; background: rgba(16,48,42,.42); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; max-width: var(--wrap); background: var(--surface); border-radius: 26px 26px 0 0; padding: 8px 18px 26px;
  transform: translateY(100%); transition: transform .3s var(--ease); max-height: 92vh; overflow-y: auto;
  box-shadow: 0 -20px 60px rgba(16,48,42,.2);
}
.overlay.show .sheet { transform: translateY(0); }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 14px; cursor: grab; touch-action: none; }
.sheet h3 { font-size: 22px; margin-bottom: 4px; }
.sheet-center { align-items: center; }
.sheet-center .sheet { border-radius: 26px; transform: translateY(20px) scale(.96); margin: auto 14px; max-width: 440px; }
.sheet-center.show .sheet { transform: translateY(0) scale(1); }

/* ============================================================
   APP SHELL (app.html / admin.html)
   ============================================================ */
.app-body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); }
.topbar {
  position: sticky; top: 0; z-index: 50; background: rgba(241,248,243,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
}
.topbar-logo {
  width: 38px; height: 38px; border-radius: 12px;
  box-shadow: 0 8px 18px rgba(16,35,31,.16);
}
.hello {
  min-width: 0;
  padding: 3px 0 3px 0;
}
.hello .hi { font-size: 12.5px; color: var(--ink-soft); font-weight: 700; line-height: 1.2; }
.hello .name { font-size: 20px; font-family: var(--font-display); font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--grad-green); color: #fff; display: grid; place-items: center; font-size: 20px; box-shadow: var(--shadow-green); }

.view { padding-top: 16px; animation: fadeUp .4s var(--ease) both; }
.view-title { font-size: 26px; margin-bottom: 2px; }
.view-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 16px; }

/* bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.92); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft); display: flex; justify-content: center;
}
.tabbar-inner { width: 100%; max-width: var(--wrap); display: flex; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-faint); font-size: 10.5px; font-weight: 700; transition: color .2s; position: relative;
}
.tab svg { width: 24px; height: 24px; transition: transform .2s var(--ease); }
.tab.on { color: var(--green-2); }
.tab.on svg { transform: translateY(-2px) scale(1.08); }
.tab.on::before { content: ""; position: absolute; top: 6px; width: 34px; height: 34px; border-radius: 12px; background: var(--leaf-bg); z-index: -1; }
.tab .fab-slot { }

/* ============================================================
   BUGÜN — halka + istatistikler
   ============================================================ */
.ring-card { background: var(--grad-card); border: 1px solid var(--line-soft); }
.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 130px; height: 130px; flex: 0 0 130px; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: var(--line); }
.ring .fill { stroke: url(#ringgrad); stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center .big { font-size: 30px; font-weight: 800; font-family: var(--font-display); line-height: 1; }
.ring-center .lbl { font-size: 11px; color: var(--ink-faint); font-weight: 600; }
.ring-legend { flex: 1; display: grid; gap: 9px; }
.ring-legend .lg-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.ring-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 7px; }

.macro-bars { display: grid; gap: 12px; margin-top: 4px; }
.macro { }
.macro .m-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.macro .m-track { height: 9px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.macro .m-fill { height: 100%; border-radius: 6px; transition: width .8s var(--ease); }
.macro.p .m-fill { background: var(--coral); } .macro.p .val { color: var(--coral); }
.macro.c .m-fill { background: var(--amber); } .macro.c .val { color: var(--warn); }
.macro.f .m-fill { background: var(--violet); } .macro.f .val { color: var(--violet); }

/* stat mini kartlar */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  border-radius: var(--r); padding: 15px; position: relative; overflow: hidden; color: #fff; min-height: 108px;
  display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-sm);
}
.stat .s-top { display: flex; align-items: center; justify-content: space-between; }
.stat .s-ico { font-size: 20px; }
.stat .s-val { font-size: 26px; font-weight: 800; font-family: var(--font-display); line-height: 1; }
.stat .s-lbl { font-size: 12.5px; opacity: .92; font-weight: 600; }
.stat.water { background: linear-gradient(150deg, #5CC5F2, #2E9BD6); }
.stat.steps { background: linear-gradient(150deg, #FFB27A, #FF7A59); }
.stat.weight { background: linear-gradient(150deg, #A78BFA, #7C6AF0); }
.stat.streak { background: linear-gradient(150deg, #FFD066, #F5A623); }
.stat .s-prog { height: 6px; border-radius: 4px; background: rgba(255,255,255,.35); overflow: hidden; margin-top: 8px; }
.stat .s-prog i { display: block; height: 100%; background: #fff; border-radius: 4px; transition: width .8s var(--ease); }
.stat .s-add { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 18px; font-weight: 700; }

/* su bardakları */
.glasses { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.glass { width: 30px; height: 38px; border-radius: 6px 6px 9px 9px; border: 2px solid var(--sky); position: relative; overflow: hidden; background: var(--sky-soft); transition: transform .15s; }
.glass.full { background: var(--sky); }
.glass.full::after { content: ""; position: absolute; left: 50%; top: 52%; width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.75); transform: translate(-50%,-50%); }
.glass:active { transform: scale(.9); }

/* öğün listesi */
.meal-block { margin-top: 12px; }
.meal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.meal-head .mh-l { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.meal-head .mh-cal { font-size: 13px; color: var(--ink-faint); font-weight: 600; }
.food-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.food-item:last-child { border-bottom: none; }
.food-item .fi-name { font-weight: 600; font-size: 14.5px; }
.food-item .fi-sub { font-size: 12px; color: var(--ink-faint); }
.food-item .fi-cal { font-weight: 700; color: var(--green-2); font-size: 14px; }
.food-item .fi-del { color: var(--ink-faint); font-size: 18px; padding: 2px 6px; }
.empty-meal { color: var(--ink-faint); font-size: 13.5px; padding: 8px 0; }

/* alışkanlık rozetleri */
.habit-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; -webkit-overflow-scrolling: touch; }
.habit-row::-webkit-scrollbar { display: none; }
.habit {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 74px; padding: 12px 6px;
  border-radius: var(--r-sm); background: var(--surface-2); border: 1.5px solid var(--line); transition: all .18s var(--ease);
}
.habit .h-ico { font-size: 22px; }
.habit .h-lbl { font-size: 10.5px; font-weight: 600; text-align: center; color: var(--ink-soft); line-height: 1.2; }
.habit.on { background: var(--leaf-bg); border-color: var(--green); }
.habit.on .h-lbl { color: var(--green-2); }
.habit:active { transform: scale(.95); }

/* tip / motivasyon */
.tip-card { background: linear-gradient(135deg, #FFF6E9, #FDEFCB); border: none; display: flex; gap: 12px; align-items: flex-start; }
.tip-card .t-ico { font-size: 26px; }
.tip-card .t-txt { font-size: 14px; font-weight: 500; color: #7A5B18; }

/* ============================================================
   TARİFLER
   ============================================================ */
.recipe-card { display: flex; flex-direction: column; gap: 0; overflow: hidden; padding: 0; }
.recipe-top { padding: 16px 16px 12px; background: var(--grad-card); }
.recipe-card h3 { font-size: 18px; font-family: var(--font); font-weight: 700; }
.recipe-meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; font-weight: 600; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.recipe-tags .pill { font-size: 11px; padding: 3px 9px; }
.ingredient-notes { display: flex; flex-wrap: wrap; gap: 6px; }
.match-bar { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.match-bar i { display: block; height: 100%; background: var(--grad-green); border-radius: 4px; }

.ingredient-picker { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- malzeme seçici: arama + kategoriler ---------- */
.ing-search { position: relative; }
.ing-search .is-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .65; pointer-events: none; }
.ing-search input {
  width: 100%; padding: 12px 16px 12px 42px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1.5px solid var(--line); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ing-search input:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--mint-soft); background: #fff; }

.ing-cat { border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
.ing-cat + .ing-cat { margin-top: 8px; }
.ing-cat summary {
  list-style: none; display: flex; align-items: center; gap: 9px;
  padding: 12px 14px; cursor: pointer; font-weight: 700; font-size: 14px; user-select: none;
}
.ing-cat summary::-webkit-details-marker { display: none; }
.ing-cat summary:active { background: var(--leaf-bg); }
.ic-ico { font-size: 17px; }
.ic-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-count {
  background: var(--green); color: #fff; font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}
.ic-total { color: var(--ink-faint); font-size: 12px; font-weight: 600; }
.ic-chev { color: var(--ink-faint); font-size: 11px; transition: transform .2s var(--ease); }
.ing-cat[open] .ic-chev { transform: rotate(180deg); }
.ing-cat[open] summary { border-bottom: 1px dashed var(--line-soft); }
.ing-cat-body { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 14px; background: var(--surface); }
.chip .chip-kcal { font-size: 10.5px; font-weight: 800; background: var(--leaf-bg); color: var(--green-2); border-radius: var(--r-pill); padding: 1px 6px; }
.chip.on .chip-kcal { background: rgba(255,255,255,.25); color: #fff; }
.ing-selected { display: flex; flex-wrap: wrap; gap: 7px; }
.ing-selected .pill { cursor: pointer; border: none; font-family: inherit; }
.ing-selected .pill:active { transform: scale(.95); }

/* ---------- fotoğraf kaynağı seçimi (kamera / galeri) ---------- */
.photo-src { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-tile {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 18px 10px; border-radius: var(--r-sm); border: 2px dashed var(--green);
  background: var(--leaf-bg); font-weight: 700; font-size: 14px; text-align: center;
  transition: transform .15s var(--ease), background .2s;
}
.photo-tile:active { transform: scale(.96); background: var(--mint-soft); }
.photo-tile .pt-ico { font-size: 32px; line-height: 1.25; color: var(--green-2); }
.photo-tile .pt-ico .ico { width: 30px; height: 30px; }
.photo-tile .pt-sub { font-size: 11.5px; font-weight: 500; color: var(--ink-faint); }
.macro-inline { display: flex; gap: 14px; margin-top: 8px; font-size: 12.5px; font-weight: 700; }
.macro-inline span b { display: block; font-size: 15px; }
.macro-inline .mp { color: var(--coral); } .macro-inline .mc { color: var(--warn); } .macro-inline .mf { color: var(--violet); }

/* ============================================================
   İLERLEME — grafik + rozetler
   ============================================================ */
.chart-card { padding: 16px; }
.chart-wrap { position: relative; width: 100%; }
.chart-svg { width: 100%; height: 190px; overflow: visible; }
.chart-svg .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.chart-svg .area { fill: url(#areagrad); }
.chart-svg .line { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .dot { fill: #fff; stroke: var(--green); stroke-width: 2.5; }
.chart-svg .lbl { fill: var(--ink-faint); font-size: 10px; font-family: var(--font); }
.chart-legend { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--ink-soft); }

.progress-big { display: flex; align-items: baseline; gap: 8px; }
.progress-big .pb-num { font-size: 40px; font-weight: 800; font-family: var(--font-display); }
.progress-big .pb-unit { font-size: 16px; color: var(--ink-soft); font-weight: 600; }
.progress-track { height: 12px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin: 12px 0 6px; position: relative; }
.progress-track i { display: block; height: 100%; background: var(--grad-green); border-radius: 8px; transition: width 1s var(--ease); }

.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.badge {
  text-align: center; padding: 14px 8px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-soft);
  transition: transform .2s; position: relative;
}
.badge .b-ico { font-size: 34px; filter: grayscale(1) opacity(.35); transition: filter .3s, transform .3s; }
.badge .b-name { font-size: 11.5px; font-weight: 700; margin-top: 6px; color: var(--ink-faint); }
.badge.earned { background: linear-gradient(160deg, #FFFDF6, #FDF3D8); border-color: var(--amber-soft); }
.badge.earned .b-ico { filter: none; }
.badge.earned .b-name { color: var(--ink); }
.badge.earned::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 800; }

/* ============================================================
   PROFİL
   ============================================================ */
.profile-head { text-align: center; padding: 8px 0 4px; }
.profile-avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--grad-green); color: #fff; display: grid; place-items: center; font-size: 40px; margin: 0 auto 10px; box-shadow: var(--shadow-green); }
.list { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--line-soft); }
.list-item:last-child { border-bottom: none; }
.list-item .li-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: var(--leaf-bg); }
.list-item .li-main { flex: 1; }
.list-item .li-title { font-weight: 600; font-size: 14.5px; }
.list-item .li-sub { font-size: 12.5px; color: var(--ink-faint); }
.list-item .li-val { font-weight: 700; color: var(--green-2); }
.list-item .li-arrow { color: var(--ink-faint); }
a.list-item { color: inherit; text-decoration: none; }
.list-item .ig-logo {
  color: #fff;
  background: radial-gradient(circle at 30% 110%, #fdf497 0 18%, #fd5949 42%, #d6249f 68%, #285AEB 100%);
}
.list-item .ig-logo svg { display: block; }
.notice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--leaf-bg), #fff);
  border: 1px solid rgba(18,135,106,.16);
}
.notice-card b { display: block; font-size: 14px; }
.notice-card p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-soft); }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.summary-grid .sg { background: var(--surface); border-radius: var(--r-sm); padding: 14px 8px; box-shadow: var(--shadow-sm); }
.summary-grid .sg b { display: block; font-size: 22px; font-family: var(--font-display); }
.summary-grid .sg span { font-size: 11.5px; color: var(--ink-faint); font-weight: 600; }

/* ============================================================
   ONBOARDING
   ============================================================ */
.onb { position: fixed; inset: 0; background: #fff; z-index: 500; display: flex; flex-direction: column; }
.onb::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 220px;
  background: linear-gradient(180deg, rgba(49,201,150,.12), rgba(255,255,255,0));
  pointer-events: none;
}
.onb-body { flex: 1; overflow-y: auto; padding: 18px 22px 26px; max-width: var(--wrap); margin: 0 auto; width: 100%; position: relative; }
.onb-progress { height: 4px; background: rgba(16,35,31,.08); border-radius: 3px; overflow: hidden; margin-bottom: 28px; }
.onb-progress i { display: block; height: 100%; background: var(--grad-green); border-radius: 3px; transition: width .4s var(--ease); }
.onb-step { min-height: calc(100vh - 180px); display: flex; flex-direction: column; justify-content: center; animation: fadeUp .45s var(--ease) both; }
.onb-step h2 { font-size: 30px; margin-bottom: 8px; letter-spacing: -.01em; }
.onb-step .osub { color: var(--ink-soft); margin-bottom: 24px; font-size: 15px; line-height: 1.55; }
.onb-foot { padding: 16px 22px calc(16px + env(safe-area-inset-bottom)); max-width: var(--wrap); margin: 0 auto; width: 100%; display: flex; gap: 10px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 24%); position: relative; }
.onb .btn.primary { background: #111916; color: #fff; box-shadow: 0 18px 34px rgba(17,25,22,.20); }
.onb .btn.ghost { border-color: transparent; background: #F3F5F2; box-shadow: none; }
.result-hero { text-align: center; padding: 24px 20px; background: var(--grad-hero); border-radius: 24px; color: #fff; margin-bottom: 16px; }
.result-hero .rh-num { font-size: 52px; font-weight: 800; font-family: var(--font-display); line-height: 1; }
.result-hero .rh-lbl { opacity: .9; font-weight: 600; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-user {
  display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow-sm); margin-bottom: 10px; transition: transform .15s;
}
.admin-user:active { transform: scale(.99); }
.admin-user .au-av { width: 46px; height: 46px; border-radius: 50%; background: var(--grad-green); color: #fff; display: grid; place-items: center; font-size: 20px; flex: 0 0 46px; }
.admin-user .au-main { flex: 1; min-width: 0; }
.admin-user .au-name { font-weight: 700; font-size: 15px; }
.admin-user .au-sub { font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user .au-badge { font-size: 11px; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv:last-child { border: none; }
.kv b { font-weight: 700; }
.seg { display: flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg button { flex: 1; padding: 9px; border-radius: var(--r-pill); font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.seg button.on { background: #fff; color: var(--green-2); box-shadow: var(--shadow-sm); }

/* ============================================================
   YÜKLENİYOR / boş durum
   ============================================================ */
.loader-full { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 2000; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--mint-soft); border-top-color: var(--green); animation: spin .8s linear infinite; }
.splash { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: fadeUp .5s var(--ease) both; }
.splash-logo { width: 96px; height: 96px; border-radius: 28px; box-shadow: 0 20px 44px rgba(13,126,93,.24); animation: splashPop .6s var(--ease) both; }
.splash-word { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: .14em; padding-left: .14em; color: var(--green-deep); }
.splash-sub { margin-top: -8px; font-size: 11px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; color: var(--ink-faint); }
.splash .spinner { width: 30px; height: 30px; border-width: 3px; margin-top: 6px; }
@keyframes splashPop { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }

/* onboarding marka başlığı */
.onb-brand { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 16px; position: relative; z-index: 1; }
.onb-brand img { width: 32px; height: 32px; border-radius: 10px; box-shadow: 0 7px 14px rgba(16,35,31,.15); }
.onb-brand span { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--green-deep); letter-spacing: .12em; padding-left: .12em; }
.onb-hero-word { position: relative; min-height: 430px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.onb-hero-word .ow-kicker { font-size: 24px; font-weight: 800; color: var(--ink); animation: wordRise .55s var(--ease) both; }
.onb-hero-word h1 { font-size: clamp(54px, 15vw, 86px); line-height: .95; color: #111916; margin: 8px 0 12px; animation: wordRise .65s var(--ease) .16s both; }
.onb-hero-word p:last-of-type { font-size: 24px; font-weight: 800; max-width: 12em; line-height: 1.2; color: var(--ink); animation: wordRise .65s var(--ease) .32s both; }
.onb-confetti { position: absolute; inset: 18% 0 14%; pointer-events: none; overflow: hidden; }
.onb-confetti i {
  position: absolute; left: var(--x); top: var(--y); width: 8px; height: 14px; border-radius: 2px;
  background: var(--c); transform: rotate(var(--r)); opacity: 0; animation: confettiPop .7s var(--ease) var(--d) both;
}
.onb-copy-screen { width: 100%; }
.onb-copy-screen h2 { font-size: 33px; margin-bottom: 26px; }
.value-list, .no-row-list { display: grid; gap: 17px; }
.value-row, .no-row { opacity: 0; transform: translateY(14px); animation: listRise .5s var(--ease) calc(var(--i) * 85ms) both; }
.value-row { display: flex; align-items: baseline; gap: 9px; font-size: 24px; line-height: 1.15; }
.value-row b { font-weight: 900; color: #111916; }
.value-row span { color: #8D948F; font-weight: 800; }
.value-row em { color: #8D948F; font-style: normal; font-weight: 700; }
.no-row { display: flex; align-items: baseline; gap: 9px; font-size: 26px; line-height: 1.08; text-transform: uppercase; }
.no-row span { color: #919894; font-weight: 800; }
.no-row b { color: #111916; font-weight: 900; }
.onb-note { margin-top: 28px; color: var(--ink-soft); font-size: 15px; font-weight: 700; animation: listRise .5s var(--ease) .75s both; }
.onb-quiet-card {
  width: 100%; padding: 22px 0 4px;
}
.onb-name-input {
  height: 64px; border-radius: 26px; text-align: center; font-size: 25px; font-weight: 900;
  background: #F5F6F4; border-color: transparent;
}
.onb-wheel-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wheel-label { text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; color: var(--ink-faint); margin-bottom: 8px; }
.onb-wheel-wrap { position: relative; height: 234px; border-radius: 28px; background: #F7F8F6; overflow: hidden; border: 1px solid rgba(16,35,31,.06); }
.onb-wheel {
  position: relative; z-index: 2; height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; padding: 94px 0;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.onb-wheel::-webkit-scrollbar { display: none; }
.wheel-item {
  scroll-snap-align: center; width: 100%; height: 46px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; color: #B0B8B2; transition: color .18s, transform .18s, opacity .18s;
}
.wheel-item.on { color: #111916; transform: scale(1.18); opacity: 1; }
.wheel-focus {
  position: absolute; left: 16px; right: 16px; top: 50%; height: 56px; transform: translateY(-50%);
  border-radius: 18px; border: 1.5px solid rgba(24,168,120,.25);
  background: rgba(255,255,255,.72); pointer-events: none; box-shadow: 0 12px 26px rgba(16,35,31,.07); z-index: 1;
}
.wheel-unit {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 900; color: var(--green-2); pointer-events: none; z-index: 3;
}
.bmi-guide {
  margin-top: 16px; padding: 16px; border-radius: 22px; background: linear-gradient(160deg, #F6FBF7, #FFFFFF);
  border: 1px solid rgba(16,35,31,.08); box-shadow: var(--shadow-sm);
}
.bmi-top, .bmi-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-soft); }
.bmi-top b, .bmi-bottom b { color: var(--ink); font-weight: 900; }
.bmi-bottom .ok { color: var(--green-2); font-weight: 900; }
.bmi-bottom .warn { color: var(--warn); font-weight: 900; }
.bmi-bottom .bad { color: var(--bad); font-weight: 900; }
.bmi-meter { height: 9px; border-radius: 999px; background: linear-gradient(90deg, #8DD6FF, #31C996 38%, #F5B841 70%, #E5533B); margin: 12px 0; overflow: hidden; position: relative; }
.bmi-meter i { display: block; height: 100%; width: 40%; border-right: 4px solid #111916; background: transparent; }
.bmi-guide p { margin-top: 11px; color: var(--ink); font-size: 13.5px; font-weight: 700; line-height: 1.45; }
@keyframes wordRise { from { opacity: 0; transform: translateY(18px) scale(.98); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes listRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes confettiPop { 0% { opacity: 0; transform: translateY(18px) rotate(var(--r)) scale(.6); } 35% { opacity: 1; } 100% { opacity: .95; transform: translateY(-18px) rotate(calc(var(--r) + 55deg)) scale(1); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, #eef6f0 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r-sm); }
.empty { text-align: center; padding: 30px 16px; color: var(--ink-faint); }
.empty .e-ico { font-size: 44px; margin-bottom: 8px; }

/* ============================================================
   ANİMASYONLAR
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes confetti-fall { to { transform: translateY(105vh) rotate(720deg); opacity: .2; } }
.pop-in { animation: pop .5s var(--ease) both; }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* rozet kazanma kutlaması */
.celebrate .b-ico-lg { font-size: 90px; animation: pop .6s var(--ease) both, floaty 2.4s ease-in-out 0.6s infinite; }
.confetti-piece { position: fixed; top: -12px; width: 10px; height: 14px; border-radius: 2px; z-index: 3000; animation: confetti-fall linear forwards; }

/* count-up sayacı için */
.count { font-variant-numeric: tabular-nums; }

/* ============================================================
   DAHA GENİŞ EKRANLAR (tablet/masaüstü) — telefon merkezli
   ============================================================ */
@media (min-width: 600px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-hero .cta-row { flex-direction: row; justify-content: center; }
  .lp-hero .cta-row .btn { min-width: 180px; }
}
@media (min-width: 900px) {
  :root { --wrap: 600px; }
  body.landing .wrap-lg { max-width: 1000px; }
  body.landing .feature-grid { grid-template-columns: repeat(4, 1fr); max-width: 1000px; margin-left: auto; margin-right: auto; }
  body.landing .lp-hero-inner { max-width: 720px; margin: 0 auto; }
}
