/* Süt Takip: Apple'ın sade arayüz dilinden esinlenen ortak stil */
/* Yalnızca beyaz, siyah ve gri. Vurgu siyah; uyarılar renkle değil koyulukla ayrılır. */
:root {
  --vurgu: #1d1d1f;
  --vurgu-basili: #000000;
  --vurgu-acik: rgba(0, 0, 0, .06);
  --kirmizi: #1d1d1f;
  --kirmizi-acik: rgba(0, 0, 0, .06);
  --turuncu-acik: rgba(0, 0, 0, .06);
  --turuncu: #6e6e73;
  --mavi-acik: rgba(0, 0, 0, .06);
  --mavi: #3a3a3c;
  --zemin: #f5f5f7;
  --kart: #ffffff;
  --tus: #f2f2f7;
  --tus-basili: #d1d1d6;
  --yazi: #1c1c1e;
  --ikincil: #8e8e93;
  --ayrac: rgba(60, 60, 67, .14);
  --yaricap: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  background: var(--zemin); color: var(--yazi); font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--vurgu); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.gizli { display: none !important; }
.aciklama { color: var(--ikincil); font-size: 15px; }
.sayi, .t-ekran, .kart .deger { font-variant-numeric: tabular-nums; }

/* ---------- Ortak düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 12px; padding: 11px 18px; background: var(--vurgu); color: #fff;
  font-weight: 600; font-size: 15px; transition: background .15s;
}
.btn:hover { background: var(--vurgu-basili); }
.btn.ikincil { background: var(--vurgu-acik); color: var(--vurgu); }
.btn.ikincil:hover { background: rgba(0, 0, 0, .1); }
.btn.kucuk { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn.tehlike { background: var(--kirmizi-acik); color: var(--kirmizi); }

/* ---------- Giriş ---------- */
.giris-zemin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.giris-kutu { width: 100%; max-width: 360px; text-align: center; }
.giris-logo {
  width: 64px; height: 64px; border-radius: 16px; background: var(--vurgu); margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
}
.giris-kutu h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; }
.giris-kutu p { color: var(--ikincil); margin: 0 0 26px; }
.alan-grup { background: var(--kart); border-radius: 14px; overflow: hidden; text-align: left; }
.alan-grup input {
  width: 100%; border: 0; padding: 15px 16px; font-size: 17px; background: transparent; outline: none;
}
.alan-grup input + input { border-top: 1px solid var(--ayrac); }
.giris-kutu .btn { width: 100%; margin-top: 18px; padding: 15px; font-size: 17px; border-radius: 14px; }
.hata-kutu { color: var(--kirmizi); margin-top: 14px; font-size: 15px; }

/* ---------- Kooperatif ekranı ---------- */
.ust {
  position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--ayrac);
}
.ust-ic { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.marka { font-weight: 700; font-size: 17px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.marka i { width: 22px; height: 22px; border-radius: 6px; background: var(--vurgu); display: inline-block; }
.bolum-sec { display: flex; background: rgba(118,118,128,.12); border-radius: 10px; padding: 2px; margin: 0 auto; }
.bolum-sec a { color: var(--yazi); padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.bolum-sec a.secili { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.ust .cikis { color: var(--ikincil); font-size: 14px; }
.icerik { max-width: 1120px; margin: 0 auto; padding: 26px 20px 80px; }
.baslik-satir { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.icerik h1 { font-size: 32px; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.icerik h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 34px 0 10px; }
.alt-baslik { color: var(--ikincil); font-size: 15px; margin-top: 4px; }
.arac-cubugu { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.arac-cubugu input, .arac-cubugu select, .form-satir input, .form-satir select, textarea {
  padding: 9px 12px; border: 0; border-radius: 10px; background: var(--kart); outline: none;
  box-shadow: inset 0 0 0 1px var(--ayrac);
}
.arac-cubugu input:focus, .form-satir input:focus, textarea:focus { box-shadow: inset 0 0 0 2px var(--vurgu); }
.kartlar { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kart { background: var(--kart); border-radius: var(--yaricap); padding: 16px 18px; }
.kart .etiket { color: var(--ikincil); font-size: 13px; font-weight: 500; }
.kart .deger { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
.kart .deger small { font-size: 16px; color: var(--ikincil); font-weight: 500; margin-left: 2px; }
.grup { background: var(--kart); border-radius: var(--yaricap); overflow: hidden; }
.grup-kaydir { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 16px; text-align: left; white-space: nowrap; }
th { font-size: 12px; font-weight: 600; color: var(--ikincil); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--ayrac); }
td { border-bottom: 1px solid var(--ayrac); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafafc; }
td.sayi, th.sayi { text-align: right; }
tr.eski td { color: #b0b0b5; }
tr.eski td .ustu-cizili { text-decoration: line-through; }
tfoot td { font-weight: 700; border-top: 1px solid var(--ayrac); border-bottom: 0; }
.rozet { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--vurgu-acik); color: var(--vurgu); }
.rozet.turuncu { background: var(--turuncu-acik); color: var(--turuncu); }
.rozet.kirmizi { background: #1d1d1f; color: #fff; }
.rozet.gri { background: rgba(118,118,128,.12); color: var(--ikincil); }
.rozet.mavi { background: var(--mavi-acik); color: var(--mavi); }
.mesaj-kutu { background: var(--vurgu-acik); color: var(--vurgu-basili); padding: 12px 16px; border-radius: 14px; margin: 0 0 18px; font-weight: 500; }
.mesaj-kutu.hata { background: #fff; color: #1d1d1f; box-shadow: inset 0 0 0 1.5px #1d1d1f; }
.form-satir { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-satir label { display: flex; flex-direction: column; font-size: 13px; color: var(--ikincil); gap: 5px; font-weight: 500; }
textarea { width: 100%; min-height: 150px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; }
details.kutu { background: var(--kart); border-radius: var(--yaricap); padding: 16px 18px; margin-bottom: 14px; }
details.kutu summary { cursor: pointer; font-weight: 600; list-style: none; }
details.kutu summary::before { content: "+"; display: inline-block; width: 20px; color: var(--vurgu); font-weight: 700; }
details.kutu[open] summary::before { content: "\2212"; }
details.kutu > *:not(summary) { margin-top: 14px; }
.canli { display: inline-flex; align-items: center; gap: 6px; color: var(--ikincil); font-size: 13px; }
.canli::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1d1d1f; animation: nabiz 2s infinite; }
@keyframes nabiz { 50% { opacity: .25; } }
.bos { padding: 30px; text-align: center; color: var(--ikincil); }
.satir-duzelt { display: inline-flex; gap: 6px; }
.satir-duzelt input { width: 74px; padding: 5px 8px; border-radius: 8px; border: 0; box-shadow: inset 0 0 0 1px var(--ayrac); }

/* ---------- Araçtaki ekran ---------- */
body.topla { user-select: none; -webkit-user-select: none; overscroll-behavior: none; min-height: 100vh; }
.t-ust {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: rgba(242,242,247,.85); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.t-ust-link { background: none; border: 0; color: var(--vurgu); font-size: 17px; font-weight: 500; padding: 8px 6px; min-width: 70px; }
.t-ust-link:last-child { text-align: right; }
.t-ust .ilerleme { text-align: center; font-size: 13px; color: var(--ikincil); line-height: 1.25; }
.t-ust .ilerleme b { color: var(--yazi); font-size: 15px; font-weight: 600; }
.t-govde { padding: 4px 14px calc(24px + env(safe-area-inset-bottom)); max-width: 500px; margin: 0 auto; }
.t-bant { border-radius: 14px; padding: 11px 14px; margin-bottom: 10px; font-size: 15px; font-weight: 500; }
.t-bant.kuyruk { background: var(--mavi-acik); color: var(--mavi); }
.t-kart { background: var(--kart); border-radius: 24px; padding: 20px 16px 16px; }
.t-sira { color: var(--ikincil); font-size: 14px; font-weight: 500; text-align: center; }
.t-ad { font-size: 32px; font-weight: 700; letter-spacing: -.025em; line-height: 1.12; text-align: center; margin: 4px 0 0; word-break: break-word; }
.t-girildi { text-align: center; margin-top: 10px; }
.t-girildi span { display: inline-block; padding: 5px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; }
.t-girildi .iyi { background: var(--vurgu-acik); color: var(--vurgu); }
.t-girildi .kotu { background: #fff; color: #1d1d1f; box-shadow: inset 0 0 0 1.5px #1d1d1f; }
.t-girildi .diger { background: #fff; color: #6e6e73; box-shadow: inset 0 0 0 1.5px #c7c7cc; }
.t-ekran {
  display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 14px 0 12px;
  font-size: 72px; font-weight: 300; letter-spacing: -.03em; line-height: 1; min-height: 80px; color: var(--yazi);
}
.t-ekran.bos-deger { color: #c7c7cc; }
.t-ekran small { font-size: 24px; font-weight: 500; color: var(--ikincil); letter-spacing: 0; }
.t-tuslar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.t-tuslar button {
  height: 62px; border: 0; border-radius: 16px; background: var(--tus); font-size: 28px; font-weight: 400;
  touch-action: manipulation; transition: background .08s;
}
.t-tuslar button:active { background: var(--tus-basili); }
.t-tuslar button[data-sil] { font-size: 24px; color: var(--ikincil); }
.t-iki { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; margin-top: 10px; }
.t-alinmadi, .t-ileri {
  height: 64px; border: 0; border-radius: 16px; font-size: 18px; font-weight: 600; touch-action: manipulation; transition: background .1s;
}
.t-alinmadi { background: #e8e8ed; color: #1d1d1f; }
.t-alinmadi:active { background: #d2d2d7; }
.t-ileri { background: var(--vurgu); color: #fff; font-size: 20px; }
.t-ileri:active { background: var(--vurgu-basili); }
.t-ileri:disabled { background: #d2d2d7; }
.t-ileri.genis { width: 100%; margin-top: 10px; }
.t-sebepler { display: grid; gap: 8px; margin-top: 18px; }
.t-sebepler button { height: 64px; border: 0; border-radius: 16px; background: var(--tus); font-size: 20px; font-weight: 600; }
.t-sebepler button:active { background: var(--tus-basili); }
.t-kucuk-link { display: block; width: 100%; background: none; border: 0; color: var(--vurgu); font-size: 16px; font-weight: 500; padding: 14px; text-align: center; }
.t-sonuc { margin-top: 12px; padding: 14px; border-radius: 14px; font-weight: 600; text-align: center; }
.t-sonuc.iyi { background: var(--vurgu-acik); color: var(--vurgu-basili); }
.t-sonuc.kotu { background: #1d1d1f; color: #fff; }
.t-toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom));
  width: calc(100% - 28px); max-width: 470px; background: rgba(28,28,30,.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: #fff; border-radius: 16px;
  padding: 13px 14px 13px 18px; display: flex; align-items: center; gap: 10px; font-weight: 500; z-index: 20;
}
.t-toast.hata { background: #000; box-shadow: 0 0 0 1.5px rgba(255,255,255,.5) inset; }
.t-toast button { margin-left: auto; background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 10px; padding: 8px 14px; font-weight: 600; }
.t-liste { position: fixed; inset: 0; background: var(--zemin); z-index: 10; display: flex; flex-direction: column; }
.t-liste-ust { display: flex; gap: 8px; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 14px 8px; }
.t-liste-ust input {
  flex: 1; padding: 11px 14px; border-radius: 12px; border: 0; font-size: 17px; background: rgba(118,118,128,.12); outline: none;
}
.t-liste-ust button { background: none; border: 0; color: var(--vurgu); font-size: 17px; font-weight: 500; padding: 8px 4px; }
.t-vakit-satir { display: flex; align-items: center; gap: 10px; padding: 4px 14px 10px; color: var(--ikincil); font-size: 15px; }
.vakit-sec { display: flex; background: rgba(118,118,128,.12); border-radius: 10px; padding: 2px; flex: 1; }
.vakit-sec button { flex: 1; background: none; border: 0; padding: 8px; border-radius: 8px; font-weight: 500; font-size: 15px; }
.vakit-sec button.secili { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.t-liste-ic { overflow-y: auto; padding: 0 14px 10px; flex: 1; }
.t-liste-grup { background: var(--kart); border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.t-liste-grup-baslik { font-size: 13px; color: var(--ikincil); text-transform: uppercase; letter-spacing: .04em; padding: 10px 16px 6px; }
.t-satir { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-size: 17px; border-bottom: 1px solid var(--ayrac); }
.t-satir:last-child { border-bottom: 0; }
.t-satir:active { background: #e9e9ee; }
.t-satir .no { color: var(--ikincil); width: 34px; font-size: 15px; font-variant-numeric: tabular-nums; }
.t-satir .ad { flex: 1; font-weight: 500; }
.t-satir .durum { font-size: 15px; color: var(--ikincil); font-variant-numeric: tabular-nums; }
.t-satir .durum.iyi { color: var(--vurgu); font-weight: 600; }
.t-satir .durum.kotu { color: var(--ikincil); font-style: italic; }

/* ---------- Merkez ekranı (tablet) ---------- */
body.merkez { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.m-ust {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) 20px 10px; background: rgba(245,245,247,.85);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--ayrac);
}
.m-ust-sol { display: flex; align-items: center; gap: 16px; }
.m-baslik { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.m-ust-sol .vakit-sec { min-width: 180px; }
.m-ozet { text-align: center; line-height: 1.2; }
.m-ozet b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.m-ozet span { color: var(--ikincil); font-size: 13px; }
.m-ust-sag { display: flex; align-items: center; gap: 8px; }
.m-bant-kap { padding: 0 20px; }
.m-bant-kap .t-bant { margin: 10px 0 0; }
.m-govde { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; padding: 16px 20px 20px; }
.m-sol { display: flex; flex-direction: column; min-height: 0; }
.m-ara-kap { position: relative; }
.m-ara-ikon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ikincil); }
.m-ara-kap input {
  width: 100%; padding: 15px 44px 15px 42px; font-size: 19px; border: 0; border-radius: 14px;
  background: var(--kart); outline: none; box-shadow: inset 0 0 0 1px var(--ayrac);
}
.m-ara-kap input:focus { box-shadow: inset 0 0 0 2px var(--vurgu); }
.m-ara-kap input::-webkit-search-cancel-button { display: none; }
.m-ara-temizle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: #c7c7cc; color: #fff; font-size: 13px; }
.m-sekme { margin: 12px 0; flex: none; }
.m-sekme span { color: var(--ikincil); font-weight: 500; margin-left: 4px; font-variant-numeric: tabular-nums; }
.m-kutular { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-content: start; padding-bottom: 20px; }
.m-kutular.satirlar { display: block; background: var(--kart); border-radius: 16px; padding: 0; flex: none; max-height: 100%; }
.m-kutu {
  position: relative; text-align: left; border: 0; background: var(--kart); border-radius: 16px; padding: 14px 14px 12px;
  min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; touch-action: manipulation; transition: transform .08s, box-shadow .15s;
}
.m-kutu:active { transform: scale(.97); }
.m-kutu.secili { box-shadow: inset 0 0 0 2.5px var(--vurgu); }
.m-kutu.geldi { opacity: .55; }
.m-kutu-no { position: absolute; top: 12px; right: 14px; color: var(--ikincil); font-size: 13px; font-variant-numeric: tabular-nums; }
.m-kutu-ad { font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; padding-right: 26px; }
.m-kutu-alt { color: var(--ikincil); font-size: 14px; font-variant-numeric: tabular-nums; }
.m-liste-bos { grid-column: 1 / -1; text-align: center; color: var(--ikincil); padding: 40px; }
.m-saat { color: var(--ikincil); font-size: 14px; width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.m-sag { min-height: 0; overflow-y: auto; }
.m-sag .t-kart { position: relative; }
.m-bos { height: 100%; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #aeaeb2; text-align: center; background: var(--kart); border-radius: 24px; }
.m-bos p { color: var(--ikincil); font-size: 17px; margin: 12px 0 0; }
.m-kapat { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--tus); color: var(--ikincil); font-size: 14px; z-index: 2; }
.m-perde { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 15; display: flex; align-items: center; justify-content: center; padding: 20px; }
.m-sayfa { position: relative; width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto; }
#girisKapat { display: none; }

/* Telefon veya dar tablet: liste tam ekran, giriş paneli üstte açılır */
@media (max-width: 820px) {
  .m-ust { flex-wrap: wrap; padding-left: 14px; padding-right: 14px; }
  .m-ust-sol { width: 100%; justify-content: space-between; }
  .m-ozet { text-align: left; }
  .m-govde { grid-template-columns: 1fr; padding: 12px 14px; }
  .m-sag { position: fixed; inset: 0; z-index: 12; background: var(--zemin); padding: calc(14px + env(safe-area-inset-top)) 14px 14px; display: none; }
  .m-sag.acik { display: block; }
  .m-bos { display: none; }
  #girisKapat { display: block; }
  .m-kutular { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* Kurulum yardımı (giriş sayfası) */
.kur-kutu { margin-top: 22px; background: var(--kart); border-radius: 16px; padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; }
.kur-kutu > b { font-size: 16px; }
.kur-kutu > span { color: #3a3a3c; }
.giris-kutu .kur-kutu .btn { margin-top: 6px; padding: 12px; font-size: 16px; }
input[type=checkbox], input[type=radio] { accent-color: #1d1d1f; }
