/* Tulpar: ortak stil (ana sayfa ve tanılama). Renkler açık ve koyu tema için :root değişkenlerinde. */
/* Dört renk: #F9F7F7 (açık), #DBE2EF (gri mavi), #3F72AF (mavi), #112D4E (lacivert).
   Öteki tonlar bunlardan türetilir; kırmızı yalnız hata iletilerinde kullanılır. */
:root {
  color-scheme: light dark;
  --zemin: #f9f7f7; --yuzey: #ffffff; --yuzey-2: #f4f6fa; --cizgi: #dbe2ef;
  --yazi: #112d4e; --soluk: #4f6380; --vurgu: #3f72af; --vurgu-ustu: #ffffff; --vurgu-hafif: #e6ecf6;
  --vurgu-yazi: #3f72af; --basari: #3f72af; --basari-hafif: #dbe2ef; --hata: #c0392b;
  --bant: #112d4e; --bant-yazi: #f9f7f7; --bant-soluk: #dbe2ef; --bant-cizgi: transparent;
  --golge: 0 1px 2px rgba(17, 45, 78, .05), 0 8px 24px rgba(17, 45, 78, .06);
  --yaricap: 16px;
}
/* Koyu tema: siyaha yakın lacivert zemin, vurgular aynı dört renkten */
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="acik"]) {
    --zemin: #090d14; --yuzey: #111823; --yuzey-2: #0c121b; --cizgi: #1e2a3b;
    --yazi: #f9f7f7; --soluk: #98a5b8; --vurgu: #3f72af; --vurgu-ustu: #f9f7f7; --vurgu-hafif: rgba(63, 114, 175, .2);
    --vurgu-yazi: #dbe2ef; --basari: #dbe2ef; --basari-hafif: rgba(219, 226, 239, .12); --hata: #f08a80;
    --bant: #090d14; --bant-yazi: #f9f7f7; --bant-soluk: #98a5b8; --bant-cizgi: #1e2a3b;
    --golge: none;
  }
}
:root[data-tema="koyu"] {
  --zemin: #090d14; --yuzey: #111823; --yuzey-2: #0c121b; --cizgi: #1e2a3b;
  --yazi: #f9f7f7; --soluk: #98a5b8; --vurgu: #3f72af; --vurgu-ustu: #f9f7f7; --vurgu-hafif: rgba(63, 114, 175, .2);
  --vurgu-yazi: #dbe2ef; --basari: #dbe2ef; --basari-hafif: rgba(219, 226, 239, .12); --hata: #f08a80;
  --bant: #090d14; --bant-yazi: #f9f7f7; --bant-soluk: #98a5b8; --bant-cizgi: #1e2a3b;
  --golge: none;
}
:root[data-tema="acik"] { color-scheme: light; }
:root[data-tema="koyu"] { color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--zemin); color: var(--yazi);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.kap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right)); }
h1, h2, p { margin: 0; }
.soluk { color: var(--soluk); }
.kucuk { font-size: .875rem; }

/* Üst bant */
.ust { background: var(--bant); color: var(--bant-yazi); border-bottom: 1px solid var(--bant-cizgi); padding-top: env(safe-area-inset-top); }
.ust .kap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; line-height: 1; font-family: inherit; letter-spacing: -.01em; }
.logo svg { width: 28px; height: 28px; }
.cihaz { margin-left: auto; font-size: .875rem; color: var(--bant-soluk); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
#cihaz-adi { color: var(--bant-yazi); font-weight: 600; }
button.bag, a.bag {
  background: none; border: 0; padding: 8px 4px; min-height: 0; color: var(--bant-yazi); font-weight: 600; font-size: .875rem; line-height: 1; font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

main { flex: 1; padding: 28px 0 40px; }
main .kap { display: flex; flex-direction: column; gap: 20px; }

/* Adımlar */
#adimlar { display: flex; align-items: center; gap: 10px; list-style: none; margin: 0; padding: 0; font-size: .875rem; color: var(--soluk); flex-wrap: wrap; }
#adimlar li { display: flex; align-items: center; gap: 8px; }
#adimlar li + li::before { content: ""; width: 24px; height: 1px; background: var(--cizgi); margin-right: 2px; }
#adimlar i {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .75rem; line-height: 1; font-family: inherit;
  font-style: normal; border: 1px solid var(--cizgi); background: var(--yuzey);
}
#adimlar li.etkin { color: var(--yazi); font-weight: 600; }
#adimlar li.etkin i { background: var(--vurgu); border-color: var(--vurgu); color: var(--vurgu-ustu); }
#adimlar li.bitti i { background: var(--basari-hafif); border-color: transparent; color: var(--basari); }

/* Durum */
.durum-satiri { display: flex; flex-direction: column; gap: 4px; }
#durum { color: var(--soluk); display: flex; align-items: center; gap: 10px; }
#durum.tamam { color: var(--yazi); font-weight: 600; }
#durum.tamam::before { content: ""; flex: none; align-self: flex-start; margin-top: .45em; width: 9px; height: 9px; border-radius: 50%; background: var(--basari); box-shadow: 0 0 0 4px var(--basari-hafif); }
#durum.hata { color: var(--hata); font-weight: 600; }
#ayrinti { color: var(--soluk); font: .8rem ui-monospace, "SF Mono", Consolas, monospace; overflow-wrap: anywhere; }

/* Kartlar ve düğmeler */
.kart { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--yaricap); box-shadow: var(--golge); }
button, .dugme {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 1rem; line-height: 1; font-family: inherit; cursor: pointer; text-decoration: none;
  background: var(--vurgu); color: var(--vurgu-ustu); touch-action: manipulation;
  transition: transform .12s ease-out, background-color .15s ease-out, border-color .15s ease-out;
}
button svg, .dugme svg { width: 18px; height: 18px; flex: none; }
button:active, .dugme:active { transform: scale(.97); }
button.ikincil { background: transparent; color: var(--yazi); border-color: var(--cizgi); }
button:disabled { opacity: .55; cursor: default; }
button:disabled:active { transform: none; }
button.ikincil:hover { border-color: var(--soluk); }
:focus-visible { outline: 2px solid var(--vurgu-yazi); outline-offset: 2px; }

/* Doğrulama kodu */
/* Bağlıyken tek sütun: sayfanın ortasında dar bir sütun. */
main .kap:has(> #paylasim:not([hidden])) { max-width: 760px; }
#dogrulama { padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
#dogrulama .etiket, #yol { width: 100%; }
#dogrulama-kodu { font: 600 2rem/1.1 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .08em; font-variant-numeric: tabular-nums; }

/* Onay */
#onay { padding: 22px; border-color: var(--vurgu); box-shadow: 0 0 0 3px var(--vurgu-hafif); display: flex; flex-direction: column; gap: 8px; }
#onay-metin { font-weight: 700; font-size: 1.125rem; overflow-wrap: anywhere; }
#onay-kod { font: 600 1.125rem ui-monospace, "SF Mono", Consolas, monospace; color: var(--yazi); letter-spacing: .08em; }
.onay-ek { overflow-wrap: anywhere; }
.onay-dugmeler { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* Bağlanma */
.giris h1 { font-weight: 700; font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.2; font-family: inherit; letter-spacing: -.02em; }
.giris p { margin-top: 8px; max-width: 600px; }
.izgara { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 4px; }
#qr { padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
#qr-resim { width: min(280px, 100%); aspect-ratio: 1; background: #fff; border-radius: 14px; padding: 16px; }
#qr-resim svg { width: 100%; height: 100%; display: block; }
#adres-kopyala { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.kod-kart { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.kod-kart h2 { font-size: 1rem; }
.kod-kart hr { border: 0; border-top: 1px solid var(--cizgi); margin: 0; width: 100%; }
#kod-goster { align-self: flex-start; }
#kod { font: 600 2.25rem/1.1 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .12em; }
#kod-formu { display: flex; flex-direction: column; gap: 6px; }
#kod-formu label { font-size: .875rem; font-weight: 600; }
#kod-formu .satir { display: flex; gap: 8px; }
#kod-girdi {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--cizgi);
  background: var(--yuzey-2); color: var(--yazi); font: 500 1rem/1 ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: .12em; text-transform: uppercase;
}
#kod-girdi::placeholder { color: var(--soluk); opacity: .7; }
.kod-kart .not { margin-top: auto; }
.sure { color: var(--soluk); font-variant-numeric: tabular-nums; }

#yeniden { padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 10px; }

/* Paylaşım */
#paylasim { display: flex; flex-direction: column; gap: 16px; }
#birakma {
  border: 2px dashed var(--cizgi); border-radius: var(--yaricap); padding: 28px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: background-color .15s ease-out, border-color .15s ease-out;
}
#birakma.uzerinde { border-color: var(--vurgu); background: var(--vurgu-hafif); }
#sec { min-height: 52px; padding: 0 24px; font-size: 1.0625rem; }
.liste-ust { display: flex; justify-content: space-between; align-items: center; }
.liste-ust h2 { font-size: .875rem; font-weight: 600; color: var(--soluk); }
#temizle { min-height: 36px; padding: 0 12px; font-size: .875rem; }
#aktarimlar { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
#aktarimlar li {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 14px;
  background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: 14px; animation: belir .2s ease-out;
}
.yon { grid-column: 1; grid-row: 1 / span 2; align-self: start; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--vurgu-hafif); color: var(--vurgu-yazi); }
.yon svg { width: 18px; height: 18px; }
.ust-satir { display: flex; align-items: baseline; gap: 10px; min-width: 0; grid-column: 2; }
.ad { font-weight: 600; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.boyut { color: var(--soluk); font-size: .8125rem; flex: none; font-variant-numeric: tabular-nums; }
button.sil {
  flex: none; min-height: 32px; width: 32px; padding: 0; background: none; border: 0; color: var(--soluk);
  border-radius: 8px; align-self: center;
}
button.sil svg { width: 16px; height: 16px; }
button.sil:hover { color: var(--hata); background: var(--yuzey-2); }
#aktarimlar li:not(.tamam):not(.hata) button.sil { visibility: hidden; }
.kim { grid-column: 2; color: var(--soluk); font-size: .8125rem; overflow-wrap: anywhere; }
.cubuk { grid-column: 2; margin-top: 6px; height: 4px; background: var(--cizgi); border-radius: 2px; overflow: hidden; }
.cubuk span { display: block; height: 100%; background: var(--vurgu); transform: scaleX(0); transform-origin: left; transition: transform .25s ease-out; }
.bilgi { grid-column: 2; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--soluk); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.metin { display: inline-flex; align-items: center; gap: 4px; }
#aktarimlar .not { grid-column: 2; margin: 2px 0 0; color: var(--hata); font-weight: 600; overflow-wrap: anywhere; }
li.tamam .cubuk, li.hata .cubuk { display: none; }
li.tamam .metin { color: var(--basari); font-weight: 600; }
li.hata .metin { color: var(--hata); font-weight: 600; }
li.tamam .metin::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--onay-imi) center / contain no-repeat; mask: var(--onay-imi) center / contain no-repeat; }
:root { --onay-imi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.bilgi a.kaydet {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 10px;
  background: var(--vurgu); color: var(--vurgu-ustu); font-weight: 600; text-decoration: none;
}
.bilgi a.kaydet:active { transform: scale(.97); }
#kes { align-self: center; }

/* Alt bilgi */
footer { border-top: 1px solid var(--cizgi); padding: 18px 0 max(18px, env(safe-area-inset-bottom)); color: var(--soluk); font-size: .8125rem; }
/* Solda ad ve sürüm, ortada açıklama, sağda tema ve GitHub. Dar ekranda alt alta. */
footer .kap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 28px; }
.guvence { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; max-width: 620px; justify-self: center; }
.guvence svg { width: 16px; height: 16px; flex: none; color: var(--vurgu-yazi); align-self: flex-start; margin-top: .15em; }
.guvence a { color: var(--vurgu-yazi); text-underline-offset: 2px; white-space: nowrap; }
.tema { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--yuzey); border: 1px solid var(--cizgi); }
.tema button {
  min-height: 30px; padding: 0 10px; border-radius: 8px; background: none; color: var(--soluk); font-size: .8125rem; font-weight: 600;
}
.tema button[aria-checked="true"] { background: var(--vurgu-hafif); color: var(--yazi); }
.tema button:active { transform: none; }
.surum { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sag { display: flex; align-items: center; gap: 12px; }
a.github { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--soluk); }
a.github:hover { color: var(--yazi); background: var(--yuzey); }
a.github svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  footer .kap { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .guvence { order: 1; justify-content: flex-start; text-align: left; justify-self: stretch; }
  .sag { order: 2; }
  .surum { order: 3; }
}

/* Küçük görünen düğmelerin dokunma alanı en az 44 piksel: görünüş aynı, çevresinde görünmez pay. */
button.sil, .bilgi a.kaydet, #temizle, #adres-kopyala, .tema button, a.github, button.bag, a.bag { position: relative; }
button.sil::after, .bilgi a.kaydet::after, #temizle::after, #adres-kopyala::after,
.tema button::after, a.github::after, button.bag::after, a.bag::after { content: ""; position: absolute; inset: -7px; }
.tema button::after { inset: -7px 0; }
.gorunmez { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@keyframes belir { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .izgara { grid-template-columns: minmax(0, 1fr); }
  #qr { padding: 22px; }
  .kod-kart { padding: 22px; }
  main { padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  button:active, .dugme:active, .bilgi a.kaydet:active { transform: none; }
}

/* Tanılama sayfası */
a.logo { color: inherit; text-decoration: none; }
.tani { max-width: 760px; }
.tani-liste { list-style: none; margin: 0; padding: 0; }
.tani-liste li { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; padding: 14px 20px; flex-wrap: wrap; }
.tani-liste li + li { border-top: 1px solid var(--cizgi); }
.tani-ad { font-weight: 600; }
.tani-sonuc { color: var(--soluk); font-variant-numeric: tabular-nums; }
.tani-liste li[data-durum="acik"] .tani-sonuc { color: var(--basari); font-weight: 600; }
.tani-liste li[data-durum="kapali"] .tani-sonuc { color: var(--hata); font-weight: 600; }
.tani-ozet { font-weight: 600; }
.tani-ozet.hata { color: var(--hata); }
.tani-dugmeler { display: flex; gap: 10px; flex-wrap: wrap; }
