/* ==========================================================================
   GEN1 Güçbirliği Connect — tasarım sistemi
   --------------------------------------------------------------------------
   GEN1 Design System — premium PropTech: gece mavisi + metalik altın + gümüş.
     Background #030B18 · Primary #06152B/#081D36/#0B2745
     Gold #C99632/#E4B84F/#F3D078 · Silver #B8BDC7/#E5E7EB · Text #FFF/#CBD5E1

   Kural: baştan sona KOYU. Lacivert kademeleri yapıyı taşır; altın kontrollü
   kullanılır — yalnızca fiyat, aktif filtre/menü, ana aksiyon, marker ve ince
   ayırıcılarda parlar (haritayı/arayüzü boğmaz). Gümüş = GEN1 markası + ikincil UI.

   Arz = altın, Talep = gümüş-mavi (mor/pembe yok), Eşleşme/değer = altın.
   Tüm sayfalar bu :root token'larını ve paylaşılan bileşen sınıflarını kullanır.
   ========================================================================== */

/* Yazı tipleri /static/fonts.css içinde tanımlıdır (base.html'de app.css'ten
   önce yüklenir), böylece broşür ve sunum sayfaları da aynı dosyayı paylaşır. */

:root {
  /* GEN1 Design System paleti (kullanıcının verdiği kesin hex'ler) */
  --navy:      #06152B;   /* Primary — header */
  --navy-2:    #081D36;   /* Primary — panel/kart yüzeyi */
  --navy-3:    #0B2745;   /* Primary — aktif iç zemin / hover */
  --gold:      #C99632;   /* Gold — altın */
  --gold-hi:   #F3D078;   /* Gold — parlak vurgu */
  --gold-mid:  #E4B84F;   /* Gold — orta */
  --gold-soft: rgba(201,150,50,.14);
  --silver:    #B8BDC7;   /* Silver */
  --silver-hi: #E5E7EB;

  /* İçerik yüzeyi */
  --paper:     #030B18;   /* Background — sayfa zemini (en koyu) */
  --card:      #081D36;   /* panel / kart */
  --sunken:    #06152B;   /* çukur / seçili satır */
  --ink:       #FFFFFF;   /* birincil metin (başlık/fiyat) */
  --ink-2:     #CBD5E1;   /* ikincil metin */
  --ink-3:     #7D8CA6;   /* düşük kontrast */
  --line:      rgba(201,150,50,.15);   /* altın saç teli ayırıcı */
  --line-2:    #143156;   /* çelik kenarlık */

  /* Piyasanın iki tarafı — altın (arz) + gümüş-mavi (talep); mor/pembe YOK */
  --arz:       #C99632;
  --arz-soft:  rgba(201,150,50,.15);
  --talep:     #7E9AC9;
  --talep-soft:rgba(126,154,201,.16);

  /* Değer anı — eşleşme (altın) */
  --match:     var(--gold-hi);
  --match-dk:  var(--gold-hi);
  --match-soft:rgba(201,150,50,.16);

  --danger:    #e26b62;
  --danger-soft:rgba(226,107,98,.14);
  --wa:        #1aa587;

  --r:    12px;
  --r-sm: 8px;
  --r-lg: 18px;

  --shadow-lg: 0 14px 44px rgba(0,0,0,.55);

  --display: "Archivo", system-ui, sans-serif;
  --sans:    "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --nav-h:  60px;
  --top-h:  62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ------------------------------------------------------------------ *
 * LIGHT TEMA — dark varsayılan kalır; kullanıcı üstteki düğmeyle geçer
 * (tercih localStorage'da). Yalnızca yüzey/metin/kenar token'ları
 * yeniden tanımlanır; --navy (header/tabbar + altın buton metni) ve altın
 * vurgular sabit kalır. --navy-2/-3 açık temada içerik yüzeyine döner.
 * ------------------------------------------------------------------ */
:root[data-theme="light"] {
  --paper:   #F4F1EA;   /* sıcak açık zemin */
  --card:    #FFFFFF;
  --sunken:  #ECE7DC;
  --ink:     #16233B;   /* koyu lacivert-mürekkep metin */
  --ink-2:   #46566E;
  --ink-3:   #8A93A4;
  --line:    rgba(201,150,50,.32);   /* altın saç teli — açıkta biraz belirgin */
  --line-2:  #E1DBCD;   /* açık kenarlık */
  --navy-2:  #F1EDE3;   /* etkileşim yüzeyi (buton/panel) */
  --navy-3:  #E8E1D3;   /* hover/aktif yüzey */
  --gold-soft:  rgba(201,150,50,.16);
  --arz-soft:   rgba(201,150,50,.16);
  --talep-soft: rgba(126,154,201,.20);
  --match-soft: rgba(201,150,50,.18);
  --danger-soft:rgba(226,107,98,.12);
  --shadow-lg:  0 12px 36px rgba(20,35,59,.14);
}
/* Header/tabbar açık temada da koyu kalır (marka çubuğu, logo kontrastı);
   koyu zeminde hover/aktif rozetlerini yarı saydam beyazla düzelt. */
:root[data-theme="light"] .nav a:hover,
:root[data-theme="light"] .bell:hover,
:root[data-theme="light"] .theme-toggle:hover { background: rgba(255,255,255,.12); color: var(--gold-hi); }
:root[data-theme="light"] .nav a[aria-current="page"] { background: rgba(255,255,255,.14); color: var(--gold-hi); }
:root[data-theme="light"] .tabbar a.active,
:root[data-theme="light"] .tabbar a[aria-current="page"] { color: var(--gold-hi); }
/* Baş harf avatarları: açık temada da lacivert kalsın (altın harf okunur olsun) */
:root[data-theme="light"] .avatar-mini,
:root[data-theme="light"] .kart-photo.is-initial,
:root[data-theme="light"] .avatar-preview.is-initial {
  background: linear-gradient(160deg, #0B2745, #06152B);
}
/* Harita katmanı açık temada: popup içi metin sabit açık renk olduğundan
   popup lacivert kalsın; kontrol ikonları ve atıf açık zemine uydurulsun. */
:root[data-theme="light"] .maplibregl-popup-content {
  background: #0B2745; color: #EAEFF7; border-color: #143156;
}
:root[data-theme="light"] .maplibregl-ctrl-group {
  background: #ffffff; border-color: #E1DBCD;
}
:root[data-theme="light"] .maplibregl-ctrl-group button:hover { background: #ECE7DC; }
:root[data-theme="light"] .maplibregl-ctrl button .maplibregl-ctrl-icon { filter: none; }
:root[data-theme="light"] .maplibregl-ctrl-attrib { background: rgba(255,255,255,.82) !important; }
:root[data-theme="light"] .maplibregl-ctrl-attrib a { color: #46566E; }
/* Harita lejantı: koyu zemin + --ink metin, açık temada zemin açık olmalı */
:root[data-theme="light"] .map-legend {
  background: rgba(255,255,255,.92);
  border-color: #E1DBCD;
  box-shadow: 0 6px 20px rgba(20,35,59,.12);
}
:root[data-theme="light"] .legend-title { color: #46566E; }
:root[data-theme="light"] .legend-row { color: #16233B; }
:root[data-theme="light"] .legend-scale { color: #8A93A4; }

/* Tema geçiş düğmesi (header) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  color: #cfd6e2; flex: 0 0 auto; transition: background .14s, color .14s;
}
.theme-toggle:hover { background: var(--navy-2); color: var(--gold-hi); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .ic-moon { display: none; }
.theme-toggle .ic-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .ic-sun  { display: none; }
:root[data-theme="light"] .theme-toggle .ic-moon { display: block; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ------------------------------------------------------------ tipografi -- */

/* font-stretch, 'wdth' ile birlikte yazılır: Google Fonts genişlik eksenini ayrı
   @font-face'lere böler (font-stretch 100% ve 125%). font-variation-settings tek
   başına yüz seçimini etkilemediği için tarayıcı dar kesimi yüklüyor ve genişletme
   hiç uygulanmıyordu. font-stretch doğru yüzü seçtirir. Bkz. docs/yazi-tipleri.md */

h1 {
  font-family: var(--display);
  font-stretch: 125%; font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: clamp(23px, 6vw, 30px);
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 0 6px;
  text-transform: none;
}

h2 {
  font-family: var(--display);
  font-stretch: 125%; font-variation-settings: "wdth" 125;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0;
  margin: 0 0 10px;
}

.sub { color: var(--ink-2); font-size: 14px; margin: 0; }

.notation {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* -------------------------------------------------------- demo bandı --- */

.demo-strip {
  background: repeating-linear-gradient(135deg, rgba(201,150,50,.13) 0 12px, rgba(201,150,50,.22) 12px 24px);
  color: var(--gold-hi);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
  padding: 5px 10px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: none;
  z-index: 60;
}

/* ------------------------------------------------------------- üst bar -- */
/* Kabuk laciverttir — logo buraya aittir. */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--top-h);
  padding: 0 16px;
  background: var(--navy);
  border-bottom: 1px solid var(--navy-3);
  position: sticky;
  top: 0;
  z-index: 50;
  color: #eef0f4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-inline-end: auto;
  line-height: 1;
}

/* GEN1: gümüş GEN + altın 1 — logodaki ikili doku */
.brand-gen {
  font-family: var(--display);
  font-stretch: 125%; font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .02em;
  color: var(--silver);
}
.brand-gen b { color: var(--gold-hi); font-weight: 700; }

.brand-sub {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  display: none;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--silver);
  white-space: nowrap;
}
.user-chip .who {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Logo görseli — koyu kare JPEG; header laciverti aynı olduğu için kenar görünmez */
.brand-logo { height: 50px; width: auto; display: block; border-radius: 6px; }

/* Kullanıcı profili: ad + rol + altın halkalı avatar */
.user-profile { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.up-text { display: none; text-align: right; line-height: 1.16; }
.up-text .who {
  max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  color: var(--silver); font-weight: 600; font-size: 13.5px; display: block;
}
.up-role {
  color: var(--gold); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.avatar-mini {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, var(--navy-3), var(--navy));
  color: var(--gold-hi); font-family: var(--display);
  font-stretch: 125%; font-variation-settings: "wdth" 125; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(201,150,50,.3);
}
.avatar-mini img { width: 100%; height: 100%; object-fit: cover; }

.linkish {
  background: none;
  border: 0;
  padding: 6px 2px;
  color: var(--silver);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.linkish:hover { color: var(--gold-hi); }

.topbar .nav { display: none; }

/* ------------------------------------------------- alt sekme (mobil) --- */

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--navy);
  border-top: 1px solid var(--navy-3);
  padding-bottom: var(--safe-b);
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--nav-h);
  text-decoration: none;
  color: #71809c;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .01em;
  position: relative;
}
.tabbar a svg { width: 21px; height: 21px; stroke-width: 1.75; }
.tabbar a[aria-current="page"] { color: var(--gold-hi); }
.tabbar a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0;
  width: 26px;
  height: 2.5px;
  background: var(--gold);
  border-radius: 0 0 3px 3px;
}

.tabbar .tab-badge {
  position: absolute;
  top: 6px;
  margin-inline-start: 22px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
}

/* -------------------------------------------------------------- düzen -- */

.page {
  padding: 20px 16px calc(var(--nav-h) + var(--safe-b) + 28px);
  max-width: 900px;
  margin-inline: auto;
}

.page-head { margin-bottom: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.card-pad { padding: 18px 16px; }

/* ------------------------------------------------------------ butonlar -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--navy-2);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .06s ease;
}
.btn:hover { border-color: var(--gold); background: var(--navy-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Ana aksiyon: solid altın CTA (navy metin) — premium imza */
.btn-primary, .btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-color: var(--gold);
  color: var(--navy);
}
.btn-primary:hover, .btn-gold:hover {
  background: var(--gold-hi); border-color: var(--gold-hi);
  box-shadow: 0 0 18px rgba(201,150,50,.35);
}

.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--navy-2); color: var(--gold-hi); }

.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-wa:hover { background: #0d6f63; }

.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }

/* --------------------------------------------------------------- form -- */

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}

input[type=text], input[type=tel], input[type=number], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  appearance: none;
}
input[type=number] { font-family: var(--mono); }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B8BDC7' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 13px center;
  padding-inline-start: 34px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(202,157,76,.18);
}

textarea { resize: vertical; min-height: 88px; font-size: 16px; }

.row { display: grid; gap: 14px; }

.hint { font-size: 12.5px; color: var(--ink-3); margin: 7px 0 0; }

.err {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 11px 13px;
  border-radius: var(--r-sm);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Arz / Talep seçici */
.seg { display: grid; gap: 10px; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg label {
  margin: 0;
  padding: 14px 16px 14px 46px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  position: relative;
  transition: border-color .14s, background .14s;
}
.seg label small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 2px;
}
.seg label::before {
  content: "";
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--card);
}
#k-supply:checked + label { border-color: var(--arz); background: var(--arz-soft); }
#k-supply:checked + label::before { border-color: var(--arz); background: var(--arz); box-shadow: inset 0 0 0 3px var(--arz-soft); }
#k-demand:checked + label { border-color: var(--talep); background: var(--talep-soft); }
#k-demand:checked + label::before { border-color: var(--talep); background: var(--talep); box-shadow: inset 0 0 0 3px var(--talep-soft); }
.seg input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }

/* İlçe çipleri */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  -webkit-overflow-scrolling: touch;
}
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-block;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  background: var(--paper);
  transition: background .12s, border-color .12s;
}
.chip input:checked + span {
  background: var(--talep);
  border-color: var(--talep);
  color: #fff;
}
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.chips-empty { color: var(--ink-3); font-size: 13.5px; padding: 6px 2px; }

.selected-list { display: flex; flex-wrap: wrap; gap: 8px; }

.sel-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  background: var(--talep-soft);
  border: 1px solid var(--talep);
  color: var(--talep);
  font-size: 13.5px;
  line-height: 1.2;
}
.sel-pill b { font-weight: 600; }
.sel-pill small { font-family: var(--mono); font-size: 10.5px; opacity: .75; }
.sel-pill button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--talep);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex: none;
}
.sel-pill button:hover { background: var(--danger); }

/* --------------------------------------------------------------- giriş -- */
/* Giriş tam kabuktur: lacivert zemin, logodaki sahne. */

body.auth-body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
}
body.auth-body > main { flex: 1; display: flex; }

.auth-wrap {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 28px;
  padding: 28px 20px calc(28px + var(--safe-b));
  max-width: 460px;
  width: 100%;
  margin-inline: auto;
}

.auth-inner { align-self: center; width: 100%; }

/* Gerçek GEN1 logosu — koyu zeminli JPEG. Sayfa da lacivert olduğu için
   logonun kare kenarı görünmez; altındaki radial glow altını sayfaya bağlar. */
.auth-logo {
  display: block;
  width: 176px;
  max-width: 52%;
  margin: 0 0 18px;
  position: relative;
}
.auth-logo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}
/* Logonun altın vurgusunu sayfaya taşıyan yumuşak halo */
.auth-logo::after {
  content: "";
  position: absolute;
  inset: 12% 8% -10%;
  z-index: -1;
  background: radial-gradient(ellipse at center,
              rgba(240,194,100,.14), transparent 62%);
  pointer-events: none;
}

.auth-lede {
  font-size: 16.5px;
  line-height: 1.45;
  color: var(--silver);
  margin: 0 0 26px;
}
.auth-lede b { color: #eef0f4; font-weight: 600; }

/* Giriş kartı: koyu zemin üstünde açık çalışma yüzeyi — kabuk/içerik
   ilişkisinin ilk karesi */
.auth-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-lg);
}

.auth-foot {
  font-size: 12.5px;
  color: #5d6b85;
  text-align: center;
  padding-top: 20px;
}

.code-input {
  font-family: var(--mono) !important;
  letter-spacing: .42em;
  font-size: 24px !important;
  text-align: center;
  padding: 13px !important;
}

.devbox {
  background: var(--gold-soft);
  border: 1px dashed var(--gold);
  color: var(--gold-hi);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 13px;
  margin-bottom: 16px;
}
.devbox b { font-family: var(--mono); font-size: 18px; letter-spacing: .14em; }

/* -------------------------------------------------------------- harita -- */

body.map-body {
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.map-body .topbar { position: static; flex: none; }
body.map-body > main { flex: 1; min-height: 0; display: flex; }

.map-layout { flex: 1; min-height: 0; position: relative; }

#map { position: absolute; inset: 0; }

.sheet {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 5;
  background: var(--card);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  max-height: 78%;
  height: calc(var(--nav-h) + var(--safe-b) + 168px);
  display: flex;
  flex-direction: column;
  transition: height .26s cubic-bezier(.32,.72,0,1);
}
.sheet.open { height: 78%; }

.sheet-grip {
  padding: 9px 0 5px;
  display: grid;
  place-items: center;
  cursor: grab;
  flex: none;
  touch-action: none;
}
.sheet-grip::before {
  content: "";
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 16px 11px;
  flex: none;
}
.sheet-count { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

/* Katman anahtarları */
.layer-toggles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 2px 16px 12px;
  flex: none;
}
.layer input { position: absolute; opacity: 0; width: 0; height: 0; }
.layer-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  cursor: pointer;
  user-select: none;
  transition: border-color .14s, background .14s, opacity .14s;
}
.layer-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
  background: var(--line-2);
  transition: background .14s, box-shadow .14s;
}
.layer[data-side="talep"] .layer-dot { border-radius: 3px; }
.layer[data-side="takas"] .layer-dot { border-radius: 2px; transform: rotate(45deg); }
.layer-name { font-size: 14px; font-weight: 600; flex: 1; color: var(--ink); }
.layer-count { font-size: 12.5px; color: var(--ink-3); }

/* Nokta rengi kategoriyi belirtir (arz=altın, talep=gümüş-mavi, takas=altın baklava) */
.layer[data-side="arz"]   .layer-dot { background: var(--arz); }
.layer[data-side="talep"] .layer-dot { background: var(--talep); }
.layer[data-side="takas"] .layer-dot { background: var(--gold); }

/* Aktif filtre: altın kenarlık + kontrollü altın glow (tüm sekmelerde tutarlı) */
.layer input:checked + .layer-box {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 0 0 1px rgba(201,150,50,.35), 0 0 16px rgba(201,150,50,.18);
}
.layer input:checked + .layer-box .layer-count { color: var(--gold-hi); }
.layer input:not(:checked) + .layer-box { opacity: .6; }
.layer input:focus-visible + .layer-box { outline: 2px solid var(--gold); outline-offset: 2px; }

.map-filters {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  flex: none;
  scrollbar-width: none;
}
.map-filters::-webkit-scrollbar { display: none; }
.map-filters select {
  min-height: 38px;
  width: auto;
  flex: none;
  font-size: 14px;
  padding: 7px 12px 7px 30px;
  background-position: left 10px center;
  border-radius: 999px;
}

.map-results {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}

/* --- Görünüm geçişi: Harita ↔ Liste (sahibinden tarzı) --- */
.view-toggle {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  padding: 3px;
  box-shadow: var(--shadow-lg);
}
.view-toggle button {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: 100px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .14s, color .14s;
}
.view-toggle button.on { background: var(--gold-soft); color: var(--gold-hi); }

/* Liste modu: haritayı gizle, sonuçları tam genişlik galeri-grid yap */
body.list-mode #map { display: none; }
body.list-mode .map-legend { display: none !important; }
body.list-mode .view-toggle { top: 10px; }
body.list-mode .map-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
  padding: 14px;
  align-content: start;
}
/* Grid hücresinde kartlar tam yükseklik, ayırıcı çizgi yerine kutu */
body.list-mode .result-item {
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--sunken);
}

/* Mobil: liste modunda alt-çekmece tüm alanı kaplar */
body.list-mode .sheet {
  position: absolute;
  inset: 0;
  height: auto;
  max-height: none;
  border-radius: 0;
  padding-top: 46px;   /* üstteki yüzen geçiş düğmesi için pay */
}
body.list-mode .sheet-grip { display: none; }

/* Mobil HARİTA modu: alttaki liste alanı kaldırıldı (kullanıcı isteği).
   Alt çekmece yalnızca katman anahtarları + filtreleri gösterir; ilan listesi
   sadece yukarıdaki "Liste" görünümüne geçilince açılır. */
@media (max-width: 819px) {
  body:not(.list-mode) .map-results { display: none; }
  body:not(.list-mode) .sheet {
    height: auto;
    max-height: 46%;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  body:not(.list-mode) .sheet-grip { display: none; }
  body:not(.list-mode) .map-filters { padding-bottom: calc(12px + var(--safe-b)); }
}

.result-item {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  /* Kart artık bir bağlantı (klavye erişimi + orta tıkla yeni sekme için);
     link alt çizgisi taşımasın, metin rengini kendi sınıflarından alsın. */
  text-decoration: none;
  color: inherit;
}
.result-item:hover { background: var(--navy-3); }
.result-item.active { background: var(--navy-3); box-shadow: inset 3px 0 0 var(--gold); }

.result-rail {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  flex: none;
  background: var(--arz);
}
.result-item[data-kind="demand"] .result-rail { background: var(--talep); }

/* Fotoğraf placeholder — ilanların çoğunda foto yok; line-icon bina */
.result-thumb {
  width: 104px;
  height: 78px;
  flex: none;
  border-radius: var(--r-sm);
  background: linear-gradient(160deg, var(--navy-3), var(--navy-2));
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--silver);
}
.result-thumb svg { width: 24px; height: 24px; }
.result-item[data-kind="supply"] .result-thumb { color: var(--gold); }
.result-item[data-kind="demand"] .result-thumb { color: var(--talep); }
.result-thumb-img { object-fit: cover; padding: 0; }

/* Hesap sayfası: kartlar tek tip yığın halindeydi, giriş noktası yoktu.
   Bölüm başlığı gruplama verir; .acc-card tekrar eden inline margin'i bitirir. */
.sec-head {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold-mid);
  margin: 26px 0 10px;
}
.sec-head:first-of-type { margin-top: 6px; }
.acc-card { margin-bottom: 16px; }

/* Bilgi kutusu — hata değil (ör. yeni kayıt adımı). .err ile aynı yerde durur. */
.err.notice {
  color: var(--gold-hi);
  background: var(--gold-soft);
  border-color: var(--gold);
}

/* Fiyatı paylaşılmamış ilan — altın vurgu yalnız gerçek fiyata ayrılır */
.result-price.result-price-ask { color: var(--ink-3); font-family: var(--sans); font-weight: 600; font-size: 14px; }
.detail-price-ask {
  font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink-2);
}
.detail-price-ask span {
  display: block; font-family: var(--sans); font-weight: 400;
  font-size: 13px; color: var(--ink-3); margin-top: 3px;
}

/* Fotoğrafsız ilan kapağı — üretilen mimari çizim (services/art) */
.photo-cover { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-2); }
/* Çizim bir fotoğraf değil; kırpmak yerine tamamı görünsün. Kutu zemini
   çizimin kendi gökyüzü rengiyle aynı olduğu için kenarlar dikişsiz kapanır. */
.photo-cover { background: #050F22; }
.photo-cover img {
  display: block; width: 100%; height: clamp(190px, 32vw, 290px);
  object-fit: contain;
}
/* Gerçek fotoğraf yüklendiğinde normal kırpma davranışı geri gelir */
.photo-strip .photo img { object-fit: cover; }
.photo-cover-tag {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(3,11,24,.8); color: var(--gold-hi); border: 1px solid var(--line);
  border-radius: 100px; padding: 5px 12px; font-size: 11.5px; font-weight: 700;
}
.photo-cover-cta { position: absolute; right: 12px; bottom: 12px; min-height: 38px; padding: 8px 14px; }

.result-body { flex: 1; min-width: 0; }
/* Başlık üstte — 2 satıra kadar sarar (mobilde kırpılıp okunmaz kalmasın) */
.result-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Fiyat başlığın hemen altında — belirgin altın */
.result-price {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 16px;
  margin-top: 3px;
  color: var(--gold-hi);   /* fiyatlar altın — premium imza */
}
.result-loc {
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12.5px;
  margin-top: 4px;
}
.result-meta {
  color: var(--ink-3);
  font-size: 12.5px;
  margin-top: 2px;
}

/* --------------------------------------------------------------- rozet -- */

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.tag-arz   { background: var(--arz-soft);   color: var(--arz); }
.tag-talep { background: var(--talep-soft); color: var(--talep); }
.tag-muted { background: var(--sunken);     color: var(--ink-2); }

/* ======================================================================
   İMZA — eşleşme kartı
   İki ilan dikey dikişle birleşir; skor birleşme noktasında ALTINDIR.
   Altın bu arayüzde tek bir anlam taşır: değer üretildi.
   ====================================================================== */

.match {
  border-top: 1px solid var(--line);
  padding: 18px 16px 16px 14px;
}
.match:first-child { border-top: 0; }

.match-pair {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 12px;
}

.seam {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
}
.seam-line { width: 3px; border-radius: 2px; align-self: stretch; }
.seam-line.top    { background: var(--arz); }
.seam-line.bottom { background: var(--talep); }
.match[data-mine="demand"] .seam-line.top    { background: var(--talep); }
.match[data-mine="demand"] .seam-line.bottom { background: var(--arz); }

.seam-score {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -.03em;
  margin: 5px 0;
  box-shadow: 0 0 0 4px var(--card);
}

/* Eşleşme yarısı: küçük görsel + gövde. İki yaka aynı yapıda olur ki
   ortadaki "dikiş" gerçekten iki benzer bloğu birleştiriyor gibi dursun. */
.half-thumb {
  width: 62px; height: 48px; flex: none; border-radius: var(--r-sm);
  object-fit: cover; border: 1px solid var(--line-2); background: var(--sunken);
}
.half-body { flex: 1; min-width: 0; }
a.half-title { text-decoration: none; color: inherit; display: block; }
a.half-title:hover { color: var(--gold-hi); }

.half { padding-bottom: 12px;   display: flex;
  gap: 12px;
  align-items: flex-start;
}
.half:last-child { padding-bottom: 0; padding-top: 12px; }

.half-label { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.half-who { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

.half-title { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.half-meta { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.half-meta .notation { color: var(--ink); font-weight: 500; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--sunken);
  color: var(--ink-2);
}

.match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-inline-start: 46px;
}
.match-actions .btn { flex: 1 1 150px; }
/* Dar ekranda 46px'lik dekoratif girinti satırın %15'ini yiyordu */
@media (max-width: 560px) {
  .match-actions { padding-inline-start: 0; }
  .match-actions .btn { flex: 1 1 100%; }

  /* Telefonda 10px mikro etiketler okunmuyordu; kol mesafesinde bunlar
     rahat seçilsin diye biraz büyütülür. Masaüstünde ölçü aynı kalır. */
  .demo-strip { font-size: 11.5px; }
  .up-role { font-size: 11.5px; }
}

/* Sekme çubuğu Broşür ile altı sekmeye çıktı. 360 px ve üstünde etiketler
   normal ölçüsüyle sığıyor (en uzunu "Eşleşmeler" ~54 px, kutu ~60 px); yalnızca
   bunun altındaki ekranlarda (SE gibi 320 px) bir tık küçülür. Sınır 380 px iken
   375 px'lik yaygın telefonları da gereksiz yere küçültüyordu. */
@media (max-width: 350px) {
  .tabbar a { font-size: 9.5px; letter-spacing: 0; }
  .tabbar a svg { width: 19px; height: 19px; }
}

.contact-box {
  margin-top: 12px;
  margin-inline-start: 46px;
  padding: 11px 13px;
  background: var(--match-soft);
  border: 1px solid var(--gold);
  border-radius: var(--r-sm);
  font-size: 14px;
}
.contact-box .notation { font-weight: 600; }

/* ----------------------------------------------------------- liste satırı -- */

.list-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border-top: 1px solid var(--line);
}
.list-row:first-child { border-top: 0; }
.list-grow { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- boş -- */

.empty {
  padding: 52px 24px;
  text-align: center;
  color: var(--ink-3);
}
.empty p { margin: 0 0 18px; font-size: 15px; line-height: 1.5; }

.skeleton { padding: 20px 16px; display: grid; gap: 12px; }
.skeleton i {
  display: block;
  height: 13px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--sunken) 25%, var(--navy-3) 50%, var(--sunken) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
.skeleton i:nth-child(2n) { width: 62%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* -------------------------------------------------------------- toast -- */

.toast {
  position: fixed;
  inset-inline: 16px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  z-index: 100;
  background: var(--navy);
  color: #f2f4f8;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.toast.err-toast { background: var(--danger); }

.sticky-submit {
  position: sticky;
  bottom: calc(var(--nav-h) + var(--safe-b));
  background: linear-gradient(to top, var(--paper) 62%, transparent);
  padding: 16px 0 6px;
  margin-top: 8px;
}

/* ======================================================================
   Geniş ekran
   ====================================================================== */

@media (min-width: 820px) {
  .tabbar { display: none; }

  .topbar { height: 76px; padding: 0 24px; gap: 26px; }
  .topbar .nav { display: flex; gap: 4px; flex: 1; }

  .nav a {
    padding: 8px 13px;
    border-radius: var(--r-sm);
    text-decoration: none;
    color: var(--silver);
    font-weight: 500;
    font-size: 14.5px;
    position: relative;
  }
  .nav a:hover { background: var(--navy-2); color: #eef0f4; }
  .nav a[aria-current="page"] { background: var(--navy-3); color: var(--gold-hi); }

  .nav .pill {
    display: inline-block;
    min-width: 19px;
    padding: 1px 6px;
    margin-inline-start: 5px;
    border-radius: 9px;
    background: var(--gold);
    color: var(--navy);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
  }

  .brand { margin-inline-end: 0; }
  .brand-sub { display: block; }
  .user-chip .who { max-width: none; }
  .brand-logo { height: 62px; }
  .up-text { display: block; }

  .page { padding: 32px 24px 64px; }
  .card-pad { padding: 24px; }

  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-3 { grid-template-columns: 1fr 1fr 1fr; }
  .seg { grid-template-columns: 1fr 1fr; }

  .toast { inset-inline: auto; left: 50%; transform: translateX(-50%); bottom: 26px; }
  .sticky-submit { position: static; background: none; padding: 0; margin-top: 20px; }
  .btn-block { width: auto; min-width: 200px; }

  .map-layout { display: grid; grid-template-columns: 380px 1fr; }

  /* Liste modu (masaüstü): harita gizli, liste tam genişlik galeri */
  body.list-mode .map-layout { grid-template-columns: 1fr; }
  body.list-mode .sheet { border-inline-end: none; padding-top: 50px; }
  body.list-mode .map-results {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    padding: 18px 24px 40px;
  }

  .sheet {
    position: static;
    height: auto;
    max-height: none;
    border-radius: 0;
    border-inline-end: 1px solid var(--line);
    box-shadow: none;
    transition: none;
  }
  .sheet-grip { display: none; }
  .sheet-head { padding: 16px 18px 12px; }
  .layer-toggles { padding: 0 18px 12px; }
  .map-filters { padding: 0 18px 14px; flex-wrap: wrap; overflow: visible; }
  .map-results { padding-bottom: 0; }

  .match { padding: 20px 24px 18px; }
  .match-pair { grid-template-columns: 36px 1fr; column-gap: 16px; }
  .seam-score { width: 36px; height: 36px; font-size: 12.5px; }
  .match-actions { padding-inline-start: 52px; justify-content: start; }
  .match-actions .btn { min-width: 150px; }
  .contact-box { margin-inline-start: 52px; }

  .auth-wrap { max-width: 480px; }
  .auth-logo { width: 200px; }
}

/* ======================================================================
   v2 ekleri — fotoğraf, detay, paylaşım, bildirim, zil
   ====================================================================== */

/* Zil */
.bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--silver);
  text-decoration: none;
}
.bell:hover { background: var(--navy-2); color: var(--gold-hi); }
.bell svg { width: 20px; height: 20px; }
.bell-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}
.user-chip .who { text-decoration: none; }
.user-chip .who:hover { color: var(--gold-hi); }

/* Onay satırı */
.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.check-line input {
  width: 20px;
  height: 20px;
  min-height: 0;
  accent-color: var(--gold);
}

/* Altın rozet — işbirliği */
.tag-gold { background: var(--match-soft); color: var(--match-dk); }

/* Fotoğraf şeridi */
.photo-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: var(--r);
}
.photo-strip::-webkit-scrollbar { display: none; }
.photo {
  position: relative;
  flex: none;
  margin: 0;
  width: 78%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--sunken);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-del {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(2,13,36,.72);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}
.photo-empty {
  padding: 22px 16px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r);
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
  background: var(--card);
}

/* Detay */
.detail-price { font-size: 26px; font-weight: 700; margin-bottom: 12px; color: var(--gold-hi); }
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.fact {
  background: var(--paper);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  display: grid;
  gap: 2px;
}
.fact span { font-size: 11.5px; color: var(--ink-3); }
.fact b { font-size: 14px; font-weight: 600; }
.detail-desc {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-line;
}
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Liste kapak görseli */
.list-row { text-decoration: none; color: inherit; }
.list-thumb {
  width: 56px;
  height: 44px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex: none;
  background: var(--sunken);
}
.list-thumb-empty {
  display: block;
  background:
    linear-gradient(135deg, var(--sunken) 45%, var(--line) 45% 55%, var(--sunken) 55%);
}

/* Harita filtre sayı girişleri */
.map-filters .f-num {
  min-height: 38px;
  width: 92px;
  flex: none;
  font-size: 13.5px;
  padding: 7px 10px;
  border-radius: 999px;
  background-image: none;
}

/* Sonuç satırından detaya ok */
.result-go {
  align-self: center;
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  color: var(--ink-3);
  font-size: 16px;
}
.result-go:hover { background: var(--sunken); color: var(--ink); }

/* Bildirim listesi */
.notif {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.notif:first-child { border-top: 0; }
.notif:hover { background: var(--paper); }
.notif b { display: block; font-size: 14.5px; }
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--line-2);
}
.notif.unread .notif-dot { background: var(--gold); box-shadow: 0 0 0 3px var(--match-soft); }
.notif.unread b { color: var(--ink); }
.notif-time { flex: none; font-size: 11.5px; color: var(--ink-3); }

/* Paylaşım sayfası */
.share-card { padding: 0; overflow: hidden; }
.share-card > *:not(.share-photo) { margin-inline: 20px; }
.share-card > .half-label { margin-top: 18px; }
.share-card > .btn { margin-bottom: 4px; width: calc(100% - 40px); }
.share-card > .hint { margin-bottom: 18px; }
.share-card > h1 { margin-inline: 20px; }
.share-photo { margin: 0 0 16px; aspect-ratio: 16 / 10; background: var(--sunken); }
.share-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (min-width: 820px) {
  .photo { width: 300px; }
  .facts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ======================================================================
   v5 ekleri — takas, iletişim, notlar, süre, kartvizit
   ====================================================================== */

/* Takas şartları kutusu */
.takas-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--sunken);
  border-inline-start: 3px solid var(--gold);
}
.takas-box p { margin: 4px 0 0; font-size: 14.5px; }

/* İletişim kartı (detay) */
.contact-card .contact-name { font-size: 15.5px; font-weight: 600; }

/* Süre uyarısı / bilgisi */
.expiry-ok {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}
.expiry-warn {
  border: 1px solid var(--gold);
  background: var(--gold-soft);
}
.expiry-warn p { font-size: 14.5px; }

/* Özel notlar */
.note-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--paper);
  margin-bottom: 8px;
}
.note-item p { margin: 0; flex: 1; font-size: 14.5px; line-height: 1.45; white-space: pre-line; }
.note-del {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--ink-3);
  font-size: 15px;
  cursor: pointer;
  flex: none;
}
.note-del:hover { background: var(--danger-soft); color: var(--danger); }

/* İlanlarım süre rozeti */
.days-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--sunken);
  color: var(--ink-2);
}
.days-badge.soon { background: var(--gold-soft); color: var(--match-dk); }

/* Dijital kartvizit */
/* Dijital kartvizit — koyu lacivert zemin üstünde açık kart, üstte altın
   şeritli hero ve ortaya taşan yuvarlak fotoğraf. */
.kart {
  text-align: center;
  padding: 0 22px 22px;
  overflow: hidden;
  position: relative;
}
.kart-hero {
  height: 92px;
  margin: 0 -22px 0;
  background:
    radial-gradient(120% 140% at 50% -40%, rgba(240,194,100,.30), transparent 60%),
    linear-gradient(160deg, var(--navy-3), var(--navy));
}
.kart-photo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  margin: -56px auto 14px;
  position: relative;
  background: var(--card);
  padding: 4px;
  box-shadow: 0 0 0 2px var(--gold), 0 8px 20px rgba(2,13,36,.28);
}
.kart-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.kart-photo.is-initial {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--navy-2), var(--navy));
}
.kart-photo.is-initial span {
  color: var(--gold-hi);
  font-family: var(--display);
  font-stretch: 125%; font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
}
.kart-name { font-size: 24px; margin: 0 0 2px; }
.kart-role { color: var(--ink-2); font-size: 14px; margin: 0; }
.kart-org  { color: var(--ink-3); font-size: 13.5px; margin: 3px 0 0; }
.kart-stat {
  display: inline-block;
  margin: 12px auto 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--match-dk);
  font-size: 13px;
  font-weight: 600;
}
.kart-actions { display: grid; gap: 8px; margin-top: 20px; }
.kart-share { display: block; margin: 14px auto 0; }
.kart-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px auto 2px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  width: 100%;
  justify-content: center;
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: .01em;
}
.kart-brand img { border-radius: 6px; display: block; }
.kart-brand b { color: var(--ink-2); font-weight: 700; }

/* Hesap sayfası — profil fotoğrafı düzenleme */
.avatar-edit {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.avatar-preview {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  flex: none;
  background: var(--sunken);
  box-shadow: 0 0 0 2px var(--gold);
  overflow: hidden;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-preview.is-initial {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--navy-2), var(--navy));
}
.avatar-preview.is-initial span {
  color: var(--gold-hi);
  font-family: var(--display);
  font-stretch: 125%; font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
}
.avatar-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-controls label.btn { cursor: pointer; }

/* ---------------------------------------------------------- admin panel -- */
.admin-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-tab {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink-2); font-weight: 600; font-size: 14px;
  cursor: pointer; font-family: inherit;
}
.admin-tab.active { background: var(--navy); color: var(--gold-hi); border-color: var(--navy); }
.admin-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-toolbar[hidden] { display: none; }
.admin-toolbar input, .admin-toolbar select {
  padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-family: inherit; font-size: 14px; background: var(--card); color: var(--ink);
}
.admin-toolbar input { flex: 1; min-width: 160px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line);
  vertical-align: top; white-space: nowrap;
}
.admin-table th {
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); background: var(--sunken); position: sticky; top: 0;
}
.admin-table td a { color: var(--ink); font-weight: 600; }
.admin-sub { color: var(--ink-3); font-size: 11.5px; white-space: normal; }
.admin-empty { text-align: center; color: var(--ink-3); padding: 26px 12px; }
.tag-muted { background: var(--sunken); color: var(--ink-2); }

/* ------------------------------------------------ harita kontrolleri (dark) -- */
.maplibregl-ctrl-group {
  background: var(--navy-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
  overflow: hidden;
}
/* Seçici bilerek iki sınıflı: maplibre-gl.css bu blok'tan SONRA yükleniyor
   (harita şablonlarının {% block head %}'inde) ve kendi
   `.maplibregl-ctrl-group button { width:29px; height:29px }` kuralı eşit
   özgüllükte olduğu için buradaki 38px hiç uygulanmıyordu. Fazladan
   .maplibregl-ctrl özgüllüğü (0,3,1) yapıp niyeti geri getirir.
   Dokunmatikte hedef 44px'e çıkar — harita tek elle, sahada kullanılıyor. */
.maplibregl-ctrl.maplibregl-ctrl-group button {
  background: transparent; width: 38px; height: 38px;
}
@media (pointer: coarse) {
  .maplibregl-ctrl.maplibregl-ctrl-group button { width: 44px; height: 44px; }
}
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line-2); }
.maplibregl-ctrl-group button:hover { background: var(--navy-3); }
/* Koyu zeminde ikonlar görünsün: koyu SVG'leri açık gümüşe çevir */
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(82%) brightness(1.1); }
.maplibregl-popup-content {
  background: var(--navy-2);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
}
.maplibregl-popup-close-button { color: var(--ink-3); font-size: 18px; padding: 2px 7px; }
.maplibregl-popup-close-button:hover { color: var(--gold-hi); background: transparent; }
.maplibregl-popup-tip { display: none; }
.maplibregl-ctrl-attrib { background: rgba(3,11,24,.72) !important; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib a { color: var(--ink-3); }

/* --------------------------------------------------------- harita lejantı -- */
.map-legend {
  position: absolute;
  right: 16px; bottom: 16px;
  z-index: 5;
  display: none;
  min-width: 176px;
  padding: 12px 14px;
  background: rgba(8,29,54,.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
}
.legend-title { color: var(--silver); font-family: var(--display); font-weight: 600; font-size: 12.5px; margin-bottom: 6px; }
.legend-row { display: flex; align-items: center; gap: 9px; padding: 2px 0; color: var(--ink); }
.legend-dot { width: 11px; height: 11px; flex: none; }
.dot-arz   { background: var(--arz); border-radius: 50%; }
.dot-talep { background: var(--talep); border-radius: 3px; }
.dot-takas { background: var(--gold); border-radius: 2px; transform: rotate(45deg); }
.legend-grad { height: 8px; border-radius: 4px; margin-top: 4px;
  background: linear-gradient(90deg, rgba(201,150,50,.12), var(--gold-mid), var(--gold-hi)); }
.legend-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }
@media (min-width: 820px) { .map-legend { display: block; } }
