:root {
  --zemin: #ffffff; --kutu: #ffffff; --yazi: #1d1d1f; --soluk: #86868b; --cizgi: #e5e5ea; --acik: #f5f5f7;
  --siyah: #0a0a0b; --koyu: #2c2c2e;
  --yesil-z: #e6f9ec; --yesil: #1a7d3a; --kirmizi-z: #ffebe9; --kirmizi: #d70015; --mavi-z: #eaf2ff; --mavi: #0066cc;
  --kose: 10px;
  --ust-bosluk: env(safe-area-inset-top, 0px); --alt-bosluk: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--zemin); color: var(--yazi); font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
       -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; font-size: 14px; line-height: 1.35;
       padding: calc(var(--ust-bosluk) + 86px) 16px calc(var(--alt-bosluk) + 92px); overscroll-behavior-y: none; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
[hidden] { display: none !important; }
svg { display: block; }

/* Ust serit */
.ust { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
       padding: calc(var(--ust-bosluk) + 12px) 16px 12px; background: rgba(255,255,255,0.9);
       -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); border-bottom: 1px solid var(--cizgi); }
.ust h1 { font-size: 20px; font-weight: 700; }
.ust .alt { font-size: 12.5px; color: var(--soluk); margin-top: 1px; }
.ust-dugme { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--cizgi); background: var(--kutu);
             display: flex; align-items: center; justify-content: center; position: relative; }
.ust-dugme svg { width: 19px; height: 19px; }
.ust-dugme.aktif { background: var(--siyah); border-color: var(--siyah); color: #fff; }

/* Alt menu (telefon) */
.altmenu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--siyah);
           padding: 8px 6px calc(var(--alt-bosluk) + 8px); }
.altmenu button { flex: 1; background: none; border: none; color: #8e8e93; display: flex; flex-direction: column; align-items: center;
                  gap: 4px; padding: 6px 0; font-size: 10.5px; font-weight: 600; border-radius: 9px; }
.altmenu button svg { width: 22px; height: 22px; }
.altmenu button.aktif { color: #fff; }

/* Sol menu (genis ekran) */
.yanmenu { display: none; }
@media (min-width: 900px) {
  body { padding: 84px 40px 56px 280px; }
  .altmenu { display: none; }
  .ust { left: 240px; padding: 16px 40px; }
  .ust-dugme { display: none; }
  .yanmenu { display: flex; flex-direction: column; gap: 4px; position: fixed; top: 0; left: 0; bottom: 0; width: 240px;
             background: var(--siyah); color: #f5f5f7; padding: 20px 14px; z-index: 30; }
  .yanmenu .logo { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; margin-bottom: 10px; border-bottom: 1px solid #1f1f22;
                   font-size: 15.5px; font-weight: 700; color: #fff; }
  .yanmenu .logo i { width: 30px; height: 30px; border-radius: 8px; background: #fff; color: #000; font-style: normal; font-weight: 700; font-size: 12.5px; letter-spacing: -0.02em;
                     display: flex; align-items: center; justify-content: center; }
  .yanmenu button { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 9px; color: #f2f2f4; background: none;
                    border: none; font-size: 14px; font-weight: 600; text-align: left; }
  .yanmenu button:hover { background: #1a1a1d; }
  .yanmenu button.aktif { background: #2a2a2e; color: #fff; }
  .yanmenu button svg { width: 18px; height: 18px; }
  .yanmenu form { margin-top: auto; }
  .yanmenu form button { width: 100%; color: #a1a1a6; font-size: 13px; }
  main { max-width: 1040px; }
  .izgara { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .izgara > .kutu { margin-bottom: 0; }
  .izgara .genis { grid-column: 1 / -1; }
}
main { max-width: 680px; margin: 0 auto; }
@media (min-width: 900px) { main { margin: 0; } }

/* Kutular */
.kutu { background: var(--kutu); border: 1px solid var(--cizgi); border-radius: var(--kose); padding: 16px; margin-bottom: 14px; }
.kutu-baslik { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.kutu-baslik h2 { font-size: 15px; font-weight: 700; }
.kutu-baslik .yan { font-size: 12.5px; color: var(--soluk); font-weight: 600; }
.bos { color: #a1a1a6; font-size: 13px; border: 1px dashed var(--cizgi); border-radius: var(--kose); padding: 18px; text-align: center; }
.not { font-size: 12.5px; color: var(--soluk); line-height: 1.45; }

/* Dugmeler */
.dugme { background: var(--siyah); color: #fff; border: 1px solid var(--siyah); border-radius: 9px; padding: 11px 16px; font-size: 14px;
         font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.dugme:active { transform: scale(0.98); background: var(--koyu); }
.dugme.ikincil { background: var(--kutu); color: var(--yazi); border-color: var(--cizgi); }
.dugme.ikincil:active { background: var(--acik); }
.dugme.tehlike { background: var(--kutu); color: var(--kirmizi); border-color: var(--cizgi); }
.dugme.kucuk { padding: 8px 12px; font-size: 13px; }
.dugme.tam { width: 100%; }
.dugme svg { width: 16px; height: 16px; }
.dugme-sira { display: flex; gap: 8px; flex-wrap: wrap; }
.dugme-sira .dugme { flex: 1; }
.simge-dugme { background: none; border: none; color: var(--soluk); padding: 8px; margin: -8px -6px -8px 0; border-radius: 8px; }
.simge-dugme svg { width: 17px; height: 17px; }

/* Sekmeler -- kalin alt cizgili */
.sekmeler { display: flex; gap: 22px; border-bottom: 1px solid var(--cizgi); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.sekmeler::-webkit-scrollbar { display: none; }
.sekmeler button { background: none; border: none; border-bottom: 3px solid transparent; padding: 10px 0; margin-bottom: -1px; font-size: 14px;
                   font-weight: 700; color: var(--soluk); white-space: nowrap; }
.sekmeler button.aktif { color: var(--yazi); border-bottom-color: var(--siyah); }

/* Gun secici */
.gun-sec { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.gun-sec .orta { text-align: center; }
.gun-sec .orta b { font-size: 15px; display: block; }
.gun-sec .orta button { background: none; border: none; color: var(--mavi); font-size: 12px; font-weight: 700; padding: 2px 6px; }
.gun-sec .ok { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--cizgi); background: var(--kutu);
               display: flex; align-items: center; justify-content: center; }
.gun-sec .ok svg { width: 17px; height: 17px; }
.gun-sec .ok:disabled { opacity: 0.3; }

/* Ilerleme cubuklari */
.olcu { margin-bottom: 14px; }
.olcu:last-child { margin-bottom: 0; }
.olcu-ust { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.olcu-ust .ad { font-size: 13px; font-weight: 700; }
.olcu-ust .deger { font-size: 13px; color: var(--soluk); }
.olcu-ust .deger b { color: var(--yazi); font-size: 15px; }
.cubuk { height: 8px; background: var(--acik); border-radius: 999px; overflow: hidden; }
.cubuk i { display: block; height: 100%; background: var(--siyah); border-radius: 999px; transition: width 0.25s ease; }
.cubuk.tamam i { background: var(--yesil); }

/* Satir listeleri */
.liste { margin: 0 -16px; }
.satir { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--cizgi); width: 100%; background: none;
         border-left: none; border-right: none; border-bottom: none; text-align: left; }
.liste .satir:first-child { border-top: none; }
.satir .govde { flex: 1; min-width: 0; }
.satir .ad { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.satir .ayrinti { font-size: 12.5px; color: var(--soluk); margin-top: 2px; }
.satir .sag { font-size: 13px; font-weight: 700; white-space: nowrap; }
.satir.yapildi .ad { color: var(--soluk); text-decoration: line-through; text-decoration-color: #c7c7cc; }
.isaret { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c7c7cc; flex-shrink: 0; display: flex; align-items: center;
          justify-content: center; color: transparent; }
.isaret svg { width: 14px; height: 14px; }
.yapildi .isaret { background: var(--siyah); border-color: var(--siyah); color: #fff; }
.grup-baslik { font-size: 11px; font-weight: 700; color: var(--soluk); text-transform: uppercase; letter-spacing: 0.05em; padding: 14px 16px 6px; }
.liste .grup-baslik:first-child { padding-top: 0; }
.cipler { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cip { border: 1px solid var(--cizgi); background: var(--kutu); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; }
.cip:active { background: var(--acik); }
.cip.secili { background: var(--siyah); border-color: var(--siyah); color: #fff; }

/* Ozet kutulari */
.ozetler { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ozet { border: 1px solid var(--cizgi); border-radius: var(--kose); padding: 12px; }
.ozet .sayi { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.ozet .sayi small { font-size: 12px; font-weight: 600; color: var(--soluk); margin-left: 2px; }
.ozet .etiket { font-size: 11.5px; color: var(--soluk); margin-top: 3px; }
.buyuk-sayi { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.buyuk-sayi small { font-size: 15px; color: var(--soluk); font-weight: 600; margin-left: 4px; letter-spacing: 0; }

/* Hafta noktalari ve gunluk cubuklar */
.hafta { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.hafta .gun { font-size: 11px; color: var(--soluk); font-weight: 700; }
.hafta .nokta { width: 30px; height: 30px; margin: 5px auto 0; border-radius: 50%; border: 1.5px solid var(--cizgi); display: flex;
                align-items: center; justify-content: center; color: transparent; }
.hafta .nokta svg { width: 14px; height: 14px; }
.hafta .dolu .nokta { background: var(--siyah); border-color: var(--siyah); color: #fff; }
.hafta .bugun .gun { color: var(--yazi); }
.hafta .bugun .nokta { border-color: var(--siyah); }
.sutunlar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 110px; }
.sutunlar .s { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.sutunlar .s i { display: block; background: var(--siyah); border-radius: 4px 4px 0 0; min-height: 2px; }
.sutunlar .s.eksik i { background: #c7c7cc; }
.sutun-ad { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; text-align: center; font-size: 11px; color: var(--soluk);
            font-weight: 700; margin-top: 6px; }
.grafik { width: 100%; height: auto; }

/* Tablo */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; padding: 10px 0; font-size: 13px; border-bottom: 1px solid var(--cizgi); }
th:first-child, td:first-child { text-align: left; }
th { font-size: 10.5px; color: var(--soluk); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; padding-top: 0; }
tr:last-child td { border-bottom: none; }

/* Form */
.alan { display: block; margin-bottom: 12px; }
.alan > span { display: block; font-size: 12px; font-weight: 700; color: var(--soluk); margin-bottom: 5px; }
.alan input, .alan select { width: 100%; border: 1px solid var(--cizgi); border-radius: 9px; padding: 11px 12px; font-size: 16px;
                            background: var(--kutu); -webkit-appearance: none; appearance: none; min-height: 46px; }
.alan input:focus, .alan select:focus { outline: none; border-color: var(--siyah); }
.alanlar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.alanlar.iki { grid-template-columns: repeat(2, 1fr); }
.anahtar { position: relative; width: 46px; height: 28px; flex-shrink: 0; border: none; border-radius: 999px; background: #d1d1d6; padding: 0; }
.anahtar::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
                  transition: transform 0.15s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.anahtar.acik { background: var(--siyah); }
.anahtar.acik::after { transform: translateX(18px); }
.rozet { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.rozet.yesil { background: var(--yesil-z); color: var(--yesil); }
.rozet.gri { background: var(--acik); color: #6e6e73; }
.rozet.kirmizi { background: var(--kirmizi-z); color: var(--kirmizi); }

/* Cekmece (alttan acilan form) */
.perde { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.4); display: flex; align-items: flex-end; justify-content: center; }
.cekmece { background: var(--kutu); width: 100%; max-width: 520px; border-radius: 16px 16px 0 0; padding: 18px 16px calc(var(--alt-bosluk) + 18px);
           max-height: 88vh; overflow-y: auto; }
.cekmece-baslik { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cekmece-baslik h2 { font-size: 17px; font-weight: 700; }
@media (min-width: 900px) { .perde { align-items: center; } .cekmece { border-radius: 14px; padding-bottom: 18px; } }

.bildiri { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--alt-bosluk) + 96px); z-index: 60; background: var(--siyah);
           color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; max-width: 90vw; text-align: center; }
.bildiri.hata { background: var(--kirmizi); }

/* Giris */
.giris-govde { padding: 0 20px; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; }
.giris-kutu { width: 100%; max-width: 340px; border: 1px solid var(--cizgi); border-radius: var(--kose); padding: 26px 22px; text-align: center; }
.giris-kutu h1 { font-size: 20px; margin: 12px 0 22px; }
.giris-kutu .alan { text-align: left; }
.giris-amblem { width: 52px; height: 52px; border-radius: 13px; background: var(--siyah); color: #fff; font-size: 21px; letter-spacing: -0.02em; font-weight: 700;
                display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.giris-hata { background: var(--kirmizi-z); color: var(--kirmizi); border-radius: 9px; padding: 10px 12px; font-size: 13px; font-weight: 600;
              margin-bottom: 12px; text-align: left; }

.cikis-mobil { margin-top: 6px; }
@media (min-width: 900px) { .cikis-mobil { display: none; } }

/* 11 Kasim 2026: ust alan (logo + tamamlanan + profil), hafta seridi, kalori ve makro kutulari */
.ust-sol, .ust-sag { display: flex; align-items: center; gap: 10px; }
.ust-logo { width: 38px; height: 38px; border-radius: 10px; border: none; background: var(--siyah); color: #fff; font-size: 14.5px; font-weight: 700;
            letter-spacing: -0.02em; flex-shrink: 0; }
.ust-hap { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--cizgi); border-radius: 999px;
           font-size: 14px; font-weight: 700; white-space: nowrap; }
.ust-hap i { width: 20px; height: 20px; border-radius: 50%; background: #c7c7cc; color: #fff; display: flex; align-items: center; justify-content: center; }
.ust-hap i.tamam { background: var(--yesil); }
.ust-hap i svg { width: 12px; height: 12px; stroke-width: 3; }
@media (min-width: 900px) { .ust-logo { display: none; } }

.serit { display: flex; align-items: stretch; gap: 2px; margin-bottom: 14px; }
.serit-gun { flex: 1; min-width: 0; background: none; border: 1px solid transparent; border-radius: var(--kose); padding: 8px 0 7px; display: flex;
             flex-direction: column; align-items: center; gap: 3px; color: var(--soluk); }
.serit-gun span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.serit-gun b { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.serit-gun i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.serit-gun.bugun i { background: var(--siyah); }
.serit-gun.secili { border-color: var(--cizgi); color: var(--yazi); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.serit-gun:disabled { opacity: 0.4; }
.serit-ok { width: 24px; flex-shrink: 0; background: none; border: none; color: var(--soluk); padding: 0; display: flex; align-items: center; justify-content: center; }
.serit-ok svg { width: 16px; height: 16px; }
.serit-ok:disabled { opacity: 0.25; }

.halka { position: relative; flex-shrink: 0; }
.halka svg { width: 100%; height: 100%; }
.halka span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #c7c7cc; }
.halka span svg { width: 26px; height: 26px; }
.kalori-kutu { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; }
.kalori-ust { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.kalori-ust svg { width: 17px; height: 17px; }
.kalori-sayi { font-size: 46px; font-weight: 700; letter-spacing: -0.035em; line-height: 1; margin: 16px 0 6px; }
.kalori-etiket { background: none; border: none; padding: 2px 0; margin-bottom: 2px; font-size: 14px; font-weight: 600; color: #6e6e73; display: inline-flex;
                 align-items: center; gap: 5px; }
.kalori-etiket svg { width: 15px; height: 15px; }
.makrolar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.makro { border: 1px solid var(--cizgi); border-radius: var(--kose); padding: 12px; min-width: 0; }
.makro .sayi { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.makro .sayi small { font-size: 11px; font-weight: 600; color: var(--soluk); margin-left: 3px; letter-spacing: 0; }
.makro .etiket { font-size: 11.5px; color: var(--soluk); font-weight: 600; margin: 2px 0 10px; }
