/* ==========================================================================
   by Görkem — ortak stil (site + panel)
   Renkler logodan: siyah zemin, beyaz/krem yazı, ahşap tonları
   ========================================================================== */
:root {
  color-scheme: dark;
  --zemin: #0c0b0a;
  --yuzey: #161412;
  --yuzey-2: #1d1a17;
  --yuzey-3: #27231f;
  --cizgi: #342e28;
  --cizgi-2: #4a4239;
  --metin: #f4eee6;
  --soluk: #b8ada0;
  --soluk-2: #8d8378;
  --krem: #f4eee6;
  --ahsap: #8f6240;
  --ahsap-acik: #cf9d6e;
  --basari: #5cc08a;
  --tehlike: #f0706a;
  --uyari: #e8b85a;
  --bilgi: #82b6ea;
  --yaricap: 16px;
  --yaricap-k: 12px;
  --golge: 0 12px 32px rgba(0, 0, 0, .5);
  --krem-ustu: #121110;          /* krem dolgunun üstündeki yazı */
  --krem-hover: #fff;
  --cam: rgba(12, 11, 10, .86);  /* bulanık üst/alt çubuklar */
  --cam-koyu: rgba(12, 11, 10, .94);
  --cizgi-cam: rgba(255, 255, 255, .14);
  --hafif: rgba(255, 255, 255, .03);
  --zemin-0: rgba(12, 11, 10, 0);
  --zemin-85: rgba(12, 11, 10, .85);
  --alt-guvenli: env(safe-area-inset-bottom, 0px);
  --ust-guvenli: env(safe-area-inset-top, 0px);
  --yazi: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Açık tema (sitede tema düğmesiyle; panel her zaman koyu) */
:root[data-tema="acik"] {
  color-scheme: light;
  --zemin: #f6f2ec;
  --yuzey: #ffffff;
  --yuzey-2: #f1ebe3;
  --yuzey-3: #e7dfd4;
  --cizgi: #e2d9cc;
  --cizgi-2: #cdbfae;
  --metin: #1b1815;
  --soluk: #635a50;
  --soluk-2: #857a6e;
  --krem: #1b1815;
  --krem-ustu: #ffffff;
  --krem-hover: #3a332c;
  --ahsap-acik: #93633d;
  --basari: #23864f;
  --tehlike: #c8423b;
  --uyari: #a8741a;
  --bilgi: #2b67a8;
  --golge: 0 10px 28px rgba(60, 40, 20, .14);
  --cam: rgba(246, 242, 236, .9);
  --cam-koyu: rgba(246, 242, 236, .96);
  --cizgi-cam: rgba(0, 0, 0, .1);
  --hafif: rgba(0, 0, 0, .035);
  --zemin-0: rgba(246, 242, 236, 0);
  --zemin-85: rgba(246, 242, 236, .85);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--zemin); color: var(--metin);
  font: 16px/1.5 var(--yazi);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--ahsap-acik); outline-offset: 2px; }
.gizli-okuyucu { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease, opacity .15s ease, border-color .15s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.btn-ana { background: var(--krem); color: var(--krem-ustu); }
.btn-ana:hover { background: var(--krem-hover); }
.btn-ikincil { background: var(--yuzey-3); color: var(--metin); border-color: var(--cizgi-2); }
.btn-ikincil:hover { border-color: var(--soluk-2); }
.btn-hayalet { background: transparent; color: var(--metin); border-color: var(--cizgi-2); }
.btn-tehlike { background: transparent; color: var(--tehlike); border-color: rgba(240, 112, 106, .45); }
.btn-tehlike-dolu { background: var(--tehlike); color: #1a0d0c; }
.btn-wp { background: #25d366; color: #062b14; }
.btn-tam { width: 100%; }
.btn-kucuk { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-ikon { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.btn .ikon { width: 20px; height: 20px; flex: none; }
.btn.yukleniyor { position: relative; color: transparent !important; pointer-events: none; }
.btn.yukleniyor::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid currentColor; border-color: var(--krem-ustu) transparent var(--krem-ustu) transparent; animation: don .7s linear infinite;
}
.btn-ikincil.yukleniyor::after, .btn-hayalet.yukleniyor::after, .btn-tehlike.yukleniyor::after { border-color: var(--metin) transparent var(--metin) transparent; }
@keyframes don { to { transform: rotate(360deg); } }

.ikon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- form ---------- */
.alan { display: grid; gap: 6px; margin-bottom: 14px; }
.alan > label, .etiket { font-size: 14px; color: var(--soluk); font-weight: 600; }
.girdi, select.girdi, textarea.girdi {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--yaricap-k);
  background: var(--yuzey-2); border: 1px solid var(--cizgi-2); color: var(--metin);
  font-size: 16px; /* iOS yakınlaştırmasın */ outline: none; transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
textarea.girdi { min-height: 84px; resize: vertical; line-height: 1.4; }
.girdi::placeholder { color: var(--soluk-2); }
.girdi:focus { border-color: var(--krem); background: var(--yuzey-3); }
.girdi.hatali { border-color: var(--tehlike); }
select.girdi { background-image: linear-gradient(45deg, transparent 50%, var(--soluk) 50%), linear-gradient(135deg, var(--soluk) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.pin-girdi { letter-spacing: .5em; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.yardim { font-size: 13px; color: var(--soluk-2); }
.form-hata { color: var(--tehlike); font-size: 14px; min-height: 0; }
.form-hata:empty { display: none; }

.anahtar { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.anahtar input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.anahtar span { position: absolute; inset: 0; border-radius: 99px; background: var(--cizgi-2); transition: background .2s; }
.anahtar span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.anahtar input:checked + span { background: var(--basari); }
.anahtar input:checked + span::after { transform: translateX(22px); }
.anahtar input:focus-visible + span { outline: 2px solid var(--ahsap-acik); outline-offset: 2px; }

/* ---------- kart / liste ---------- */
.kart { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--yaricap); }
.rozet-etiket { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 650; background: var(--yuzey-3); color: var(--soluk); border: 1px solid var(--cizgi-2); white-space: nowrap; }
.rozet-etiket.yesil { color: var(--basari); border-color: rgba(92, 192, 138, .4); background: rgba(92, 192, 138, .08); }
.rozet-etiket.kirmizi { color: var(--tehlike); border-color: rgba(240, 112, 106, .4); background: rgba(240, 112, 106, .08); }
.rozet-etiket.sari { color: var(--uyari); border-color: rgba(232, 184, 90, .4); background: rgba(232, 184, 90, .08); }
.rozet-etiket.mavi { color: var(--bilgi); border-color: rgba(130, 182, 234, .4); background: rgba(130, 182, 234, .08); }
.nokta { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

.bos-durum { text-align: center; padding: 36px 16px; color: var(--soluk); }
.bos-durum .ikon { width: 40px; height: 40px; margin: 0 auto 10px; display: block; color: var(--soluk-2); stroke-width: 1.6; }

.iskelet { background: linear-gradient(90deg, var(--yuzey-2) 0%, var(--yuzey-3) 50%, var(--yuzey-2) 100%); background-size: 200% 100%; animation: iskelet 1.2s ease-in-out infinite; border-radius: var(--yaricap-k); }
@keyframes iskelet { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- bildirim (toast) ---------- */
#bildirim {
  position: fixed; left: 50%; bottom: calc(18px + var(--alt-guvenli)); z-index: 200;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  width: max-content; max-width: calc(100vw - 32px);
  background: var(--krem); color: var(--krem-ustu); padding: 12px 18px; border-radius: 14px;
  font-weight: 600; font-size: 15px; box-shadow: var(--golge); transition: opacity .2s, transform .2s;
}
#bildirim.goster { opacity: 1; transform: translate(-50%, 0); }
#bildirim.hata { background: var(--tehlike); color: #1d0b0a; }
body.alt-cubuk-var #bildirim { bottom: calc(96px + var(--alt-guvenli)); }

/* ---------- alt pencere (sheet / modal) ---------- */
.perde {
  position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .62);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.perde.acik { opacity: 1; }
.pencere {
  width: 100%; max-width: 560px; max-height: calc(100dvh - 24px - var(--ust-guvenli));
  overflow: auto; overscroll-behavior: contain;
  background: var(--yuzey); border: 1px solid var(--cizgi); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 8px 18px calc(18px + var(--alt-guvenli));
  transform: translateY(24px); transition: transform .22s ease;
}
.perde.acik .pencere { transform: none; }
.pencere-tutamak { width: 40px; height: 5px; border-radius: 9px; background: var(--cizgi-2); margin: 4px auto 12px; }
.pencere-baslik { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pencere-baslik h2 { font-size: 19px; }
.pencere-dugmeler { display: grid; gap: 10px; margin-top: 18px; }
.pencere-dugmeler.yan { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) {
  .perde { align-items: center; padding: 20px; }
  .pencere { border-radius: 22px; border-bottom: 1px solid var(--cizgi); padding-bottom: 20px; }
  .pencere-tutamak { display: none; }
}
body.kilitli { overflow: hidden; }
