/* =====================================================================
   Usra — tablet öncelikli arayüz
   Renkler tek yerden (CSS değişkenleri), açık/koyu tema destekli.
   ===================================================================== */

/* Palet logodan türetildi: mor + turkuaz, koyu uzay zemini.
   --ana        = turkuaz (birincil eylem)
   --vurgu      = mor (ikincil)
   --ana-yazi   = --ana üzerine yazılan metnin rengi (koyu temada turkuaz
                  parlak olduğu için beyaz okunmaz; koyu yazı gerekir) */

:root {
  --bg:        #f5f2fb;
  --bg2:       #e9e3f6;
  --yuzey:     #ffffff;
  --yuzey2:    #f3eefc;
  --kenar:     #e1d7f2;
  --metin:     #221436;
  --metin2:    #6d5f8a;
  --ana:       #0b7280;   /* açık temada turkuazın koyusu — beyaz yazı okunsun */
  --ana-yazi:  #ffffff;
  --ana-yumusak:#d6f2f6;
  --vurgu:     #7c3aed;
  --yesil:     #0d7c5c;
  --kirmizi:   #d1434f;
  --sari:      #cf8f22;
  --golge:     0 2px 10px rgba(45, 20, 70, .08);
  --golge-buyuk: 0 12px 40px rgba(45, 20, 70, .20);
  --r:         16px;
  --r-kucuk:   10px;
  --gecis:     .16s ease;
}

[data-tema="koyu"] {
  --bg:        #100a1d;
  --bg2:       #180f2b;
  --yuzey:     #1d1333;
  --yuzey2:    #271a44;
  --kenar:     #3a2760;
  --metin:     #ece5f9;
  --metin2:    #a294c2;
  --ana:       #35d6e2;
  --ana-yazi:  #06222a;
  --ana-yumusak:#123540;
  --vurgu:     #b07cff;
  --yesil:     #3ddba8;
  --kirmizi:   #ff6d84;
  --sari:      #f2ba5e;
  --golge:     0 2px 10px rgba(0, 0, 0, .40);
  --golge-buyuk: 0 12px 40px rgba(0, 0, 0, .60);
}

@media (prefers-color-scheme: dark) {
  [data-tema="sistem"] {
    --bg: #100a1d; --bg2: #180f2b; --yuzey: #1d1333; --yuzey2: #271a44;
    --kenar: #3a2760; --metin: #ece5f9; --metin2: #a294c2;
    --ana: #35d6e2; --ana-yazi: #06222a; --ana-yumusak: #123540; --vurgu: #b07cff;
    --yesil: #3ddba8; --kirmizi: #ff6d84; --sari: #f2ba5e;
    --golge: 0 2px 10px rgba(0,0,0,.40); --golge-buyuk: 0 12px 40px rgba(0,0,0,.60);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--metin);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 16px; line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

/* =====================  KABUK  ===================== */

#kabuk { display: flex; flex-direction: column; min-height: 100dvh; }

#ust {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--bg);                                   /* eski Safari yedeği */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);                     /* Safari 18 öncesi */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--kenar);
}
.marka { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.marka-logo {
  width: 30px; height: 30px; display: block; object-fit: contain;
  filter: drop-shadow(0 2px 8px color-mix(in srgb, var(--ana) 40%, transparent));
}
.ust-sag { margin-left: auto; display: flex; align-items: center; gap: 8px; }

#icerik {
  flex: 1; width: 100%; max-width: 1100px; margin: 0 auto;
  padding: 16px 16px calc(96px + env(safe-area-inset-bottom));
}

.sayfa { position: relative; display: flex; flex-direction: column; gap: 18px; }

/* alt menü (tablet dikey / telefon) */
#menu {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: var(--yuzey);                                /* eski Safari yedeği */
  background: color-mix(in srgb, var(--yuzey) 92%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--kenar);
}
.menu-oge {
  flex: 1; min-width: 0; min-height: 54px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 4px 2px; border-radius: var(--r-kucuk);
  color: var(--metin2); transition: var(--gecis);
}
.menu-ikon { font-size: 1.25rem; line-height: 1; }
.menu-ad { font-size: .68rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.menu-oge--aktif { color: var(--ana); background: var(--ana-yumusak); }
.menu-oge:active { transform: scale(.94); }

/* geniş ekran → sol menü */
@media (min-width: 820px) {
  #kabuk { display: grid; grid-template-columns: 210px 1fr; grid-template-rows: auto 1fr; min-height: 100dvh; }
  #ust { grid-column: 1 / -1; grid-row: 1; }

  /* DOM sırası: ust → icerik → menu. Sütunları açıkça ver, yoksa içerik dar
     sütuna, menü geniş sütuna düşer. */
  #menu {
    grid-column: 1; grid-row: 2;
    position: sticky; top: 64px; align-self: start; bottom: auto;
    flex-direction: column; justify-content: flex-start; gap: 4px;
    max-height: calc(100dvh - 64px); overflow-y: auto; padding: 12px;
    border-top: none; border-right: 1px solid var(--kenar); background: transparent;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .menu-oge { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; }
  .menu-ikon { font-size: 1.15rem; }
  .menu-ad { font-size: .95rem; }

  #icerik { grid-column: 2; grid-row: 2; padding-bottom: 40px; }
}

/* =====================  ORTAK BİLEŞENLER  ===================== */

.kart {
  background: var(--yuzey); border: 1px solid var(--kenar);
  border-radius: var(--r); padding: 16px; box-shadow: var(--golge);
}

.bolum { display: flex; flex-direction: column; gap: 10px; }
.bolum-baslik {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--metin2);
}
.bolum-baslik .sayi {
  background: var(--yuzey2); border: 1px solid var(--kenar);
  border-radius: 99px; padding: 1px 8px; font-size: .75rem; letter-spacing: 0;
}
.bolum-baslik.vurgu { color: var(--ana); }
.bolum-baslik.kirmizi { color: var(--kirmizi); }
.bolum-baslik.soluk { opacity: .6; }
.bolum-baslik > .btn { margin-left: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 18px; border: 1px solid transparent;
  border-radius: 99px; font-weight: 600; background: var(--yuzey2); color: var(--metin);
  transition: var(--gecis);
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn--ana { background: var(--ana); color: var(--ana-yazi); box-shadow: 0 4px 14px color-mix(in srgb, var(--ana) 35%, transparent); }
.btn--sade { background: var(--yuzey2); border-color: var(--kenar); }
.btn--tehlike {
  background: transparent; color: var(--kirmizi);
  border-color: var(--kirmizi);                            /* eski Safari yedeği */
  border-color: color-mix(in srgb, var(--kirmizi) 40%, transparent);
}
.btn--bag { background: none; color: var(--metin2); min-height: 40px; font-weight: 500; }
.btn--soluk { opacity: .6; font-size: .85rem; }
.btn--genis { width: 100%; }
.btn--kucuk { min-height: 34px; padding: 0 12px; font-size: .8rem; }

.yuvarlak-btn {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  border: 1px solid var(--kenar); border-radius: 50%;
  background: var(--yuzey); font-size: 1.05rem; transition: var(--gecis);
}
.yuvarlak-btn:active { transform: scale(.9); }
.yuvarlak-btn--aktif { background: var(--ana-yumusak); border-color: var(--ana); }
.yuvarlak-btn--avatar { padding: 0; overflow: hidden; border: none; }
.yuvarlak-btn--avatar .avatar { width: 100%; height: 100%; flex: 1 0 100%; font-size: 1.05rem; }

.fab {
  position: fixed; right: 20px; z-index: 35;
  bottom: calc(78px + env(safe-area-inset-bottom));
  width: 60px; height: 60px; border: none; border-radius: 50%;
  background: var(--ana); color: var(--ana-yazi); font-size: 2rem; line-height: 1;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ana) 45%, transparent);
  transition: var(--gecis);
}
.fab:active { transform: scale(.9); }
@media (min-width: 820px) { .fab { bottom: 28px; right: 28px; } }

.girdi {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--yuzey); border: 1.5px solid var(--kenar);
  border-radius: var(--r-kucuk); outline: none; transition: var(--gecis);
}
.girdi:focus { border-color: var(--ana); box-shadow: 0 0 0 3px var(--ana-yumusak); }
textarea.girdi { resize: vertical; line-height: 1.5; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form-satir { display: flex; flex-direction: column; gap: 5px; }
.form-etiket { font-size: .78rem; font-weight: 700; color: var(--metin2); text-transform: uppercase; letter-spacing: .04em; }
.form-satir--onay { flex-direction: row; align-items: center; gap: 10px; padding: 8px 2px; }
.onay { width: 22px; height: 22px; accent-color: var(--ana); }

.avatar {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center; border-radius: 50%; overflow: hidden;
  color: #fff; font-size: .8rem; font-weight: 700; user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--mini  { width: 20px; height: 20px; flex: 0 0 20px; font-size: .6rem; }
.avatar--orta  { width: 46px; height: 46px; flex: 0 0 46px; font-size: 1.2rem; }
.avatar--buyuk { width: 88px; height: 88px; flex: 0 0 88px; font-size: 2.2rem; }

.foto-satir { display: flex; align-items: center; gap: 14px; }
.foto-butonlar { display: flex; flex-direction: column; gap: 6px; }
.rozet {
  padding: 2px 9px; border-radius: 99px; background: var(--yuzey2);
  border: 1px solid var(--kenar); font-size: .72rem; font-weight: 600; color: var(--metin2);
  white-space: nowrap;
}
.rozet--ikimiz { background: var(--ana-yumusak); color: var(--ana); border-color: transparent; }
.rozet--tekrar {
  background: color-mix(in srgb, var(--vurgu) 16%, transparent);
  color: var(--vurgu); border-color: transparent;
}

.nokta { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 8px; }
.nokta--yuksek { background: var(--kirmizi); }

.ipucu { color: var(--metin2); font-size: .88rem; }
.ipucu--kucuk { font-size: .78rem; line-height: 1.5; }
.uyari {
  padding: 10px 14px; border-radius: var(--r-kucuk);
  background: var(--yuzey2);                               /* eski Safari yedeği */
  background: color-mix(in srgb, var(--kirmizi) 12%, transparent);
  color: var(--kirmizi); font-size: .88rem; font-weight: 600;
}
.uyari--kucuk { font-size: .82rem; }
.uyari-notu { padding: 12px 14px; background: var(--yuzey2); border-radius: var(--r-kucuk); }
.kirp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bosluk { flex: 1; }
.arti { color: var(--yesil); }
.eksi { color: var(--kirmizi); }

.bos { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; text-align: center; }
.bos-ikon { font-size: 3rem; }
.bos-baslik { font-weight: 700; font-size: 1.05rem; }
.bos-alt { color: var(--metin2); font-size: .9rem; max-width: 30ch; }

.yukleniyor { display: grid; place-items: center; padding: 60px; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--kenar); border-top-color: var(--ana);
  animation: don .8s linear infinite; margin: auto;
}
@keyframes don { to { transform: rotate(360deg); } }

/* =====================  PENCERELER  ===================== */

.katman {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 10, 20, .5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: bel .15s ease;
}
@media (min-width: 700px) { .katman { align-items: center; } }
@keyframes bel { from { opacity: 0; } }

.pencere {
  width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto;
  padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: var(--yuzey); border-radius: var(--r) var(--r) 0 0;
  box-shadow: var(--golge-buyuk); animation: yuksel .2s ease;
}
@media (min-width: 700px) { .pencere { border-radius: var(--r); } }
@keyframes yuksel { from { transform: translateY(24px); opacity: 0; } }
.pencere--dar { max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.pencere-baslik { font-size: 1.15rem; font-weight: 700; margin-bottom: 14px; }
.pencere-butonlar { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.onay-metin { font-size: 1rem; line-height: 1.5; }
.hesap-ust { display: flex; align-items: center; gap: 12px; padding-bottom: 6px; }

/* tam ekran editör (notlar) */
.katman--tam { align-items: stretch; }
.ed-pencere {
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 760px; margin: auto; padding: 14px;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  background: var(--yuzey); overflow-y: auto;
}
@media (min-width: 700px) { .ed-pencere { max-height: 92dvh; border-radius: var(--r); } }
.ed-ust { display: flex; align-items: center; gap: 8px; }
.ed-baslik {
  width: 100%; padding: 6px 2px; border: none; background: none; outline: none;
  font-size: 1.35rem; font-weight: 700;
}
.ed-icerik {
  width: 100%; flex: 1; min-height: 40dvh; padding: 6px 2px;
  border: none; background: none; outline: none; resize: none;
  font-size: 1.02rem; line-height: 1.6;
}
.ed-gorseller { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ed-gorsel { position: relative; aspect-ratio: 1; border-radius: var(--r-kucuk); overflow: hidden; background: var(--yuzey2); }
.ed-gorsel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-gorsel-sil {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 1.1rem; line-height: 1;
}
.ed-alt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--kenar); }
.renk-secici { display: flex; gap: 8px; }
.renk-nokta { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--kenar); }
.renk-nokta--secili { border-color: var(--metin); transform: scale(1.12); }

/* =====================  TOAST  ===================== */

#toastlar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 200;
  bottom: calc(92px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  padding: 11px 18px; border-radius: 18px; max-width: min(88vw, 460px);
  background: var(--metin); color: var(--bg); font-size: .88rem; font-weight: 600;
  line-height: 1.4; text-align: center; word-break: break-word; cursor: pointer;
  box-shadow: var(--golge-buyuk); animation: yuksel .2s ease; transition: opacity .35s, transform .35s;
}
.toast--hata { background: var(--kirmizi); color: #fff; }
.toast--cik { opacity: 0; transform: translateY(10px); }

/* =====================  GİRİŞ / KURULUM  ===================== */

.giris-sayfa { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.kart--giris { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; padding: 28px 24px; }

/* .logo hem <img> (asıl logo) hem <div>+emoji (hata ekranları) olabilir */
.logo {
  width: 96px; height: 96px; margin: 0 auto 4px;
  font-size: 3rem; line-height: 96px; text-align: center;
  filter: drop-shadow(0 6px 22px color-mix(in srgb, var(--vurgu) 45%, transparent));
}
img.logo { display: block; object-fit: contain; }
.giris-baslik { text-align: center; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.giris-alt { text-align: center; color: var(--metin2); font-size: .92rem; margin-bottom: 6px; }

/* =====================  GÖREVLER  ===================== */

.sekme-cubugu { display: flex; gap: 6px; padding: 5px; background: var(--yuzey2); border-radius: 99px; }
.sekme { flex: 1; min-height: 42px; border: none; border-radius: 99px; background: none; font-weight: 600; color: var(--metin2); transition: var(--gecis); }
.sekme--aktif { background: var(--yuzey); color: var(--metin); box-shadow: var(--golge); }

.gorev-liste, .oge-liste, .varlik-liste { display: flex; flex-direction: column; gap: 8px; }

.gorev {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--yuzey); border: 1px solid var(--kenar); border-radius: var(--r-kucuk);
  transition: var(--gecis);
}
.gorev--mini { padding: 10px 12px; }
.gorev--gecikmis {
  border-color: var(--kirmizi);                            /* eski Safari yedeği */
  border-color: color-mix(in srgb, var(--kirmizi) 45%, transparent);
}
.gorev--bitti { opacity: .5; }
.gorev--bitti .gorev-baslik { text-decoration: line-through; }
.gorev-orta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gorev-baslik { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.gorev-alt { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--metin2); min-width: 0; }
.gorev-alt > .kirp { max-width: 18ch; }

.kutucuk {
  width: 28px; height: 28px; flex: 0 0 28px;
  display: grid; place-items: center;
  border: 2px solid var(--kenar); border-radius: 9px;
  background: none; color: var(--ana-yazi); font-size: .9rem; font-weight: 700; transition: var(--gecis);
}
.kutucuk--dolu { background: var(--ana); border-color: var(--ana); }
.kutucuk:active { transform: scale(.85); }

/* takvim */
.tk-ust { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tk-ay { font-size: 1.1rem; font-weight: 700; }
.tk-hafta { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: .72rem; font-weight: 700; color: var(--metin2); }
.tk-izgara { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tk-gun {
  position: relative; aspect-ratio: 1; min-height: 42px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1px solid transparent; border-radius: var(--r-kucuk);
  background: var(--yuzey); font-weight: 600; transition: var(--gecis);
}
.tk-gun--bos { background: none; }
.tk-gun--bugun { border-color: var(--ana); color: var(--ana); }
.tk-gun--secili { background: var(--ana); color: var(--ana-yazi); border-color: var(--ana); }
.tk-nokta { width: 5px; height: 5px; border-radius: 50%; background: var(--ana); }
.tk-gun--secili .tk-nokta { background: #fff; }
.tk-nokta--bitti { background: var(--metin2); }

/* =====================  LİSTELER  ===================== */

.cip-seridi { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.cip-seridi--sarmal { flex-wrap: wrap; overflow: visible; }
.cip {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  min-height: 42px; padding: 0 16px; border-radius: 99px;
  background: var(--yuzey); border: 1.5px solid var(--kenar); font-weight: 600; white-space: nowrap;
  transition: var(--gecis);
}
.cip--aktif { background: var(--ana); border-color: var(--ana); color: var(--ana-yazi); }
.cip--ekle { border-style: dashed; color: var(--metin2); }
.cip-sayi { min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--ana-yumusak); color: var(--ana); font-size: .75rem; text-align: center; }
.cip--aktif .cip-sayi { background: rgba(0,0,0,.18); color: inherit; }

.hizli-satir { display: flex; gap: 8px; }
.hizli-girdi { flex: 1; }

.sik-kutu { display: flex; flex-direction: column; gap: 7px; }
.sik-baslik { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--metin2); }
.cip--sik {
  min-height: 38px; padding: 0 13px; font-size: .85rem; font-weight: 600;
  background: var(--yuzey2); border-style: dashed; color: var(--metin2);
}
.cip--sik span:first-child { color: var(--ana); font-weight: 800; }

.oge {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--yuzey); border: 1px solid var(--kenar); border-radius: var(--r-kucuk);
}
.oge--alindi { opacity: .5; }
.oge--alindi .oge-metin { text-decoration: line-through; }
.oge-orta { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.oge-metin { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* =====================  NOTLAR  ===================== */

.not-izgara { columns: 2 160px; column-gap: 10px; }
@media (min-width: 700px) { .not-izgara { columns: 3 200px; } }
@media (min-width: 1000px) { .not-izgara { columns: 4 210px; } }

.not {
  position: relative; break-inside: avoid; display: flex; flex-direction: column; gap: 7px;
  margin-bottom: 10px; padding: 14px; border-radius: var(--r);
  border: 1px solid var(--kenar); box-shadow: var(--golge); transition: var(--gecis);
}
.not:active { transform: scale(.98); }
.not-pin { position: absolute; top: 8px; right: 10px; font-size: .8rem; }
.not-baslik { font-size: 1rem; font-weight: 700; }
.not-icerik { font-size: .88rem; line-height: 1.5; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 8; line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.not-alt { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.not-gorsel { border-radius: var(--r-kucuk); overflow: hidden; background: var(--yuzey2); }
.not-gorsel img { width: 100%; display: block; }

.not-sari,  .renk-sari  { background: #fff3c9; color: #4a3c10; }
.not-pembe, .renk-pembe { background: #ffdfe9; color: #52212f; }
.not-mavi,  .renk-mavi  { background: #d7ecff; color: #12354f; }
.not-yesil, .renk-yesil { background: #d8f4de; color: #17402a; }
.not-mor,   .renk-mor   { background: #e8dcff; color: #2f2154; }
.not-gri,   .renk-gri   { background: #e8e6ea; color: #2e2b31; }

[data-tema="koyu"] .not-sari,  [data-tema="koyu"] .renk-sari  { background: #4a3d15; color: #ffeeb8; }
[data-tema="koyu"] .not-pembe, [data-tema="koyu"] .renk-pembe { background: #4d2233; color: #ffd7e5; }
[data-tema="koyu"] .not-mavi,  [data-tema="koyu"] .renk-mavi  { background: #17364d; color: #cfe8ff; }
[data-tema="koyu"] .not-yesil, [data-tema="koyu"] .renk-yesil { background: #1b3f2c; color: #cdf1d9; }
[data-tema="koyu"] .not-mor,   [data-tema="koyu"] .renk-mor   { background: #322451; color: #e0d3ff; }
[data-tema="koyu"] .not-gri,   [data-tema="koyu"] .renk-gri   { background: #33303a; color: #e6e2ea; }
@media (prefers-color-scheme: dark) {
  [data-tema="sistem"] .not-sari,  [data-tema="sistem"] .renk-sari  { background: #4a3d15; color: #ffeeb8; }
  [data-tema="sistem"] .not-pembe, [data-tema="sistem"] .renk-pembe { background: #4d2233; color: #ffd7e5; }
  [data-tema="sistem"] .not-mavi,  [data-tema="sistem"] .renk-mavi  { background: #17364d; color: #cfe8ff; }
  [data-tema="sistem"] .not-yesil, [data-tema="sistem"] .renk-yesil { background: #1b3f2c; color: #cdf1d9; }
  [data-tema="sistem"] .not-mor,   [data-tema="sistem"] .renk-mor   { background: #322451; color: #e0d3ff; }
  [data-tema="sistem"] .not-gri,   [data-tema="sistem"] .renk-gri   { background: #33303a; color: #e6e2ea; }
}
.ed-pencere.not-sari, .ed-pencere.not-pembe, .ed-pencere.not-mavi,
.ed-pencere.not-yesil, .ed-pencere.not-mor, .ed-pencere.not-gri { border: none; }

/* =====================  BÜTÇE  ===================== */

.ozet-izgara { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ozet-izgara--mini { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.ozet-kutu {
  display: flex; flex-direction: column; gap: 2px; padding: 14px;
  background: var(--yuzey); border: 1px solid var(--kenar); border-radius: var(--r); box-shadow: var(--golge);
}
.ozet-etiket { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--metin2); }
.ozet-deger { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.ozet-alt { font-size: .78rem; font-weight: 600; }
.ozet-kutu--gelir .ozet-deger, .ozet-kutu--arti .ozet-deger { color: var(--yesil); }
.ozet-kutu--gider .ozet-deger, .ozet-kutu--eksi .ozet-deger { color: var(--kirmizi); }

.kart--denklestirme { display: flex; flex-direction: column; gap: 10px; }
.denk-satirlar { display: flex; flex-direction: column; gap: 8px; }
.denk-satir { display: flex; align-items: center; gap: 10px; }
.denk-ad { font-weight: 600; }
.denk-fark { margin-left: auto; font-weight: 700; }
.denk-sonuc {
  padding: 12px 14px; border-radius: var(--r-kucuk);
  background: var(--ana-yumusak); color: var(--ana); font-weight: 600;
}
.denk-sonuc--esit {
  background: var(--yuzey2);                               /* eski Safari yedeği */
  background: color-mix(in srgb, var(--yesil) 14%, transparent);
  color: var(--yesil);
}

.cubuklar { display: flex; flex-direction: column; gap: 8px; }
.cubuk-satir { display: grid; grid-template-columns: minmax(90px, 1.1fr) 2fr auto; align-items: center; gap: 10px; font-size: .85rem; }
.cubuk-ad { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cubuk-yol { height: 9px; border-radius: 99px; background: var(--yuzey2); overflow: hidden; }
.cubuk-dolu { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ana), var(--vurgu)); }
.cubuk-deger { font-weight: 700; white-space: nowrap; }

.gun-kumesi { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.gun-basligi { font-size: .76rem; font-weight: 700; color: var(--metin2); text-transform: uppercase; letter-spacing: .05em; }
.hareket {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--yuzey); border: 1px solid var(--kenar); border-radius: var(--r-kucuk);
}
.hareket-kat { font-size: 1.3rem; }
.hareket-orta { flex: 1; min-width: 0; }
.hareket-ad { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hareket-alt { display: flex; align-items: center; gap: 7px; font-size: .76rem; color: var(--metin2); }
.hareket-tutar { font-weight: 800; white-space: nowrap; }

/* =====================  YATIRIM  ===================== */

.varlik {
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: var(--yuzey); border: 1px solid var(--kenar); border-radius: var(--r); box-shadow: var(--golge);
}
.varlik-ust { display: flex; align-items: center; gap: 12px; }
.varlik-ikon { font-size: 1.5rem; }
.varlik-orta { flex: 1; min-width: 0; }
.varlik-ad { font-weight: 700; }
.varlik-alt { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .76rem; color: var(--metin2); }
.varlik-alt-satir { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--kenar); }
.varlik-fiyat {
  min-height: 38px; padding: 0 12px; border-radius: 99px;
  background: var(--yuzey2); border: 1px solid var(--kenar); font-size: .82rem; font-weight: 600;
}
.varlik-deger { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; }
.varlik-toplam { font-size: 1.1rem; font-weight: 800; }
.varlik-kar { font-size: .8rem; font-weight: 700; }
.varlik-not { font-size: .82rem; color: var(--metin2); white-space: pre-wrap; }

/* =====================  PANEL  ===================== */

.karsilama { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px; }
.karsilama h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.panel-kart { display: flex; flex-direction: column; gap: 12px; }
.panel-kart-ust { display: flex; align-items: center; gap: 10px; }
.panel-kart-ust .btn { margin-left: auto; }
.acilir summary { cursor: pointer; font-size: .85rem; color: var(--metin2); padding: 6px 0; }
.acilir[open] summary { margin-bottom: 8px; }
.mini-not-liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.mini-not {
  display: flex; flex-direction: column; gap: 3px; padding: 12px;
  border-radius: var(--r-kucuk); font-size: .82rem; min-width: 0;
}
.mini-not b { font-size: .9rem; }

/* son eklenenler */
.son-liste { display: flex; flex-direction: column; }
.son-satir {
  display: flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 6px 2px;
  border-bottom: 1px solid var(--kenar);
}
.son-liste .son-satir:last-child { border-bottom: none; }
.son-satir:active { background: var(--yuzey2); }
.son-ikon { font-size: 1rem; flex: 0 0 auto; }
.son-metin {
  flex: 1; min-width: 0; font-weight: 600; font-size: .9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.son-ek { flex: 0 0 auto; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.son-zaman { flex: 0 0 auto; font-size: .74rem; color: var(--metin2); white-space: nowrap; }
@media (max-width: 420px) { .son-ek { display: none; } }

/* =====================  EKSTRE İÇE AKTARMA  ===================== */

.ekstre-baslat { display: flex; flex-direction: column; gap: 6px; }
.ekstre-pencere { gap: 10px; }
.ekstre-araclar { display: flex; gap: 8px; }
.ekstre-liste { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ekstre-satir {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  background: var(--yuzey2); border: 1px solid var(--kenar); border-radius: var(--r-kucuk);
}
.ekstre-satir--var { opacity: .55; }
.ekstre-orta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ekstre-ad { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ekstre-alt { display: flex; align-items: center; gap: 7px; font-size: .74rem; color: var(--metin2); }
.ekstre-kategori { min-height: 36px; padding: 4px 8px; font-size: .82rem; }
.ekstre-tutar { font-weight: 800; font-size: .88rem; white-space: nowrap; padding-top: 2px; }
.teshis-kutu {
  margin: 0; padding: 12px; border-radius: var(--r-kucuk);
  background: var(--yuzey2); border: 1px solid var(--kenar);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .74rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  max-height: 46dvh; overflow: auto; user-select: text;
}

.ekstre-alt-cubuk {
  position: sticky; bottom: 0; display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 10px; border-top: 1px solid var(--kenar); background: var(--yuzey);
}

/* =====================  PLAN & HEDEFLER  ===================== */

.oneri {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--r-kucuk);
  background: var(--ana-yumusak); color: var(--ana); font-weight: 600; font-size: .9rem;
}
.oneri .btn { margin-left: auto; }

.plan-satir { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .92rem; }
.plan-satir--sonuc { border-top: 1px solid var(--kenar); margin-top: 4px; padding-top: 10px; font-size: 1.05rem; }

.duzenli-liste { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.duzenli {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--yuzey2); border: 1px solid var(--kenar); border-radius: var(--r-kucuk);
}
.duzenli--odendi { opacity: .6; }
.duzenli-orta { flex: 1; min-width: 0; }
.duzenli-ad { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.duzenli-alt { display: flex; gap: 5px; flex-wrap: wrap; font-size: .74rem; color: var(--metin2); }
.duzenli-tutar { font-weight: 800; font-size: .88rem; white-space: nowrap; }
@media (max-width: 420px) { .duzenli { flex-wrap: wrap; } .duzenli-orta { flex: 1 0 100%; } }

.aday-liste { display: flex; flex-direction: column; gap: 8px; }
.aday { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .86rem; }
.aday-kat { font-weight: 600; }
.aday .rozet { margin-left: auto; }
.rozet--artis { background: color-mix(in srgb, var(--kirmizi) 15%, transparent); color: var(--kirmizi); border-color: transparent; }
.rozet--azalis { background: color-mix(in srgb, var(--yesil) 15%, transparent); color: var(--yesil); border-color: transparent; }

.limit-liste { display: flex; flex-direction: column; gap: 6px; }
.limit-satir {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 14px;
  background: var(--yuzey); border: 1px solid var(--kenar); border-radius: var(--r-kucuk);
}
.limit-satir:active { background: var(--yuzey2); }
.limit-ust { display: flex; align-items: center; gap: 10px; }
.limit-kat { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.limit-tutar { font-weight: 700; font-size: .88rem; white-space: nowrap; }
.limit-alt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .74rem; color: var(--metin2); }
.cubuk-dolu--asim { background: linear-gradient(90deg, var(--kirmizi), #ff9d6e); }
.cubuk-dolu--bitti { background: linear-gradient(90deg, var(--yesil), var(--ana)); }
.cubuk-yol--kalin { height: 14px; }

.hedef-liste { display: flex; flex-direction: column; gap: 12px; }
.hedef {
  display: flex; flex-direction: column; gap: 10px; padding: 16px;
  background: var(--yuzey); border: 1px solid var(--kenar);
  border-radius: var(--r); box-shadow: var(--golge);
}
.hedef--bitti { opacity: .75; border-color: color-mix(in srgb, var(--yesil) 45%, transparent); }
.hedef-ust { display: flex; align-items: center; gap: 12px; }
.hedef-ikon { font-size: 1.8rem; flex: 0 0 auto; }
.hedef-orta { flex: 1; min-width: 0; }
.hedef-ad { font-weight: 700; font-size: 1.02rem; }
.hedef-alt { display: flex; gap: 6px; flex-wrap: wrap; font-size: .78rem; color: var(--metin2); }
.hedef-yuzde { font-size: 1.2rem; font-weight: 800; color: var(--ana); }
.hedef-durum { display: flex; flex-direction: column; gap: 3px; font-size: .86rem; }
.hedef-durum--bitti { color: var(--yesil); font-weight: 700; }

.birikim-liste { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px dashed var(--kenar); }
.birikim { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--metin2); padding: 4px 0; }
.birikim b { margin-left: auto; }
.birikim .kirp { max-width: 14ch; }

/* panelde hedef ilerlemesi */
.panel-hedef-liste { display: flex; flex-direction: column; gap: 12px; }
.panel-hedef { display: flex; flex-direction: column; gap: 5px; }
.panel-hedef-ust { display: flex; align-items: center; gap: 8px; }
.panel-hedef-ikon { font-size: 1.1rem; }
.panel-hedef-ad { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-hedef-yuzde { font-weight: 800; font-size: .9rem; color: var(--ana); }
.panel-hedef-alt { display: flex; gap: 6px; font-size: .74rem; color: var(--metin2); }

/* =====================  ÖZEL GÜNLER  ===================== */

.ozelgun-liste { display: flex; flex-direction: column; gap: 8px; }
.ozelgun {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--yuzey); border: 1px solid var(--kenar);
  border-radius: var(--r); box-shadow: var(--golge); transition: var(--gecis);
}
.ozelgun:active { transform: scale(.99); }
.ozelgun--bugun { border-color: var(--vurgu); background: color-mix(in srgb, var(--vurgu) 10%, var(--yuzey)); }
.ozelgun--gecti { opacity: .55; }
.ozelgun-ikon { font-size: 1.8rem; flex: 0 0 auto; }
.ozelgun-orta { flex: 1; min-width: 0; }
.ozelgun-baslik { font-weight: 700; }
.ozelgun-alt { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: .78rem; color: var(--metin2); }
.ozelgun-sayac {
  flex: 0 0 auto; min-width: 58px; padding: 6px 10px; border-radius: var(--r-kucuk);
  background: var(--yuzey2); text-align: center;
  font-size: 1.3rem; font-weight: 800; line-height: 1.1;
}
.ozelgun-sayac small { display: block; font-size: .6rem; font-weight: 600; color: var(--metin2); }
.ozelgun-sayac--yakin { background: var(--ana-yumusak); color: var(--ana); }
.ozelgun-sayac--bugun { background: var(--vurgu); color: #fff; }

/* panelde geri sayım şeridi */
.gerisayim-liste { display: flex; flex-direction: column; }
.gerisayim {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 7px 2px; border-bottom: 1px solid var(--kenar);
}
.gerisayim-liste .gerisayim:last-child { border-bottom: none; }
.gerisayim-ikon { font-size: 1.3rem; flex: 0 0 auto; }
.gerisayim-orta { flex: 1; min-width: 0; }
.gerisayim-ad { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gerisayim-alt { display: flex; gap: 5px; font-size: .74rem; color: var(--metin2); }
.gerisayim-sayi {
  flex: 0 0 auto; padding: 3px 10px; border-radius: 99px;
  background: var(--ana-yumusak); color: var(--ana);
  font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.gerisayim-sayi--bugun { background: var(--vurgu); color: #fff; }

/* =====================  AÇILIŞ ANİMASYONU  =====================
   Videonun kendisi koyu; katman temadan bağımsız olarak hep koyu kalır ki
   açık temada beyaz bir çerçeve içinde yüzer gibi durmasın. */

#acilis {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: #0b0616;
  opacity: 1; transition: opacity .4s ease;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#acilis.acilis--kapaniyor { opacity: 0; pointer-events: none; }

/* videonun arkasındaki yumuşak parıltı */
.acilis-hale {
  position: absolute; width: min(96vmin, 760px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle,
    rgba(53,214,226,.16) 0%, rgba(124,58,237,.14) 38%, transparent 68%);
  filter: blur(28px);
}

.acilis-video {
  position: relative;
  width: min(78vmin, 560px); height: min(78vmin, 560px);
  object-fit: contain;
  background: transparent;
  animation: acilis-bel .5s ease both;
}
@keyframes acilis-bel { from { opacity: 0; transform: scale(.94); } }

.acilis-atla {
  position: absolute; z-index: 1;
  right: calc(18px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  min-height: 40px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 99px;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.75);
  font-size: .85rem; font-weight: 600;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.acilis-atla:active { transform: scale(.94); }

/* =====================  ERİŞİLEBİLİRLİK  ===================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
:focus-visible { outline: 3px solid var(--vurgu); outline-offset: 2px; }
