/* SKY PARTS web — koyu tema (masaüstü paleti). Dokunma hedefleri >= 44px. */
:root {
  color-scheme: dark;
  --bg: #0e131a; --bg-2: #121923; --panel: #161e29; --panel-2: #1b2531;
  --line: #243040; --line-soft: #1d2733;
  --text: #e4e8ee; --text-2: #aeb8c6; --muted: #6f7d8f;
  --accent: #3b82f6; --accent-2: #2f6fe0; --accent-ink: #eaf1ff;
  --ok: #34d399; --ok-bg: #10261d; --ok-line: #1f5540;
  --warn: #fbbf24; --danger: #f87171;
  --radius: 12px; --radius-sm: 8px;
  --sol: env(safe-area-inset-left, 0px); --sag: env(safe-area-inset-right, 0px);
  --ust-bosluk: env(safe-area-inset-top, 0px); --alt-bosluk: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 15px/1.45 -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-left: var(--sol); padding-right: var(--sag); padding-bottom: var(--alt-bosluk);
}
h2 { font-size: 19px; margin: 6px 0 12px; }
h3 { font-size: 13px; margin: 18px 0 8px; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; }
.soluk { color: var(--muted); font-size: 13px; }

/* Üst bar */
.ust {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--ust-bosluk) + 6px) 14px 6px;
  background: rgba(16,22,31,.92); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 8px; letter-spacing: .18em; font-size: 16px; font-weight: 700; user-select: none; }
button.brand { background: none; border: 0; padding: 0; color: inherit; font: inherit; letter-spacing: .18em; font-weight: 700; cursor: pointer; }
.brand img { border-radius: 8px; }
.brand-buyuk { font-size: 22px; justify-content: center; margin-bottom: 26px; }
.b-sky { color: #38bdf8; }
.b-parts { color: var(--text); }
.ikon-btn {
  min-width: 48px; min-height: 48px; font-size: 24px; line-height: 1;
  color: var(--text); background: transparent; border: 0; border-radius: var(--radius-sm);
}
.ikon-btn:active { background: var(--panel-2); }

/* Menü */
.menu {
  position: sticky; top: calc(var(--ust-bosluk) + 60px); z-index: 19;
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.menu button {
  min-height: 48px; text-align: left; padding: 0 14px; font-size: 16px;
  color: var(--text); background: transparent; border: 0; border-radius: var(--radius-sm);
}
.menu button:active, .menu button.aktif { background: var(--panel-2); }
.menu button.tehlike { color: var(--danger); }
.menu-bilgi { padding: 8px 14px; font-size: 13px; color: var(--muted); }

main { padding: 12px 14px 40px; max-width: 760px; margin: 0 auto; }

/* Formlar */
input, select {
  width: 100%; min-height: 48px; padding: 10px 14px; font-size: 17px; /* >=16px: iOS yakınlaştırmasın */
  color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
#kod { text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
label { display: block; margin: 12px 0 6px; font-size: 13px; color: var(--text-2); }
.satir-alan { margin-bottom: 4px; }
.kayit-form { margin-bottom: 12px; }
.kayit-form .btn { width: 100%; margin-top: 12px; }

.btn {
  min-height: 48px; padding: 0 18px; font-size: 16px; font-weight: 600; font-family: inherit;
  border-radius: var(--radius-sm); border: 1px solid transparent; color: var(--text);
}
.btn:disabled { opacity: .55; }
.btn.birincil { background: var(--accent); color: var(--accent-ink); }
.btn.birincil:active { background: var(--accent-2); }
.btn.ikincil { background: var(--panel-2); border-color: var(--line); color: var(--text-2); }
.btn.tehlike { background: transparent; border-color: rgba(248,113,113,.45); color: var(--danger); }
.btn.kucuk { min-height: 44px; font-size: 14px; padding: 0 14px; }

#araForm { display: flex; gap: 8px; }
#araForm .btn { flex: 0 0 auto; min-width: 88px; }
.arac-satir { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.arac-satir .btn { min-height: 44px; font-size: 14px; }

/* Çipler */
.cipler { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.cip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; gap: 6px;
  font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: .03em;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 22px;
}
.cip:active { background: var(--line); }
.cip.fav { border-color: rgba(251,191,36,.45); }
.cip .yildiz { color: var(--warn); }
.bos-not { color: var(--muted); font-size: 14px; }

/* Mesaj / hata */
.durum-mesaj, .hata-kutu {
  margin: 12px 0; padding: 12px 14px; font-size: 14px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line); color: var(--text-2);
}
.hata-kutu, .durum-mesaj.hata { color: var(--danger); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.07); }

/* Özet */
.ozet-kart {
  margin: 14px 0; padding: 14px; border-radius: var(--radius);
  background: var(--ok-bg); border: 1px solid var(--ok-line);
}
.ozet-kart.notr { background: var(--panel); border-color: var(--line); }
.ozet-baslik { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; }
.ozet-ana { font-size: 22px; font-weight: 700; color: var(--ok); margin: 2px 0; font-variant-numeric: tabular-nums; }
.ozet-alt { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ozet-satir { display: flex; justify-content: space-between; gap: 10px; padding-top: 6px; font-size: 14px; }
.marj-iyi { color: var(--ok); font-weight: 700; }
.marj-kotu { color: var(--warn); font-weight: 700; }

/* Site kartları */
.site-kart {
  margin: 10px 0; padding: 12px 14px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
}
.site-kart.enucuz { border-color: var(--ok-line); background: var(--ok-bg); }
.site-bas { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.nokta { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.nokta.araniyor { background: var(--accent); animation: nabiz 1s ease-in-out infinite; }
.nokta.ok { background: var(--ok); }
.nokta.bulunamadi { background: var(--muted); }
.nokta.mesgul, .nokta.zaman-asimi { background: var(--warn); }
.nokta.hata, .nokta.giris-gerekli { background: var(--danger); }
@keyframes nabiz { 50% { opacity: .3; } }
.site-ad { font-weight: 700; flex: 1; }
.site-durum { font-size: 13px; color: var(--text-2); text-align: right; }
.site-durum.giris-gerekli, .site-durum.hata { color: var(--danger); }
.site-durum.mesgul, .site-durum.zaman-asimi { color: var(--warn); }
.site-mesaj { font-size: 12px; color: var(--muted); margin-top: 4px; }
.site-kart.enucuz .fiyat-eur { color: var(--ok); }
.satir-ust { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.satir-ad { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.satir-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.fiyat { text-align: right; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.fiyat-eur { font-weight: 700; font-size: 17px; }
.fiyat-tl { font-size: 12px; color: var(--text-2); }
.fiyat-yerel { font-size: 12px; color: var(--text-2); }
.rozet { display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 600; border-radius: 10px; background: var(--panel-2); color: var(--text-2); }
.stok-var { background: rgba(52,211,153,.12); color: var(--ok); }
.stok-az { background: rgba(251,191,36,.12); color: var(--warn); }
.stok-yolda { background: rgba(59,130,246,.14); color: #7fb0ff; }
.stok-termin { background: rgba(167,139,250,.14); color: #c4b5fd; }
.stok-yok { background: rgba(248,113,113,.12); color: var(--danger); }
.fav-btn {
  min-width: 44px; min-height: 44px; font-size: 22px; line-height: 1; padding: 0;
  color: var(--muted); background: transparent; border: 0; border-radius: var(--radius-sm);
}
.fav-btn.acik { color: var(--warn); }
.ozet-ust { display: flex; justify-content: space-between; align-items: center; }

/* Cihaz / kayıt kartları */
.kart { margin: 10px 0; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.kart-baslik { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kart-alt { margin-top: 4px; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.kart-eylem { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kart-eylem select { flex: 1 1 140px; min-height: 44px; font-size: 15px; }
.grup-baslik { margin: 20px 0 4px; font-weight: 700; color: var(--text-2); }
.kayit-satir { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.kayit-ust { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.kayit-satir.supheli { background: rgba(248, 113, 113, .12); border-left: 3px solid var(--danger); padding-left: 8px; }
.kayit-olay { font-weight: 700; }
.kutu-satir { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.kutu-satir input[type=checkbox] { width: auto; min-height: 0; padding: 0; flex: none; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--accent); transform: scale(1.3); }
.kayit-olay.kotu { color: var(--danger); }
.kayit-zaman { font-size: 12px; color: var(--muted); white-space: nowrap; }
.kayit-detay { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }

/* Giriş */
.giris-sayfa { display: flex; align-items: center; justify-content: center; padding-top: var(--ust-bosluk); }
.giris-kutu { width: 100%; max-width: 380px; padding: 24px 22px; }
.giris-kutu .btn { width: 100%; margin-top: 18px; }
.giris-kutu .hata-kutu { margin-top: 14px; }

/* Yeni cihaz onay bekleme ekranı */
.onay-ekrani { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.onay-kart { max-width: 360px; width: 100%; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 20px; }
.onay-kart h2 { margin: 0 0 12px; color: var(--warn); }
.onay-kart p { margin: 0 0 12px; }

/* OEM / Yan sanayi / Hepsi anahtarı (button: genel input kuralı etkilemesin) */
.filtre-satir { margin: 10px 0; }
.segment { display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.segment button { font: inherit; flex: 1; min-height: 44px; border: 0; border-radius: 0; background: transparent; color: var(--text-2); font-size: 14px; padding: 0 8px; }
.segment button + button { border-left: 1px solid var(--line); }
.segment button.aktif { background: var(--accent); color: #fff; font-weight: 600; }
.filtre-ozet { margin-top: 8px; font-size: 13px; color: var(--text-2); }
.filtre-ozet b { color: var(--ok); }
.satir-kart { padding: 10px 14px; }
.satir-site { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 2px; }
.rozet.muadil { background: rgba(148,163,184,.18); color: var(--muted); }
.durum-blok { margin: 12px 0; }
.durum-satir { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 4px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.durum-satir .site-ad { font-weight: 600; flex: 0 1 auto; }
.durum-satir .site-mesaj { flex-basis: 100%; margin: 0; }

/* Yönetim (master) */
.uyari-serit {
  display: block; width: 100%; margin: 12px 0; padding: 12px 14px; min-height: 44px; text-align: left;
  font: inherit; font-weight: 700; color: var(--warn); background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.45); border-radius: var(--radius-sm);
}
.kart.uyarili { border-color: rgba(248,113,113,.5); }
.kart-uyari { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--danger); }
.kart.pasif { opacity: .6; }

/* Parça bulucu */
#bulucuForm { display: flex; gap: 8px; margin-bottom: 10px; }
#bulucuForm input { flex: 1 1 auto; min-width: 0; }
#bulucuForm .btn { flex: 0 0 auto; min-width: 88px; }
.bulucu-kod { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; user-select: all; -webkit-user-select: all; }
.rozet.tamam { background: var(--ok-bg); color: var(--ok); }
.rozet.uyari { background: rgba(251,191,36,.16); color: var(--warn); }
.bulucu-kaynak a { color: var(--accent); margin-right: 12px; overflow-wrap: anywhere; }

/* Sonuç tablosu (masaüstü uygulamasındaki görünüm). Telefonda iki ince satır, geniş ekranda sütunlar. */
#liste { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
#liste:empty { display: none; }
.tsatir {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "site eur stok" "meta meta meta" "not not not";
  column-gap: 10px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line-soft); font-size: 14px;
}
.tsatir:first-child { border-top: 0; }
.tsatir > span { min-width: 0; }
.tsatir .h-site { grid-area: site; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tsatir .h-eur { grid-area: eur; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.15; }
.tsatir .h-eur small { display: block; font-size: 11px; color: var(--muted); }
.tsatir .h-stok { grid-area: stok; text-align: right; }
.tsatir .h-meta { grid-area: meta; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.tsatir .h-not { grid-area: not; font-size: 11.5px; color: var(--warn); margin-top: 3px; }
.tsatir .h-marka, .tsatir .h-kod, .tsatir .h-ad, .tsatir .h-yerel { display: none; }
.tsatir.enucuz { background: var(--ok-bg); box-shadow: inset 3px 0 0 var(--ok); }
.tsatir.enucuz .h-eur { color: var(--ok); }
.tsatir.enucuz .h-eur small { color: #2fae84; }
.tbaslik { display: none; }
.ozet-kart { padding: 10px 14px; }
.ozet-ana { font-size: 19px; }
#anaEkranBtn { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
/* Gizli görünüm açıkken SKY yazısının üzerinden hafif bir ışık geçer */
#anaEkranBtn.g .b-sky {
  background: linear-gradient(100deg, #38bdf8 42%, #e0f7ff 50%, #38bdf8 58%);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sky-parilti 3.5s ease-in-out infinite;
}
@keyframes sky-parilti { 0% { background-position: 100% 0; } 45%, 100% { background-position: 0 0; } }

@media (min-width: 900px) {
  main { max-width: 1240px; }
  .tsatir {
    grid-template-columns: 150px 100px 130px minmax(0, 1fr) 120px 120px 110px; grid-template-areas: none;
    align-items: start; padding: 9px 14px;
  }
  .tsatir .h-site, .tsatir .h-eur, .tsatir .h-stok, .tsatir .h-meta, .tsatir .h-not { grid-area: auto; }
  .tsatir .h-marka, .tsatir .h-kod, .tsatir .h-ad, .tsatir .h-yerel { display: block; }
  .tsatir .h-meta { display: none; }
  .tsatir .h-kod { color: var(--text-2); font-variant-numeric: tabular-nums; }
  .tsatir .h-ad { overflow-wrap: anywhere; }
  .tsatir .h-yerel { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
  .tsatir .h-stok { text-align: left; }
  .tsatir .h-not { grid-column: 4 / -1; }
  .tbaslik { display: grid; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); }
  .tbaslik .h-eur, .tbaslik .h-yerel { text-align: right; }
}
