/* ═══════════════════════════════════════════════════════════
   QR EMLAK – style.css
   Design: Deep Navy Blue (#0A1628) + Electric Blue (#1565C0)
   Font: Plus Jakarta Sans + DM Sans
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:          #0A1628;
  --bg2:         #0F1F3D;
  --bg3:         #162447;
  --card:        #112240;
  --card2:       #1A2F55;
  --border:      rgba(255,255,255,0.07);
  --primary:     #DB2777;
  --primary-h:   #EC4899;
  --primary-l:   #F472B6;
  --accent:      #42A5F5;
  --accent2:     #6366F1;
  --success:     #00C896;
  --warn:        #FFB300;
  --danger:      #F44336;
  --text:        #E8EDF5;
  --text2:       #8FA3C0;
  --text3:       #5A7A9F;
  --plight:      #F472B6;   /* YENİ: --primary-l ile aynı ton, kodun geri kalanı bu adı bekliyor */
  --ok:          #00C896;   /* YENİ: --success ile aynı ton, kodun geri kalanı bu adı bekliyor */
  --white:       #FFFFFF;
  --shadow:      0 8px 32px rgba(0,0,0,0.45);
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.3);
  --r4:          4px;
  --r8:          8px;
  --r12:         12px;
  --r16:         16px;
  --r24:         24px;
  --r50:         50px;
  --font-main:   'Plus Jakarta Sans', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --nav-h:       68px;
  --header-h:    56px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; outline: none; background: none; font-family: inherit; }
input, select, textarea {
  font-family: inherit;
  color: var(--text);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r8);
  padding: 10px 14px;
  width: 100%;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-l); }
select option { background: var(--bg3); }
textarea { resize: vertical; }
a { color: var(--primary-l); text-decoration: none; }

.hidden { display: none !important; }
.w100 { width: 100%; }
.mt16 { margin-top: 16px; }

/* ═══ SPLASH ═══ */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  animation: splashFade 0.4s ease 1.8s forwards;
}
@keyframes splashFade { to { opacity: 0; pointer-events: none; } }
.splash-logo {
  font-family: var(--font-main);
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}
.splash-brand strong { color: var(--primary-l); }
.splash-sub { color: var(--text3); font-size: 13px; }
.splash-loader {
  width: 40px; height: 3px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 24px;
}
.splash-loader span {
  display: block; height: 100%; width: 40%;
  background: var(--primary-l);
  border-radius: 3px;
  animation: loaderSlide 1.2s ease infinite;
}
@keyframes loaderSlide { 0%{transform:translateX(-100%)} 100%{transform:translateX(350%)} }

/* ═══ APP WRAPPER ═══ */
#app { display: flex; flex-direction: column; min-height: 100vh; }

/* ═══ TOP HEADER ═══ */
.top-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(10,22,40,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.header-logo {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-logo strong { color: var(--primary-l); }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-btn {
  width: 36px; height: 36px;
  border-radius: var(--r8);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  transition: background .2s, color .2s;
  position: relative;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-main);
}
.header-btn:hover { background: var(--card); color: var(--white); }
.lang-toggle { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg);
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--white);
  cursor: pointer; font-family: var(--font-main);
  transition: transform .2s;
}
.user-avatar:hover { transform: scale(1.05); }

/* User dropdown */
.user-menu {
  position: absolute; top: 54px; right: 12px; z-index: 200;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--r12);
  min-width: 200px;
  box-shadow: var(--shadow);
  padding: 8px 0;
  animation: fadeDown .15s ease;
}
@keyframes fadeDown { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.user-menu-info { padding: 10px 16px; }
.user-menu-info span { display: block; }
#menu-username { font-weight: 700; color: var(--white); font-family: var(--font-main); }
.user-menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.user-menu button {
  display: block; width: 100%; text-align: left;
  padding: 10px 16px; color: var(--text2);
  font-size: 14px; transition: background .15s, color .15s;
}
.user-menu button:hover { background: var(--bg3); color: var(--white); }
.logout-btn { color: var(--danger) !important; }

/* ═══ SEARCH OVERLAY ═══ */
.search-overlay {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  background: rgba(10,22,40,0.98);
  backdrop-filter: blur(16px);
  padding: 12px 16px;
  animation: fadeDown .15s ease;
}
.search-bar-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border-radius: var(--r50);
  padding: 0 16px;
  border: 1px solid var(--border);
}
.search-bar-wrap svg { color: var(--text3); flex-shrink: 0; }
.search-bar-wrap input { background: none; border: none; padding: 12px 0; font-size: 15px; }
.search-bar-wrap button { color: var(--text3); font-size: 16px; transition: color .2s; flex-shrink: 0; }
.search-bar-wrap button:hover { color: var(--white); }
.search-results {
  margin-top: 12px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 60vh; overflow-y: auto;
}
.search-result-item {
  background: var(--card);
  border-radius: var(--r8);
  padding: 12px;
  display: flex; gap: 12px; align-items: center;
  cursor: pointer; transition: background .15s;
}
.search-result-item:hover { background: var(--card2); }
.search-result-img {
  width: 52px; height: 52px;
  border-radius: var(--r8); object-fit: cover;
  flex-shrink: 0; background: var(--bg3);
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-info h4 {
  font-size: 14px; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-main);
}
.search-result-info p { font-size: 12px; color: var(--text3); margin-top: 2px; }
.search-result-price { font-weight: 700; color: var(--primary-l); font-family: var(--font-main); font-size: 13px; }

/* ═══ PAGE CONTAINER ═══ */
#page-container { flex: 1; padding-top: var(--header-h); padding-bottom: calc(var(--nav-h) + 8px); }
.page { display: none; animation: pageIn .2s ease; min-height: calc(100vh - var(--header-h) - var(--nav-h)); }
.page.active { display: block; }
@keyframes pageIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.page-title {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 18px;
  padding: 16px 16px 8px;
}

/* ═══ HOME PAGE ═══ */
.hero-banner {
  background: linear-gradient(160deg, var(--primary) 0%, var(--bg2) 50%, var(--bg) 100%);
  padding: 28px 16px 24px;
  position: relative; overflow: hidden;
}
.hero-banner::before {
  content: '⬡';
  position: absolute; right: -30px; top: -30px;
  font-size: 200px; opacity: 0.04; line-height: 1;
  pointer-events: none;
}
.hero-content h1 {
  font-family: var(--font-main);
  font-size: 28px; font-weight: 800; line-height: 1.2;
  margin-bottom: 8px;
}
.hero-content h1 span { color: var(--primary-l); }
.hero-content p { color: var(--text2); font-size: 14px; margin-bottom: 20px; }
.hero-search {
  background: rgba(255,255,255,0.06);
  border-radius: var(--r12);
  padding: 12px;
  border: 1px solid var(--border);
}
.hero-search-row { display: flex; gap: 8px; margin-bottom: 8px; }
.hero-search-row:last-child { margin-bottom: 0; }
.hero-search-row select, .hero-search-row input { flex: 1; font-size: 13px; padding: 9px 12px; }
.hero-stats { display: flex; gap: 10px; margin-top: 20px; }
.stat-pill {
  flex: 1; background: rgba(255,255,255,0.06);
  border-radius: var(--r8); padding: 10px; text-align: center;
  border: 1px solid var(--border);
}
.stat-pill span {
  display: block; font-family: var(--font-main);
  font-weight: 800; font-size: 22px; color: var(--primary-l);
}
.stat-pill small { font-size: 11px; color: var(--text3); }

/* Section blocks */
.section-block { padding: 20px 16px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-main);
  font-weight: 700; font-size: 17px; color: var(--white);
  margin-bottom: 14px;
}
.see-all-btn { font-size: 13px; color: var(--primary-l); font-weight: 600; transition: opacity .2s; }
.see-all-btn:hover { opacity: 0.7; }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat-card {
  background: var(--card);
  border-radius: var(--r12);
  padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1px solid var(--border);
  transition: border-color .2s, transform .15s;
  color: var(--text2); font-size: 13px; font-weight: 500;
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.cat-icon { font-size: 24px; }

/* Listings row (horizontal scroll) */
.listings-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.listings-row::-webkit-scrollbar { display: none; }
.listing-row-card {
  min-width: 200px; background: var(--card);
  border-radius: var(--r12); overflow: hidden;
  cursor: pointer; border: 1px solid var(--border); flex-shrink: 0;
}
.listing-row-img {
  height: 110px;
  background-size: cover; background-position: center;
  position: relative;
}
.listing-row-info { padding: 8px 10px; }

/* Home map preview */
.home-map-preview {
  width: 100%; height: 220px;
  border-radius: var(--r12); overflow: hidden;
  border: 1px solid var(--border);
}

/* App footer */
.app-footer {
  padding: 20px 16px 8px;
  text-align: center;
  color: var(--text3);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.footer-store-links { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.store-badge {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r8);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  transition: background .2s;
}
.store-badge:hover { background: var(--card2); color: var(--white); }

/* ═══ LISTING CARDS ═══ */
.listings-grid {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.listing-card {
  background: var(--card);
  border-radius: var(--r12); overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.listing-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.listing-img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.listing-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.listing-card:hover .listing-img-wrap img { transform: scale(1.04); }
.listing-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--r4);
  font-family: var(--font-main);
}
.badge-sale { background: var(--primary); color: white; }
.badge-rent { background: var(--accent2); color: white; }
.listing-type-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--primary); color: var(--white);
  border-radius: var(--r4); font-size: 11px; font-weight: 700; padding: 3px 8px;
  font-family: var(--font-main); text-transform: uppercase;
}
.listing-type-badge.kiralik { background: var(--accent2); }
.fav-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: color .2s;
}
.fav-btn.active { color: #f44336; }
.qr-thumb-btn {
  position: absolute; bottom: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: var(--r4);
  background: rgba(21,101,192,.8);
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.listing-info { padding: 10px; }
.listing-price {
  font-family: var(--font-main);
  font-weight: 800; font-size: 15px; color: var(--primary-l);
}
.listing-title {
  font-size: 13px; font-weight: 600; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-main);
}
.listing-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--text3); }
.listing-agent-row { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; }
.agent-name-small { color: var(--text3); }
.qr-scan-mini { color: var(--accent); font-weight: 600; }

/* QR chip */
.qr-chip {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--primary-l); margin-top: 8px;
  background: rgba(21,101,192,0.12); border-radius: var(--r4);
  padding: 4px 8px; cursor: pointer; transition: background .2s;
  width: fit-content;
}
.qr-chip:hover { background: rgba(21,101,192,0.25); }

/* ═══ FILTER BARS ═══ */
.filter-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
  position: sticky; top: var(--header-h); z-index: 50;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar select, .filter-bar input {
  min-width: 110px; flex-shrink: 0;
  font-size: 12px; padding: 7px 10px;
}
.map-filter-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
}
.map-filter-bar::-webkit-scrollbar { display: none; }
.map-filter-bar select { min-width: 110px; font-size: 12px; padding: 7px 10px; }
.listings-count-bar { padding: 8px 16px; font-size: 12px; color: var(--text3); }

/* ═══ MAP PAGE ═══ */
.full-map {
  width: 100%;
  height: calc(100vh - var(--header-h) - var(--nav-h) - 52px);
  position: relative;
  isolation: isolate;   /* <- YENİ: Leaflet'in iç z-index'lerinin (1000'e kadar)
                            sayfanın geri kalanına asla sızmamasını garanti eder */
}
#il-map-picker,
#home-map-preview {
  position: relative;
  isolation: isolate;   /* aynı sızıntı diğer harita alanlarında da olabilir */
}

/* Header ve alt menünün her koşulda haritanın üstünde kalmasını
   ekstra güvence altına alalım */
.header, .app-header { z-index: 1000; }
.leaflet-popup-content-wrapper {
  background: var(--card2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r12) !important;
  box-shadow: var(--shadow) !important;
}
.leaflet-popup-tip { background: var(--card2) !important; }
.leaflet-popup-content { font-family: var(--font-body); font-size: 13px; }
.leaflet-popup-content strong { font-family: var(--font-main); color: var(--primary-l); }
/* Leaflet karoları global "img { max-width:100% }" kuralından etkilenmesin */
.leaflet-container img {
  max-width: none !important;
}

#il-map-picker .leaflet-marker-icon{filter:hue-rotate(190deg)}

/* ═══ LISTING DETAIL ═══ */
.detail-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  position: sticky; top: var(--header-h);
  background: var(--bg); z-index: 10;
  border-bottom: 1px solid var(--border);
}
.detail-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: var(--header-h); z-index: 10;
  background: var(--bg);
}
.detail-header-title {
  font-family: var(--font-main);
  font-weight: 700; font-size: 16px; flex: 1;
}
.back-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--primary-l); font-weight: 600; font-size: 14px;
  flex-shrink: 0;
}
.detail-actions { display: flex; gap: 8px; }
.detail-actions button {
  width: 36px; height: 36px; background: var(--card);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: 18px; transition: background .2s;
}
.detail-actions button:hover { background: var(--card2); }
.detail-gallery {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg3); overflow: hidden; position: relative;
}
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, var(--bg3), var(--card2));
}
.detail-body { padding: 16px; }
.detail-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.detail-price {
  font-family: var(--font-main);
  font-size: 26px; font-weight: 800; color: var(--primary-l);
  margin-bottom: 4px;
}
.detail-type-badge {
  background: var(--primary); color: var(--white);
  border-radius: var(--r4); font-size: 12px; font-weight: 700;
  padding: 3px 10px; font-family: var(--font-main);
}
.detail-title {
  font-family: var(--font-main);
  font-size: 19px; font-weight: 700; color: var(--white);
  margin-bottom: 4px;
}
.detail-location { font-size: 14px; color: var(--text3); margin-bottom: 16px; }
.detail-specs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 16px;
}
.spec-item {
  background: var(--card); border-radius: var(--r8);
  padding: 10px; text-align: center;
  border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.spec-item span { font-size: 18px; }
.spec-item small { font-size: 10px; color: var(--text3); }
.spec-item strong { font-size: 12px; font-weight: 700; font-family: var(--font-main); }
.spec-item .spec-val { font-family: var(--font-main); font-weight: 700; font-size: 16px; color: var(--white); }
.spec-item .spec-key { font-size: 11px; color: var(--text3); margin-top: 2px; }
.detail-section { margin-bottom: 16px; }
.detail-section h3 {
  font-family: var(--font-main);
  font-weight: 700; font-size: 15px; margin-bottom: 8px;
}
.detail-desc { font-size: 14px; line-height: 1.7; color: var(--text2); margin-bottom: 20px; }

/* Video section */
.detail-video { margin-bottom: 16px; }
.video-wrap { border-radius: var(--r12); overflow: hidden; aspect-ratio: 16/9; }
.video-wrap iframe { width: 100%; height: 100%; border: none; }

/* QR in detail */
.detail-qr-section {
  display: flex; gap: 12px;
  background: var(--card);
  border-radius: var(--r12);
  padding: 14px; margin-bottom: 16px;
  border: 1px solid var(--border);
}
.detail-qr-canvas {
  width: 90px; height: 90px; flex-shrink: 0;
  border-radius: var(--r8); overflow: hidden;
}
.detail-qr-canvas canvas, .detail-qr-canvas img { width: 90px !important; height: 90px !important; }
.qr-scan-info { font-size: 11px; color: var(--accent); text-align: center; margin-top: 4px; font-weight: 600; }
.detail-qr-right h4 { font-family: var(--font-main); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.detail-qr-right p { font-size: 12px; color: var(--text3); line-height: 1.5; }

/* Detail QR box (listing cards) */
.detail-qr-box {
  background: var(--card); border-radius: var(--r12); padding: 14px;
  border: 1px solid rgba(21,101,192,0.3); margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  transition: border-color .2s;
}
.detail-qr-box:hover { border-color: var(--primary-l); }
.detail-qr-box .qr-mini {
  width: 60px; height: 60px; flex-shrink: 0;
  border-radius: var(--r8); overflow: hidden;
  background: white; display: flex; align-items: center; justify-content: center;
}
.detail-qr-info h4 { font-family: var(--font-main); font-size: 14px; font-weight: 700; }
.detail-qr-info p { font-size: 12px; color: var(--text3); margin-top: 2px; }
.detail-qr-info .scan-count { font-size: 12px; color: var(--success); margin-top: 4px; }

/* Magnet buttons */
.magnet-panel {
  background: var(--card); border-radius: var(--r12);
  padding: 14px; border: 1px solid var(--border); margin-bottom: 16px;
}
.magnet-panel h4 { font-family: var(--font-main); font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.magnet-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.magnet-btn {
  padding: 12px 8px; border-radius: var(--r8);
  font-size: 12px; font-weight: 700; font-family: var(--font-main);
  border: 1.5px solid; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all .2s;
}
.magnet-btn span { font-size: 18px; }
.sell-btn  { border-color: var(--primary); color: var(--primary-l); background: rgba(21,101,192,.1); }
.rent-btn  { border-color: var(--accent2); color: var(--accent); background: rgba(0,119,182,.1); }
.expert-btn{ border-color: var(--warn); color: var(--warn); background: rgba(255,179,0,.1); }
.contact-btn{ border-color: var(--success); color: var(--success); background: rgba(0,200,150,.1); }
.sell-btn:hover  { background: var(--primary); color: white; }
.rent-btn:hover  { background: var(--accent2); color: white; }
.expert-btn:hover{ background: var(--warn); color: #0a1628; }
.contact-btn:hover{ background: var(--success); color: #0a1628; }

/* Agent card */
.agent-card {
  background: var(--card); border-radius: var(--r12);
  padding: 14px; border: 1px solid var(--border);
  margin-bottom: 16px;
  display: flex; gap: 12px; align-items: center;
}
.agent-card-avatar, .agent-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.agent-card-info { flex: 1; }
.agent-card-info strong { display: block; font-family: var(--font-main); font-weight: 700; }
.agent-card-info span { font-size: 13px; color: var(--text3); }
.agent-card-actions { display: flex; gap: 8px; }
.agent-contact-btns { display: flex; gap: 8px; margin-top: 10px; }
.btn-icon-round {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; text-decoration: none;
}
.btn-whatsapp {
  background: #25D366; color: white; border-radius: var(--r8);
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; transition: opacity .2s;
}
.btn-whatsapp:hover { opacity: 0.85; }
.btn-call {
  background: var(--primary); color: white; border-radius: var(--r8);
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; transition: opacity .2s;
}
.btn-call:hover { opacity: 0.85; }

/* Detail action row */
.detail-action-row { display: flex; gap: 10px; margin-bottom: 16px; }
.flex1 { flex: 1; }

/* Teaser banner */
.tease-banner, .teaser-banner {
  margin: 0 0 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  border-radius: var(--r16); padding: 16px;
  cursor: pointer; transition: transform .2s;
}
.tease-banner:hover, .teaser-banner:hover { transform: scale(1.01); }
.tease-inner, .teaser-banner { display: flex; align-items: center; gap: 12px; }
.tease-num { font-family: var(--font-main); font-size: 36px; font-weight: 800; color: var(--white); line-height: 1; flex-shrink: 0; }
.tease-inner strong, .teaser-banner strong { display: block; font-family: var(--font-main); font-size: 14px; }
.tease-inner p, .teaser-banner p { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.tease-arrow { margin-left: auto; font-size: 22px; color: rgba(255,255,255,0.7); }
.teaser-banner span { font-size: 24px; }

/* Appointment btn */
.btn-appt {
  background: linear-gradient(135deg, var(--accent2), var(--primary));
  color: white; border-radius: var(--r50);
  padding: 14px 24px; font-size: 15px; font-weight: 700;
  width: 100%; margin-bottom: 12px; font-family: var(--font-main);
  transition: opacity .2s;
}
.btn-appt:hover { opacity: 0.9; }

/* ═══ BUTTONS ═══ */
.btn-primary {
  background: var(--primary); color: var(--white);
  border-radius: var(--r8); padding: 11px 20px;
  font-size: 14px; font-weight: 700; font-family: var(--font-main);
  transition: background .2s, transform .1s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary:hover { background: var(--primary-h); }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  background: var(--card2); color: var(--text);
  border-radius: var(--r8); padding: 11px 20px;
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); font-family: var(--font-main);
  transition: background .2s;
}
.btn-secondary:hover { background: var(--bg3); }
.btn-danger {
  background: var(--danger); color: white;
  border-radius: var(--r8); padding: 11px 20px;
  font-size: 14px; font-weight: 600; transition: opacity .2s;
}
.btn-danger:hover { opacity: 0.85; }
.btn-icon {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r4); padding: 4px 8px;
  font-size: 11px; font-weight: 700; color: var(--primary-l);
}
.btn-danger-sm {
  background: rgba(244,67,54,.15); border: 1px solid rgba(244,67,54,.3);
  border-radius: var(--r4); padding: 4px 8px;
  font-size: 11px; font-weight: 700; color: var(--danger);
}

/* ═══ FORMS ═══ */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text2); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-row { margin-bottom: 0; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row.two-col .form-group { flex: 1; min-width: 0; }

/* ═══ MODALS ═══ */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: flex-end;
}
.modal.center-modal { align-items: center; justify-content: center; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--card2);
  border-radius: var(--r24) var(--r24) 0 0;
  padding: 24px 20px;
  width: 100%; max-width: 600px; margin: 0 auto;
  border: 1px solid var(--border); border-bottom: none;
  animation: slideUp .25s ease;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex; flex-direction: column;
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: var(--bg3); border-radius: 50%;
  color: var(--text2); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: var(--border); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal-header h3 { font-family: var(--font-main); font-size: 18px; font-weight: 700; }
.modal-scroll { overflow-y: auto; flex: 1; min-height: 0; padding-right: 4px; }
.modal-scroll::-webkit-scrollbar { width: 4px; }
.modal-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.modal-footer {
  display: flex; gap: 10px; margin-top: 16px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.modal-footer .btn-primary, .modal-footer .btn-secondary { flex: 1; }

/* Auth modal */
.auth-box { padding: 28px 24px; }
.auth-logo {
  font-family: var(--font-main); font-size: 22px; font-weight: 800;
  color: var(--white); margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.auth-logo strong { color: var(--primary-l); }
.auth-tabs {
  display: flex; gap: 0;
  background: var(--bg3);
  border-radius: var(--r8); padding: 3px; margin-bottom: 20px;
}
.auth-tab {
  flex: 1; padding: 9px;
  border-radius: var(--r4);
  font-size: 14px; font-weight: 600; color: var(--text3);
  transition: all .2s; font-family: var(--font-main);
}
.auth-tab.active { background: var(--primary); color: var(--white); }
.auth-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.auth-hint { font-size: 11px; color: var(--text3); text-align: center; margin-top: 12px; }

/* Listing modal */
.listing-modal {
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* QR modal */
.qr-box { align-items: center; text-align: center; border-radius: var(--r24) var(--r24) 0 0; }
.qr-box h3 { font-family: var(--font-main); font-size: 18px; margin-bottom: 16px; }
#qr-canvas-wrap { display: flex; justify-content: center; margin-bottom: 12px; }
#qr-code-container {
  width: 200px; height: 200px;
  background: white;
  border-radius: var(--r12);
  padding: 8px;
  display: flex; align-items: center; justify-content: center;
}
#qr-code-container canvas, #qr-code-container img { width: 184px !important; height: 184px !important; border-radius: var(--r4); }
.qr-url { font-size: 12px; color: var(--text3); word-break: break-all; margin-bottom: 12px; }
.qr-stats-row { display: flex; gap: 16px; justify-content: center; margin-bottom: 12px; }
.qr-stat-mini { text-align: center; }
.qr-stat-mini span { display: block; font-size: 11px; color: var(--text3); }
.qr-stat-mini strong { font-family: var(--font-main); font-size: 20px; font-weight: 800; color: var(--success); }
.qr-actions { display: flex; gap: 10px; width: 100%; margin-bottom: 12px; }
.qr-actions button { flex: 1; }
.qr-dynamic-note { font-size: 11px; color: var(--text3); text-align: center; padding: 8px; }
.qr-scan-count { font-size: 13px; color: var(--text3); }
.qr-scan-count strong { color: var(--success); }

/* ═══ AGENT / ADMIN PANELS ═══ */
.login-prompt {
  display: flex; flex-direction: column;
  align-items: center; padding: 60px 20px; gap: 12px;
}
.login-prompt span { font-size: 48px; }
.login-prompt p { color: var(--text3); text-align: center; }
.panel-guard { padding: 40px 16px; text-align: center; color: var(--text3); }
.panel-guard h3 { font-family: var(--font-main); font-weight: 700; font-size: 16px; margin-bottom: 8px; }

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px; padding: 16px;
}
.dash-stat-card {
  background: var(--card); border-radius: var(--r12);
  padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid var(--border);
}
.dash-stat-icon { font-size: 20px; }
.dash-stat-val {
  font-family: var(--font-main); font-weight: 800;
  font-size: 18px; color: var(--primary-l);
}
.dash-stat-lbl { font-size: 11px; color: var(--text3); }
.dash-stat-card .stat-val { font-family: var(--font-main); font-size: 24px; font-weight: 800; color: var(--primary-l); }
.dash-stat-card .stat-lbl { font-size: 12px; color: var(--text3); margin-top: 2px; }

.dash-tabs {
  display: flex; overflow-x: auto;
  gap: 4px; padding: 0 16px 12px;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tab {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r50); padding: 6px 14px;
  font-size: 12px; font-weight: 600; font-family: var(--font-main);
  color: var(--text2); white-space: nowrap;
  transition: background .15s, color .15s;
}
.dash-tab.active { background: var(--primary); border-color: var(--primary); color: white; }

.agent-tab-panel { padding: 0 16px 80px; }
.add-listing-btn { margin-bottom: 16px; }

/* Listing row item */
.listing-row-item {
  background: var(--card); border-radius: var(--r12);
  padding: 12px; border: 1px solid var(--border);
  margin-bottom: 10px; display: flex; gap: 10px; align-items: flex-start;
}
.listing-row-item-img {
  width: 60px; height: 60px;
  border-radius: var(--r8); overflow: hidden; flex-shrink: 0;
}
.listing-row-item-img img { width: 60px; height: 60px; object-fit: cover; }
.listing-row-item-info { flex: 1; min-width: 0; }
.listing-row-item-info .title { font-family: var(--font-main); font-weight: 700; font-size: 13px; }
.listing-row-item-info .price { color: var(--primary-l); font-weight: 700; font-size: 15px; font-family: var(--font-main); }
.listing-row-item-info .meta { font-size: 11px; color: var(--text3); margin-top: 3px; }
.listing-row-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

/* Request item */
.request-item {
  background: var(--card); border-radius: var(--r12);
  padding: 14px; border: 1px solid var(--border); margin-bottom: 10px;
}
.request-item .req-title { font-family: var(--font-main); font-weight: 700; font-size: 14px; }
.request-item .req-meta { font-size: 12px; color: var(--text3); margin-top: 4px; }
.request-item .req-type {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: var(--r4); margin-top: 6px; margin-bottom: 6px;
}
.req-type.sell   { background: rgba(21,101,192,0.2); color: var(--primary-l); }
.req-type.rent   { background: rgba(0,180,216,0.2); color: var(--accent); }
.req-type.expert { background: rgba(255,179,0,0.2); color: var(--warn); }
.req-type.contact{ background: rgba(0,200,150,0.2); color: var(--success); }

/* QR stat item */
.qr-stat-item {
  background: var(--card); border-radius: var(--r12);
  padding: 14px; border: 1px solid var(--border); margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
}
.qr-stat-item .qr-stat-thumb {
  width: 48px; height: 48px; border-radius: var(--r8);
  background: white; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.qr-stat-item .qr-stat-info { flex: 1; min-width: 0; }
.qr-stat-item .qr-stat-info h4 { font-size: 13px; font-weight: 600; }
.qr-stat-info .qr-scan-bar {
  height: 4px; background: var(--bg3); border-radius: 4px; margin-top: 6px; overflow: hidden;
}
.qr-scan-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px; transition: width .5s ease;
}
.qr-stat-count { font-family: var(--font-main); font-weight: 800; font-size: 18px; color: var(--success); }

/* ═══ MESSAGES ═══ */
.thread-item {
  background: var(--card); border-radius: var(--r12);
  padding: 14px; border: 1px solid var(--border); margin-bottom: 10px;
  display: flex; gap: 12px; align-items: center;
  cursor: pointer; transition: background .15s;
}
.thread-item:hover { background: var(--card2); }
.thread-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.thread-info { flex: 1; min-width: 0; }
.thread-info h4 { font-size: 14px; font-weight: 600; font-family: var(--font-main); }
.thread-info p { font-size: 12px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.thread-meta { font-size: 11px; color: var(--text3); }

#chat-view {
  display: flex; flex-direction: column;
  height: calc(100vh - var(--header-h) - var(--nav-h));
}
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header button { color: var(--primary-l); font-weight: 600; font-size: 14px; }
#chat-title { font-family: var(--font-main); font-weight: 700; font-size: 15px; }
#chat-subtitle { font-size: 12px; color: var(--text3); font-weight: 400; }
.chat-messages {
  flex: 1; padding: 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-bubble {
  max-width: 78%; padding: 10px 14px;
  border-radius: var(--r12); font-size: 14px; line-height: 1.5;
}
.chat-bubble.mine {
  background: var(--primary); color: white;
  align-self: flex-end; border-bottom-right-radius: var(--r4);
}
.chat-bubble.theirs {
  background: var(--card); color: var(--text);
  align-self: flex-start; border-bottom-left-radius: var(--r4);
}
.chat-bubble .bubble-time { font-size: 10px; opacity: 0.6; margin-top: 4px; text-align: right; }
.chat-input-row {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border); background: var(--bg);
  flex-shrink: 0;
}
.chat-input-row input { flex: 1; border-radius: var(--r50); }
.chat-input-row button {
  width: 40px; height: 40px; background: var(--primary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0; transition: background .2s;
}
.chat-input-row button:hover { background: var(--primary-h); }

/* ═══ BANK PAGE ═══ */
.bank-calculator {
  background: var(--card); border-radius: var(--r16);
  margin: 16px; padding: 16px; border: 1px solid var(--border);
}
.bank-calculator h3 { font-family: var(--font-main); font-weight: 700; margin-bottom: 14px; }
.loan-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.loan-stat { background: var(--bg3); border-radius: var(--r8); padding: 10px; text-align: center; }
.loan-stat span { display: block; font-family: var(--font-main); font-weight: 800; font-size: 14px; color: var(--primary-l); }
.loan-stat small { font-size: 10px; color: var(--text3); }
.bank-offers { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
.bank-offer-card {
  background: var(--card); border-radius: var(--r12);
  padding: 14px; border: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.bank-offer-logo {
  width: 40px; height: 40px; border-radius: var(--r8);
  background: var(--bg3); display: flex; align-items: center;
  justify-content: center; font-size: 20px; flex-shrink: 0;
}
.bank-offer-info { flex: 1; }
.bank-offer-info h4 { font-family: var(--font-main); font-weight: 700; font-size: 14px; }
.bank-offer-info p { font-size: 12px; color: var(--text3); margin-top: 2px; }
.bank-rate { font-family: var(--font-main); font-weight: 800; font-size: 18px; color: var(--success); }

/* ═══ PROFILE PAGE ═══ */
.profile-content { padding-bottom: 80px; }
.profile-header-card {
  background: linear-gradient(135deg, var(--primary), var(--bg2));
  margin: 16px; border-radius: var(--r16);
  padding: 20px; display: flex; gap: 14px; align-items: center;
}
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-main); font-weight: 800; font-size: 22px;
  color: white; flex-shrink: 0;
}
.photo-edit-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.photo-edit-btn:hover { transform: scale(1.08); }
.profile-info h2 { font-family: var(--font-main); font-size: 18px; font-weight: 700; }
.profile-info p { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.role-badge {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: var(--r50);
  background: rgba(255,255,255,0.15); color: white;
  display: inline-block; margin-top: 4px; font-family: var(--font-main);
}
.role-badge.admin { background: rgba(244,67,54,0.2); color: var(--danger); }
.role-badge.agent { background: rgba(21,101,192,0.2); color: var(--primary-l); }
.role-badge.user  { background: rgba(0,200,150,0.2); color: var(--success); }
.profile-section { padding: 16px; }
.profile-section h3 { font-family: var(--font-main); font-weight: 700; font-size: 16px; margin-bottom: 12px; }

/* Admin user item */
.admin-user-item {
  background: var(--card); border-radius: var(--r12);
  padding: 14px; border: 1px solid var(--border);
  margin-bottom: 10px; display: flex; align-items: center; gap: 12px;
}
.admin-user-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.admin-user-info { flex: 1; }
.admin-user-info h4 { font-size: 14px; font-weight: 600; font-family: var(--font-main); }
.admin-user-info p { font-size: 12px; color: var(--text3); }

/* ═══ BOTTOM NAV ═══ */
/* ═══ BOTTOM NAV ═══ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 1000; /* 100 -> 1000: haritanın üstünde kalması için satır 479 ile birleştirildi */
  height: var(--nav-h);
  background: rgba(10,22,40,0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 8px;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  flex: 1; color: var(--text3); font-size: 10px; font-weight: 600;
  padding: 6px 4px; border-radius: var(--r8); transition: color .2s;
  font-family: var(--font-main); position: relative;
}
.nav-btn svg { transition: color .2s; }
.nav-btn.active { color: var(--primary-l); }
.nav-btn.active svg { color: var(--primary-l); }
.nav-center-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  border-radius: 50%; width: 52px; height: 52px; flex: unset;
  align-self: center; box-shadow: 0 4px 20px rgba(21,101,192,0.5);
  transition: transform .2s, box-shadow .2s;
}
.nav-center-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(21,101,192,0.7); }
.center-icon { font-size: 26px; font-weight: 300; color: white; margin-bottom: 0; }
.msg-badge {
  position: absolute; top: 2px; right: 16px;
  background: var(--danger); color: white;
  border-radius: 50%; width: 16px; height: 16px;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
}

/* ═══ TOAST ═══ */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 12px); left: 50%;
  transform: translateX(-50%); z-index: 9999;
  background: var(--card2); color: var(--white);
  padding: 12px 20px; border-radius: var(--r50);
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  white-space: nowrap; font-family: var(--font-main);
  animation: toastIn .25s ease;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
@keyframes toastIn { from{opacity:0;transform:translateX(-50%) translateY(10px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* ═══ SCROLLBAR GLOBAL ═══ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ═══ RESPONSIVE ═══ */
@media(min-width: 480px) {
  .modal-box { border-radius: var(--r24); border: 1px solid var(--border); max-width: 460px; margin: auto; }
  .modal { align-items: center; justify-content: center; }
  .detail-specs { grid-template-columns: repeat(4, 1fr); }
}
@media(min-width: 768px) {
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
  .hero-content h1 { font-size: 38px; }
  .full-map { height: calc(100vh - var(--header-h) - var(--nav-h) - 52px); }
}
/* ═══════════════════════════════════════════════════════════
   QR EMLAK – style.css EKLENTİLERİ v2.1
   Eklenen: QR Detay Modal, IAP Modal, Poster Sözleşme Overlay,
            Vitrin İstatistik Paneli, Slot Sayacı Badge
   ═══════════════════════════════════════════════════════════ */

/* ═══ SLOT SAYACI BADGE ═══ */
.slot-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r50); padding: 4px 12px;
  font-size: 12px; font-weight: 600; font-family: var(--font-main);
  color: var(--text2);
}
.slot-badge.warn  { border-color: rgba(255,179,0,.4); color: var(--warn); background: rgba(255,179,0,.08); }
.slot-badge.full  { border-color: rgba(244,67,54,.4); color: var(--danger); background: rgba(244,67,54,.08); }
.slot-badge.ok    { border-color: rgba(0,200,150,.3); color: var(--success); background: rgba(0,200,150,.08); }
.slot-badge svg   { width: 13px; height: 13px; }

/* ═══ IAP SATIN ALMA MODALI ═══ */
.iap-modal-overlay {
  position: fixed; inset: 0; z-index: 9100;
  background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end;
  animation: fadeIn .2s ease;
}
.iap-modal-box {
  width: 100%; background: var(--card);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border);
  padding: 0 0 env(safe-area-inset-bottom,0);
  max-height: 92vh; overflow-y: auto;
  animation: slideUp .3s cubic-bezier(.25,.8,.25,1);
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
@keyframes fadeIn  { from{opacity:0} to{opacity:1} }

.iap-modal-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 12px auto 0;
}
.iap-modal-header {
  padding: 16px 20px 12px;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.iap-modal-title {
  font-family: var(--font-main); font-weight: 800; font-size: 20px;
}
.iap-modal-sub { font-size: 13px; color: var(--text2); margin-top: 4px; }
.iap-modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text3); cursor: pointer; flex-shrink: 0;
}
.iap-modal-close:hover { background: var(--card2); }

.iap-products-list {
  padding: 4px 16px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.iap-product-card {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--r16); padding: 16px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all .2s; position: relative; overflow: hidden;
}
.iap-product-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,.02));
  pointer-events: none;
}
.iap-product-card:hover { border-color: rgba(66,165,245,.3); background: #1e3560; }
.iap-product-card.popular { border-color: rgba(66,165,245,.4); }
.iap-popular-tag {
  position: absolute; top: 0; right: 14px;
  background: var(--plight); color: var(--bg);
  font-size: 10px; font-weight: 800; font-family: var(--font-main);
  padding: 3px 10px; border-radius: 0 0 8px 8px; letter-spacing: .04em;
}
.iap-product-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(66,165,245,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.iap-product-info { flex: 1; }
.iap-product-name {
  font-family: var(--font-main); font-weight: 700;
  font-size: 15px; margin-bottom: 3px;
}
.iap-product-desc { font-size: 12px; color: var(--text2); }
.iap-product-price {
  font-family: var(--font-main); font-weight: 800;
  font-size: 17px; color: var(--plight); text-align: right; flex-shrink: 0;
}
.iap-product-price small {
  display: block; font-size: 10px; color: var(--text3);
  font-weight: 500; text-align: right;
}

/* ═══ QR DETAYLI İSTATİSTİK MODALİ ═══ */
.qr-stats-modal {
  position: fixed; inset: 0; z-index: 9200;
  background: rgba(0,0,0,.8); backdrop-filter: blur(8px);
  display: flex; align-items: flex-end;
  animation: fadeIn .2s ease;
}
.qr-stats-box {
  width: 100%; max-height: 96vh; overflow-y: auto;
  background: var(--card); border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border);
  animation: slideUp .3s cubic-bezier(.25,.8,.25,1);
}
.qr-stats-header {
  padding: 12px 20px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--card); z-index: 1;
}
.qr-stats-title { font-family: var(--font-main); font-weight: 800; font-size: 17px; }
.qr-stats-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text3); cursor: pointer; border: none;
}

.qr-kpi-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 16px;
}
.qr-kpi {
  background: var(--card2); border-radius: var(--r12);
  padding: 14px 12px; text-align: center; border: 1px solid var(--border);
}
.qr-kpi-val {
  font-family: var(--font-main); font-weight: 800;
  font-size: 22px; color: var(--plight); display: block; line-height: 1;
}
.qr-kpi-lbl { font-size: 11px; color: var(--text3); margin-top: 5px; }

/* Sparkline chart (SVG tabanlı) */
.qr-trend-section { padding: 0 16px 16px; }
.qr-trend-title {
  font-family: var(--font-main); font-weight: 700;
  font-size: 13px; color: var(--text3);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 12px;
}
.qr-chart-wrap {
  background: var(--card2); border-radius: var(--r12);
  border: 1px solid var(--border); overflow: hidden;
  padding: 16px 14px 10px;
}
.qr-sparkline { width: 100%; height: 80px; display: block; }
.qr-chart-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text3); margin-top: 6px;
  padding: 0 2px;
}

/* Hour heatmap */
.qr-hour-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 3px; padding: 0 16px 16px;
}
.qr-hour-cell {
  aspect-ratio: 1; border-radius: 4px;
  background: var(--card2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--text3); cursor: default;
  transition: transform .15s;
  position: relative;
}
.qr-hour-cell:hover { transform: scale(1.15); z-index: 1; }
.qr-hour-cell.h1  { background: rgba(66,165,245,.12); }
.qr-hour-cell.h2  { background: rgba(66,165,245,.25); color: var(--plight); }
.qr-hour-cell.h3  { background: rgba(66,165,245,.45); color: var(--plight); }
.qr-hour-cell.h4  { background: rgba(66,165,245,.7);  color: white; }

/* Switch target section */
.qr-switch-section { padding: 0 16px 20px; }
.qr-switch-label {
  font-family: var(--font-main); font-weight: 700;
  font-size: 13px; color: var(--text3);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px;
}
.qr-switch-row { display: flex; gap: 8px; }
.qr-switch-row input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r8); padding: 11px 14px;
  color: var(--text); font-size: 14px;
}
.qr-switch-row input:focus { border-color: var(--primary-l); outline: none; }
.btn-switch {
  background: var(--primary); color: white;
  border: none; border-radius: var(--r8);
  padding: 11px 18px; font-family: var(--font-main);
  font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background .2s; white-space: nowrap;
}
.btn-switch:hover { background: var(--primary-h); }

/* QR Code image preview */
.qr-preview-wrap {
  padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.qr-img-frame {
  width: 160px; height: 160px;
  background: white; border-radius: 12px;
  padding: 10px; display: flex; align-items: center; justify-content: center;
}
.qr-img-frame img { width: 100%; height: 100%; object-fit: contain; }
.qr-short-url {
  font-family: var(--font-main); font-weight: 700;
  color: var(--plight); font-size: 14px; text-align: center;
}
.qr-actions-row { display: flex; gap: 8px; }
.btn-qr-dl {
  flex: 1; background: var(--primary); color: white;
  border: none; border-radius: var(--r12); padding: 12px;
  font-family: var(--font-main); font-weight: 700; font-size: 13px;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 6px; transition: background .2s;
}
.btn-qr-dl:hover { background: var(--primary-h); }
.btn-qr-copy {
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border); border-radius: var(--r12);
  padding: 12px 16px; font-family: var(--font-main); font-weight: 700;
  font-size: 13px; cursor: pointer; transition: all .2s;
}
.btn-qr-copy:hover { border-color: var(--primary-l); color: var(--plight); }

/* ═══ POSTER SÖZLEŞME OVERLAY ═══ */
.poster-agreement-overlay {
  position: fixed; inset: 0; z-index: 9300;
  background: rgba(0,0,0,.85); backdrop-filter: blur(10px);
  display: flex; align-items: flex-end;
  animation: fadeIn .25s ease;
}
.poster-agreement-box {
  width: 100%; background: var(--card);
  border-radius: 24px 24px 0 0;
  border-top: 3px solid var(--warn);
  max-height: 92vh; overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
  animation: slideUp .3s cubic-bezier(.25,.8,.25,1);
}
.pa-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--card); z-index: 1;
}
.pa-warn-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,179,0,.12); border: 1px solid rgba(255,179,0,.3);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 700; color: var(--warn);
  font-family: var(--font-main); margin-bottom: 10px;
}
.pa-title {
  font-family: var(--font-main); font-weight: 800;
  font-size: 19px; color: var(--white); line-height: 1.3;
}
.pa-sub { font-size: 13px; color: var(--text2); margin-top: 6px; }

.pa-articles { padding: 16px 20px; }
.pa-article {
  display: flex; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.pa-article:last-child { border-bottom: none; }
.pa-article-num {
  width: 26px; height: 26px; border-radius: 8px;
  background: rgba(255,179,0,.12); border: 1px solid rgba(255,179,0,.25);
  color: var(--warn); font-family: var(--font-main); font-weight: 800;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.pa-article-text { font-size: 13px; color: var(--text2); line-height: 1.7; }
.pa-article-text strong { color: var(--text); }

.pa-consent-row {
  padding: 16px 20px;
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255,179,0,.05); border-top: 1px solid rgba(255,179,0,.15);
}
.pa-checkbox {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--bg3); border: 2px solid var(--border);
  flex-shrink: 0; margin-top: 1px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.pa-checkbox.checked { background: var(--warn); border-color: var(--warn); }
.pa-checkbox.checked::after { content: '✓'; color: #000; font-size: 14px; font-weight: 800; }
.pa-consent-text { font-size: 13px; color: var(--text2); line-height: 1.6; cursor: pointer; }
.pa-consent-text strong { color: var(--text); }

.pa-buttons { padding: 12px 20px 20px; display: flex; gap: 10px; }
.btn-pa-accept {
  flex: 1; background: var(--warn); color: #000;
  border: none; border-radius: var(--r12); padding: 15px;
  font-family: var(--font-main); font-weight: 800; font-size: 15px;
  cursor: pointer; transition: all .2s;
}
.btn-pa-accept:disabled { opacity: .35; cursor: not-allowed; }
.btn-pa-accept:not(:disabled):hover { background: #ffc107; }
.btn-pa-cancel {
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border); border-radius: var(--r12);
  padding: 15px 20px; font-family: var(--font-main); font-weight: 700;
  font-size: 14px; cursor: pointer; transition: all .2s;
}
.btn-pa-cancel:hover { border-color: var(--text3); }

/* ═══ VİTRİN İSTATİSTİK PANELİ (Emlakçı Paneli içi) ═══ */
.vitrin-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 0 16px 16px;
}
.vitrin-stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r12); padding: 14px;
}
.vitrin-stat-card .vs-label {
  font-size: 11px; color: var(--text3);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}
.vitrin-stat-card .vs-val {
  font-family: var(--font-main); font-weight: 800;
  font-size: 24px; color: var(--plight);
}
.vitrin-stat-card .vs-sub { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* Lead tipi renk kodları */
.lead-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: var(--r50); font-family: var(--font-main);
}
.lead-kiralamak  { background: rgba(0,151,167,.15); color: #4DD0E1; }
.lead-satmak     { background: rgba(21,101,192,.15); color: var(--plight); }
.lead-kiralayan  { background: rgba(102,187,106,.15); color: #81C784; }
.lead-satin_alan { background: rgba(255,179,0,.15); color: var(--warn); }

/* ═══ QR LİSTE SATIRLARI (Panel) ═══ */
.qr-row {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r12); padding: 14px 16px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 12px;
}
.qr-row:active { background: var(--card2); }
.qr-row-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(66,165,245,.1); display: flex;
  align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.qr-row-body { flex: 1; min-width: 0; }
.qr-row-label {
  font-family: var(--font-main); font-weight: 700;
  font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qr-row-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.qr-row-scans {
  font-family: var(--font-main); font-weight: 800;
  font-size: 16px; color: var(--success); text-align: right; flex-shrink: 0;
}
.qr-row-scans small { display: block; font-size: 10px; color: var(--text3); font-weight: 500; }

/* ═══ PROGRESS BAR (Slot kullanım göstergesi) ═══ */
.slot-progress-wrap { padding: 14px 16px 0; }
.slot-progress-bar {
  height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden;
}
.slot-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--plight));
  transition: width .4s ease;
}
.slot-progress-fill.warn { background: linear-gradient(90deg, var(--warn), #FFD54F); }
.slot-progress-fill.full { background: linear-gradient(90deg, var(--danger), #EF9A9A); }
.slot-progress-text {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text3); margin-top: 6px;
  font-family: var(--font-main); font-weight: 600;
}

/* ═══ RESPONSIVE EKLENTİLER ═══ */
@media(min-width: 480px) {
  .iap-modal-box, .qr-stats-box, .poster-agreement-box {
    max-width: 480px; margin: auto;
    border-radius: var(--r24);
    border: 1px solid var(--border);
    margin-bottom: 24px;
  }
  .iap-modal-overlay, .qr-stats-modal, .poster-agreement-overlay {
    align-items: center; justify-content: center;
  }
  .vitrin-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .qr-kpi-row { grid-template-columns: repeat(4, 1fr); }
}

.splash-logo-img {
  height: clamp(96px, 12vw, 180px);
  width: auto;
  display: block;
  max-width: 70vw;
}
.header-logo-img { height: 38px; width: auto; display: block; }
.auth-logo-img   { height: 44px; width: auto; display: block; margin: 0 auto 4px; }

.lic-badge { display:inline-block; padding:4px 12px; border-radius:20px; font-size:12px; font-weight:700; }
.lic-badge.lic-none     { background: rgba(90,122,159,.15);  color: var(--text3); }
.lic-badge.lic-pending  { background: rgba(255,179,0,.15);   color: var(--warn); }
.lic-badge.lic-approved { background: rgba(0,200,150,.15);   color: var(--ok); }
.lic-badge.lic-rejected { background: rgba(244,67,54,.15);   color: var(--danger); }


.notif-list { display:flex; flex-direction:column; }
.notif-item { padding:12px 16px; border-bottom:1px solid var(--border); font-size:13px; }
.notif-item:last-child { border-bottom:none; }
.notif-item p { color:var(--text2); margin:0; }
.notif-item.unread p { color:var(--text); font-weight:600; }
.notif-item.unread { background:rgba(236,72,153,.06); }
.notif-time { font-size:11px; color:var(--text3); display:block; margin-top:4px; }


.auth-divider{display:flex;align-items:center;gap:10px;margin:18px 0;color:var(--text3);font-size:12px}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:var(--border)}

.btn-social{
  width:100%;display:flex;align-items:center;justify-content:center;gap:10px;
  padding:12px 16px;border-radius:12px;font-size:14px;font-weight:600;
  border:1.5px solid var(--border);cursor:pointer;margin-bottom:10px;
  background:var(--card);color:var(--text);transition:all .2s;
}
.btn-social:hover{border-color:var(--primary);background:rgba(66,165,245,.08)}
.btn-social.apple-btn{background:#000;color:#fff;border-color:#000}
.btn-social.apple-btn:hover{background:#1a1a1a}

.link-to-listing{color:var(--primary);cursor:pointer;text-decoration:underline dotted;text-underline-offset:2px}
.link-to-listing:hover{color:var(--text)}

.icon{width:14px;height:14px;stroke-width:2;color:currentColor;vertical-align:-2px;display:inline-block}
.listing-meta .icon{margin-right:2px}


.extra-images-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.extra-images-grid::-webkit-scrollbar { display: none; }
.extra-images-grid-img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  cursor: pointer;
}


.modal-body img, .modal-content img { max-width: 100%; max-height: 80vh; height: auto; }

.bubble-sender{font-size:11px;font-weight:700;color:var(--primary-l);margin-bottom:3px}


@media (max-width: 480px) {
  .listing-row-item, .agent-card, .spec-item, .detail-action-row, .magnet-btns,
  .thread-item, .notif-item, .qr-list-item, .appt-item, .request-item,
  .form-row.two-col > *, .detail-qr-section, .detail-qr-right {
    min-width: 0;
  }
  .listing-row-item-info, .agent-card-info,
  .listing-row-item-info *, .agent-card-info * {
    min-width: 0;
  }
  .listing-row-item-info .title, .agent-card-info strong,
  .thread-item .title, .notif-item .body {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  h1, h2, h3, h4, p, span, label, strong, small, a, button {
    overflow-wrap: break-word;
    word-break: break-word;
  }
}