/* ============================================================
   FITFULLBODY — Fitness Koçluk Paneli
   Mobil öncelikli · Grafit + Lime · Blur cam efektleri
   ============================================================ */

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

:root{
  --bg:#0c0f14; --bg-2:#131820; --surface:#181f29; --surface-2:#1f2733;
  --surface-3:#28323f; --line:#2a3441; --line-soft:#222b36;
  --txt:#f2f5f8; --txt-2:#9aa7b5; --txt-3:#65717f;
  --lime:#b8f000; --lime-dim:#8fbd00; --lime-glow:rgba(184,240,0,.16);
  --red:#ff4d4f; --red-soft:rgba(255,77,79,.12);
  --amber:#ffb020; --amber-soft:rgba(255,176,32,.12);
  --green:#2ec26a; --green-soft:rgba(46,194,106,.12);
  --blue:#3d8bff; --blue-soft:rgba(61,139,255,.12);
  --radius:16px; --radius-sm:11px; --radius-xs:8px;
  --shadow:0 18px 40px -20px rgba(0,0,0,.7);
  --shadow-sm:0 6px 20px -12px rgba(0,0,0,.6);
  --font:'Sora',system-ui,sans-serif; --font-ui:'Inter',system-ui,sans-serif;
  --safe-b:env(safe-area-inset-bottom,0px);
}
*{ box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }
html{ -webkit-text-size-adjust:100%; }
body{
  font-family:var(--font-ui); color:var(--txt); line-height:1.55; min-height:100vh;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(184,240,0,.07), transparent 60%),
    radial-gradient(700px 500px at -5% 110%, rgba(61,139,255,.06), transparent 55%),
    var(--bg);
}
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4{ font-family:var(--font); font-weight:700; letter-spacing:-.02em; line-height:1.15; }
button{ font-family:inherit; }
img{ max-width:100%; display:block; }
::selection{ background:var(--lime); color:#0c0f14; }
::-webkit-scrollbar{ width:9px; height:9px; }
::-webkit-scrollbar-thumb{ background:var(--surface-3); border-radius:20px; border:2px solid var(--bg); }
input,select,textarea,button{ font-size:16px; } /* iOS zoom engeli */

/* ---------- Yükleniyor ---------- */
#splash{ position:fixed; inset:0; display:grid; place-items:center; background:var(--bg); z-index:9999; transition:opacity .3s; }
#splash.hide{ opacity:0; pointer-events:none; }
.spinner{ width:42px; height:42px; border:3px solid var(--surface-3); border-top-color:var(--lime); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ============================================================
   GİRİŞ — tam ekran hero + blurlu login popup
   ============================================================ */
.landing{ min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; position:relative; overflow:hidden; }
.landing::before{ content:''; position:absolute; inset:0; background:radial-gradient(600px 600px at 70% 20%, var(--lime-glow), transparent 60%); pointer-events:none; }
.landing-top{ display:flex; align-items:center; justify-content:space-between; padding:22px 24px; position:relative; z-index:2; }
.landing-logo{ font-family:var(--font); font-weight:800; font-size:1.3rem; letter-spacing:-.03em; }
.landing-logo span{ color:var(--lime); }
.landing-mid{ flex:1; display:flex; flex-direction:column; justify-content:center; padding:30px 24px; position:relative; z-index:2; max-width:760px; }
.landing-mid .eyebrow{ display:inline-flex; align-items:center; gap:7px; background:var(--surface); border:1px solid var(--line); padding:7px 14px; border-radius:30px; font-size:.8rem; color:var(--txt-2); width:fit-content; margin-bottom:22px; }
.landing-mid .eyebrow i{ color:var(--lime); }
.landing-mid h1{ font-size:clamp(2.4rem,9vw,4.4rem); line-height:1.02; margin-bottom:20px; }
.landing-mid h1 em{ font-style:normal; color:var(--lime); }
.landing-mid p{ color:var(--txt-2); font-size:clamp(1rem,3vw,1.18rem); max-width:480px; margin-bottom:30px; }
.landing-stats{ display:flex; gap:30px; flex-wrap:wrap; }
.landing-stats div b{ font-family:var(--font); font-size:1.6rem; display:block; }
.landing-stats div span{ color:var(--txt-3); font-size:.84rem; }
.landing-cta{ display:flex; gap:12px; margin-top:34px; flex-wrap:wrap; }

/* Login popup (blur cam) */
.popup-bg{
  position:fixed; inset:0; z-index:200; display:none; align-items:center; justify-content:center; padding:20px;
  background:rgba(6,9,13,.55); backdrop-filter:blur(10px) saturate(120%); -webkit-backdrop-filter:blur(10px) saturate(120%);
}
.popup-bg.open{ display:flex; animation:fadeIn .25s ease; }
@keyframes fadeIn{ from{ opacity:0 } to{ opacity:1 } }
.popup{
  width:100%; max-width:400px; border-radius:22px; position:relative;
  background:linear-gradient(160deg, rgba(31,39,51,.85), rgba(19,24,32,.92));
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 30px 70px -25px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  padding:32px 28px; animation:popUp .3s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes popUp{ from{ opacity:0; transform:translateY(20px) scale(.96) } to{ opacity:1; transform:none } }
.popup .pop-close{ position:absolute; top:16px; right:16px; width:34px; height:34px; border-radius:10px; border:1px solid var(--line); background:var(--surface-2); color:var(--txt-2); display:grid; place-items:center; cursor:pointer; font-size:1.2rem; }
.popup .pop-close:hover{ color:var(--txt); }
.popup .pop-icon{ width:52px; height:52px; border-radius:15px; background:var(--lime); color:#0c0f14; display:grid; place-items:center; font-size:1.6rem; margin-bottom:18px; }
.popup h2{ font-size:1.55rem; margin-bottom:5px; }
.popup .sub{ color:var(--txt-2); margin-bottom:24px; font-size:.92rem; }

/* ============================================================
   FORM
   ============================================================ */
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:.82rem; font-weight:600; color:var(--txt-2); margin-bottom:7px; }
.input,select,textarea{
  width:100%; background:var(--surface); border:1px solid var(--line); color:var(--txt);
  padding:13px 15px; border-radius:var(--radius-xs); font-family:var(--font-ui);
  outline:none; transition:border-color .15s, box-shadow .15s;
}
textarea{ resize:vertical; min-height:88px; line-height:1.5; }
.input:focus,select:focus,textarea:focus{ border-color:var(--lime-dim); box-shadow:0 0 0 3px var(--lime-glow); }
.input::placeholder,textarea::placeholder{ color:var(--txt-3); }
select{ appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239aa7b5' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; padding-right:38px; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family:var(--font);
  font-weight:600; font-size:.92rem; padding:13px 20px; border-radius:var(--radius-xs);
  border:1px solid transparent; cursor:pointer; transition:transform .12s, background .15s, border-color .15s; white-space:nowrap;
}
.btn:active{ transform:scale(.97); }
.btn-primary{ background:var(--lime); color:#0c0f14; }
.btn-primary:hover{ background:#c9ff1f; }
.btn-ghost{ background:var(--surface-2); color:var(--txt); border-color:var(--line); }
.btn-ghost:hover{ background:var(--surface-3); }
.btn-danger{ background:var(--red-soft); color:var(--red); border-color:rgba(255,77,79,.3); }
.btn-danger:hover{ background:rgba(255,77,79,.2); }
.btn-block{ width:100%; }
.btn-sm{ padding:9px 14px; font-size:.85rem; }
.btn-icon{ padding:10px; aspect-ratio:1; }
.btn[disabled]{ opacity:.6; pointer-events:none; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app{ display:grid; grid-template-columns:248px 1fr; min-height:100vh; min-height:100dvh; }
.sidebar{ background:var(--bg-2); border-right:1px solid var(--line-soft); padding:22px 16px; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; height:100dvh; }
.brand{ display:flex; align-items:center; gap:11px; padding:6px 10px 22px; }
.brand-mark{ width:38px; height:38px; border-radius:11px; background:var(--lime); display:grid; place-items:center; color:#0c0f14; font-size:1.3rem; }
.brand-name{ font-family:var(--font); font-weight:800; font-size:1.15rem; letter-spacing:-.03em; }
.brand-name span{ color:var(--lime); }
.nav{ display:flex; flex-direction:column; gap:3px; margin-top:6px; }
.nav-label{ font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; color:var(--txt-3); padding:14px 12px 6px; font-weight:600; }
.nav a{ display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:10px; color:var(--txt-2); font-weight:500; font-size:.92rem; transition:background .14s, color .14s; cursor:pointer; }
.nav a i{ font-size:1.25rem; width:22px; text-align:center; }
.nav a:hover{ background:var(--surface); color:var(--txt); }
.nav a.active{ background:var(--lime-glow); color:var(--lime); }
.nav a .badge-count{ margin-left:auto; background:var(--red); color:#fff; font-size:.68rem; font-weight:700; padding:1px 7px; border-radius:20px; }
.side-user{ margin-top:auto; padding-top:16px; border-top:1px solid var(--line-soft); }
.side-user-row{ display:flex; align-items:center; gap:11px; padding:8px 6px; }
.avatar{ width:38px; height:38px; border-radius:11px; display:grid; place-items:center; font-family:var(--font); font-weight:700; color:#0c0f14; flex-shrink:0; }
.side-user-row .meta{ overflow:hidden; }
.side-user-row .meta b{ font-size:.9rem; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.side-user-row .meta span{ font-size:.78rem; color:var(--txt-3); }

.content{ padding:28px 34px 60px; max-width:1240px; width:100%; }
.topbar{ display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:26px; gap:16px; flex-wrap:wrap; }
.topbar h1{ font-size:clamp(1.4rem,4vw,1.7rem); }
.topbar .sub{ color:var(--txt-2); font-size:.92rem; margin-top:3px; }
.topbar-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

/* Mobil üst bar + alt navigasyon (varsayılan gizli) */
.mobile-bar{ display:none; }
.tabbar{ display:none; }

/* ============================================================
   KARTLAR & GRID
   ============================================================ */
.card{ background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-sm); }
.card-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; gap:12px; }
.card-head h3{ font-size:1.05rem; display:flex; align-items:center; gap:9px; }
.card-head h3 i{ color:var(--lime); font-size:1.2rem; }
.grid{ display:grid; gap:16px; }
.g-2{ grid-template-columns:repeat(2,1fr); }
.g-3{ grid-template-columns:repeat(3,1fr); }
.g-4{ grid-template-columns:repeat(4,1fr); }

.stat{ background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--radius); padding:18px; position:relative; overflow:hidden; }
.stat-ico{ width:42px; height:42px; border-radius:12px; display:grid; place-items:center; font-size:1.35rem; margin-bottom:13px; }
.stat-ico.lime{ background:var(--lime-glow); color:var(--lime); }
.stat-ico.red{ background:var(--red-soft); color:var(--red); }
.stat-ico.amber{ background:var(--amber-soft); color:var(--amber); }
.stat-ico.green{ background:var(--green-soft); color:var(--green); }
.stat-ico.blue{ background:var(--blue-soft); color:var(--blue); }
.stat .num{ font-family:var(--font); font-size:1.9rem; font-weight:700; line-height:1; letter-spacing:-.03em; }
.stat .num small{ font-size:.95rem; color:var(--txt-2); font-weight:500; }
.stat .lbl{ color:var(--txt-2); font-size:.86rem; margin-top:6px; }

.ring-wrap{ display:flex; align-items:center; gap:20px; }
.ring{ --p:0; --c:var(--lime); width:116px; height:116px; border-radius:50%; flex-shrink:0; background:conic-gradient(var(--c) calc(var(--p)*1%), var(--surface-2) 0); display:grid; place-items:center; position:relative; transition:--p .5s; }
.ring::before{ content:''; position:absolute; inset:11px; border-radius:50%; background:var(--surface); }
.ring b{ position:relative; font-family:var(--font); font-size:1.65rem; font-weight:700; }
.ring b small{ font-size:.85rem; color:var(--txt-2); }

/* ============================================================
   TAKVİM (kırmızı = kaçırılmış)
   ============================================================ */
.daygrid{ display:flex; gap:7px; flex-wrap:wrap; }
.day{ width:38px; height:46px; border-radius:10px; border:1px solid var(--line); display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:.7rem; gap:2px; background:var(--surface-2); color:var(--txt-3); transition:transform .12s; }
.day:hover{ transform:translateY(-2px); }
.day b{ font-family:var(--font); font-size:.85rem; color:var(--txt); }
.day.full{ background:var(--lime); border-color:var(--lime); color:#0c0f14; }
.day.full b{ color:#0c0f14; }
.day.partial{ background:var(--amber-soft); border-color:rgba(255,176,32,.4); color:var(--amber); }
.day.partial b{ color:var(--amber); }
.day.missed{ background:var(--red-soft); border-color:rgba(255,77,79,.4); color:var(--red); }
.day.missed b{ color:var(--red); }
.day.empty{ opacity:.5; }
.day.today{ box-shadow:0 0 0 2px var(--lime); }
.day.sm{ width:32px; height:34px; }
.day.sm b{ font-size:.78rem; }
.legend{ display:flex; gap:14px; margin-top:14px; flex-wrap:wrap; font-size:.78rem; color:var(--txt-2); }
.legend span{ display:inline-flex; align-items:center; gap:6px; }
.dot{ width:11px; height:11px; border-radius:4px; display:inline-block; }
.dot.full{ background:var(--lime); } .dot.partial{ background:var(--amber); } .dot.missed{ background:var(--red); } .dot.empty{ background:var(--surface-3); }

/* ---------- Check-in ---------- */
.checkin{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.check-tile{ background:var(--surface-2); border:1px solid var(--line); border-radius:var(--radius-sm); padding:18px; cursor:pointer; transition:border-color .15s, background .15s; user-select:none; }
.check-tile:hover{ border-color:var(--surface-3); }
.check-tile.done{ background:var(--lime-glow); border-color:var(--lime-dim); }
.check-tile .ct-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.check-tile .ct-top i.lead{ font-size:1.5rem; color:var(--lime); }
.check-box{ width:26px; height:26px; border-radius:8px; border:2px solid var(--line); display:grid; place-items:center; color:transparent; transition:all .15s; }
.check-tile.done .check-box{ background:var(--lime); border-color:var(--lime); color:#0c0f14; }
.check-tile h4{ font-size:1rem; }
.check-tile p{ font-size:.82rem; color:var(--txt-2); margin-top:2px; }

/* ============================================================
   TABLO
   ============================================================ */
.table-wrap{ overflow-x:auto; border-radius:var(--radius); border:1px solid var(--line-soft); -webkit-overflow-scrolling:touch; }
table.data{ width:100%; border-collapse:collapse; font-size:.9rem; min-width:540px; }
table.data th{ text-align:left; padding:13px 16px; background:var(--bg-2); color:var(--txt-2); font-weight:600; font-size:.76rem; text-transform:uppercase; letter-spacing:.04em; border-bottom:1px solid var(--line-soft); }
table.data td{ padding:13px 16px; border-bottom:1px solid var(--line-soft); }
table.data tr:last-child td{ border-bottom:none; }
table.data tbody tr{ transition:background .12s; cursor:pointer; }
table.data tbody tr:hover{ background:var(--surface-2); }
.u-row{ display:flex; align-items:center; gap:11px; }
.u-row .avatar{ width:34px; height:34px; border-radius:9px; font-size:.82rem; }

.badge{ display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:20px; font-size:.76rem; font-weight:600; }
.badge.green{ background:var(--green-soft); color:var(--green); }
.badge.red{ background:var(--red-soft); color:var(--red); }
.badge.amber{ background:var(--amber-soft); color:var(--amber); }
.badge.lime{ background:var(--lime-glow); color:var(--lime); }
.badge.gray{ background:var(--surface-3); color:var(--txt-2); }
.pill-progress{ height:8px; background:var(--surface-3); border-radius:20px; overflow:hidden; min-width:70px; }
.pill-progress > span{ display:block; height:100%; background:var(--lime); border-radius:20px; transition:width .4s; }
.pill-progress.warn > span{ background:var(--amber); }
.pill-progress.danger > span{ background:var(--red); }

/* ---------- Program / Öğün ---------- */
.plan-day{ background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--radius); overflow:hidden; }
.plan-day-head{ padding:14px 18px; background:var(--bg-2); display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line-soft); }
.plan-day-head h4{ font-size:1rem; display:flex; align-items:center; gap:8px; }
.plan-day-head h4 .wd{ color:var(--lime); }
.ex-item{ padding:13px 18px; border-bottom:1px solid var(--line-soft); display:flex; align-items:center; gap:12px; }
.ex-item:last-child{ border-bottom:none; }
.ex-item .ex-name{ font-weight:600; font-size:.92rem; }
.ex-item .ex-meta{ font-size:.8rem; color:var(--txt-2); margin-left:auto; display:flex; gap:12px; align-items:center; }
.ex-item .ex-meta b{ color:var(--txt); font-family:var(--font); }
.meal-card{ background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--radius-sm); padding:16px 18px; }
.meal-card .mc-type{ font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--lime); margin-bottom:6px; }
.meal-card h4{ font-size:1rem; margin-bottom:5px; }
.meal-card p{ font-size:.86rem; color:var(--txt-2); white-space:pre-line; }
.macros{ display:flex; gap:12px; margin-top:11px; flex-wrap:wrap; }
.macro{ font-size:.74rem; color:var(--txt-2); }
.macro b{ font-family:var(--font); color:var(--txt); }

/* ---------- Başarım ---------- */
.badge-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.ach{ text-align:center; padding:18px; border:1px solid var(--line-soft); border-radius:var(--radius); background:var(--surface); }
.ach.off{ opacity:.4; }
.ach .ach-ico{ width:46px; height:46px; border-radius:13px; display:grid; place-items:center; font-size:1.4rem; margin:0 auto 11px; background:var(--lime-glow); color:var(--lime); }
.ach.off .ach-ico{ background:var(--surface-3); color:var(--txt-3); }
.ach b{ font-family:var(--font); display:block; font-size:.9rem; }
.ach span{ font-size:.76rem; color:var(--txt-2); }

/* ============================================================
   MODAL & MESAJ
   ============================================================ */
.modal-bg{ position:fixed; inset:0; background:rgba(6,9,13,.6); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); display:none; align-items:flex-start; justify-content:center; padding:40px 16px; z-index:150; overflow-y:auto; }
.modal-bg.open{ display:flex; animation:fadeIn .2s; }
.modal{ background:linear-gradient(160deg, rgba(31,39,51,.9), rgba(19,24,32,.95)); border:1px solid rgba(255,255,255,.1); border-radius:var(--radius); width:100%; max-width:560px; box-shadow:var(--shadow); animation:popUp .25s cubic-bezier(.2,.9,.3,1.2); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); }
.modal-head{ padding:20px 22px; border-bottom:1px solid var(--line-soft); display:flex; align-items:center; justify-content:space-between; }
.modal-head h3{ font-size:1.15rem; display:flex; align-items:center; gap:8px; }
.modal-body{ padding:22px; }
.modal-foot{ padding:16px 22px; border-top:1px solid var(--line-soft); display:flex; justify-content:flex-end; gap:10px; }
.x-close{ cursor:pointer; color:var(--txt-2); font-size:1.5rem; line-height:1; background:none; border:none; padding:4px; }
.x-close:hover{ color:var(--txt); }

.flash{ padding:12px 15px; border-radius:var(--radius-xs); margin-bottom:16px; font-size:.9rem; display:flex; align-items:center; gap:9px; }
.flash.ok{ background:var(--green-soft); color:var(--green); border:1px solid rgba(46,194,106,.3); }
.flash.err{ background:var(--red-soft); color:var(--red); border:1px solid rgba(255,77,79,.3); }

.empty-state{ text-align:center; padding:42px 20px; color:var(--txt-2); }
.empty-state i{ font-size:2.5rem; color:var(--txt-3); margin-bottom:12px; display:block; }
.empty-state h4{ color:var(--txt); margin-bottom:5px; }

/* Mesaj */
.thread{ display:flex; flex-direction:column; gap:11px; max-height:52vh; overflow-y:auto; padding-right:4px; -webkit-overflow-scrolling:touch; }
.bubble{ max-width:78%; padding:11px 15px; border-radius:14px; font-size:.92rem; }
.bubble .t{ font-size:.68rem; margin-top:4px; text-align:right; }
.bubble.mine{ align-self:flex-end; background:var(--lime); color:#0c0f14; border-bottom-right-radius:4px; }
.bubble.mine .t{ color:rgba(12,15,20,.55); }
.bubble.them{ align-self:flex-start; background:var(--surface-2); border:1px solid var(--line); border-bottom-left-radius:4px; }
.bubble.them .t{ color:var(--txt-3); }
.conv-item{ display:flex; gap:11px; align-items:center; padding:11px; border-radius:11px; cursor:pointer; }
.conv-item.active{ background:var(--lime-glow); }
.conv-item:hover{ background:var(--surface-2); }

/* ---------- Yardımcı ---------- */
.row-between{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.muted{ color:var(--txt-2); } .small{ font-size:.84rem; }
.mt-1{margin-top:10px}.mt-2{margin-top:18px}.mt-3{margin-top:26px}.mb-2{margin-bottom:18px}
.flex{ display:flex; } .gap{ gap:12px; } .wrap{ flex-wrap:wrap; } .center{ align-items:center; }
.text-lime{ color:var(--lime); } .text-red{ color:var(--red); }
.hide{ display:none !important; }
.color-pick{ display:flex; gap:9px; flex-wrap:wrap; }
.color-pick label{ cursor:pointer; }
.color-pick input{ display:none; }
.color-pick .cs{ display:inline-block; width:30px; height:30px; border-radius:9px; border:2px solid transparent; }
.fade-in{ animation:fadeIn .3s ease; }

/* ============================================================
   MOBİL — en üst seviye uyum
   ============================================================ */
@media (max-width:900px){
  .app{ grid-template-columns:1fr; }
  .sidebar{ position:fixed; left:0; top:0; z-index:120; width:260px; transform:translateX(-105%); transition:transform .25s ease; box-shadow:var(--shadow); }
  .sidebar.open{ transform:none; }
  .scrim{ position:fixed; inset:0; background:rgba(0,0,0,.55); backdrop-filter:blur(2px); z-index:110; display:none; }
  .scrim.show{ display:block; }

  /* Üst bar */
  .mobile-bar{ display:flex; align-items:center; justify-content:space-between; padding:13px 16px; padding-top:max(13px, env(safe-area-inset-top)); border-bottom:1px solid var(--line-soft); background:rgba(19,24,32,.85); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); position:sticky; top:0; z-index:90; }
  .mobile-bar .mb-brand{ display:flex; align-items:center; gap:9px; }
  .mobile-bar .mb-brand .brand-mark{ width:32px; height:32px; font-size:1.1rem; }
  .mobile-bar .mb-brand .brand-name{ font-size:1.05rem; }

  .content{ padding:18px 16px calc(86px + var(--safe-b)); }

  /* Alt tab bar */
  .tabbar{ display:flex; position:fixed; bottom:0; left:0; right:0; z-index:95; background:rgba(19,24,32,.9); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-top:1px solid var(--line-soft); padding:8px 6px calc(8px + var(--safe-b)); justify-content:space-around; }
  .tabbar a{ display:flex; flex-direction:column; align-items:center; gap:3px; padding:5px 10px; border-radius:11px; color:var(--txt-3); font-size:.66rem; font-weight:600; cursor:pointer; flex:1; max-width:80px; position:relative; }
  .tabbar a i{ font-size:1.4rem; }
  .tabbar a.active{ color:var(--lime); }
  .tabbar a .badge-count{ position:absolute; top:0; right:50%; transform:translateX(18px); background:var(--red); color:#fff; font-size:.6rem; font-weight:700; padding:0 5px; border-radius:20px; min-width:16px; text-align:center; }

  .g-4{ grid-template-columns:repeat(2,1fr); }
  .badge-grid{ grid-template-columns:repeat(2,1fr); }
}

@media (max-width:620px){
  .g-3,.g-2{ grid-template-columns:1fr; }
  .checkin{ grid-template-columns:1fr; }
  .ring-wrap{ flex-direction:row; }
  .landing-mid{ padding:24px 20px; }
  .landing-stats{ gap:22px; }
  .modal-bg{ padding:0; align-items:flex-end; }
  .modal{ max-width:100%; border-radius:22px 22px 0 0; max-height:92vh; overflow-y:auto; animation:slideUp .3s ease; }
  @keyframes slideUp{ from{ transform:translateY(100%) } to{ transform:none } }
  .modal-foot{ position:sticky; bottom:0; background:var(--surface); }
  .stat .num{ font-size:1.7rem; }
  .conv-grid{ grid-template-columns:1fr !important; }
}

@media (max-width:400px){
  .g-4{ grid-template-columns:1fr 1fr; }
  .day{ width:34px; height:42px; }
}

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; }
}
