@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600&display=swap');

/* =============================================
   EMLAK PROGRAMI - Ana Stil Dosyası
   Tema: Açık — Lacivert + Altın
   ============================================= */


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

:root {
  --bg-deep:      #ffffff;
  --bg-main:      #f4f1eb;
  --bg-panel:     #ffffff;
  --bg-card:      #f9f7f3;
  --border:       #e2ddd4;
  --border-hover: #f4bb15;
  --accent:       #f4bb15;
  --accent-light: #f4bb15;
  --accent-dark:  #a6841a;
  --navy:         #1a3a6e;
  --navy-light:   #1e4480;
  --text-main:    #2c2c2c;
  --text-muted:   #7a7060;
  --text-dim:     #b5afa5;
  --white:        #ffffff;
  --danger:       #c0392b;
  --warning:      #d68910;
  --info:         #1a6fa8;
  --radius:       8px;
  --radius-lg:    12px;
}

html { height: 100%; }
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
}

/* Mobilde yatay kaymayı (sayfanın sağa-sola oynaması) engelle */
html, body { max-width: 100%; overflow-x: hidden; }

/* ---- TOPBAR ---- */
.topbar {
  background: var(--navy);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left { display: flex; align-items: center; gap: 14px; }

.logo-box {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 18px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.pr-avatar img {
    height:40% !important;
}

.leaflet-container .leaflet-control-attribution { display:none;}

.pop-btn {
    display: block;
    text-align: center;
    background: #1a3a6e;
    color: #fff !important;
    padding: 7px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.topbar-title {
  font-family: 'DM Serif Display', serif;
  font-size: 18px; font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.topbar-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 1px;
}

.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date  { font-size: 12px; color: rgba(255,255,255,0.55); }

.topbar-user {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 13px;
  color: #fff;
}
.topbar-user .dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.btn-cikis {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 6px 14px;
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}
.btn-cikis:hover { border-color: #e74c3c; color: #e74c3c; background: rgba(231,76,60,0.08); }

/* ---- MAIN LAYOUT ---- */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px;
  gap: 28px;
  flex: 1;
}

/* ---- COLUMNS ---- */
.menu-col { display: flex; flex-direction: column; gap: 8px; }

.col-header {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.col-header i { font-size: 14px; color: var(--accent-dark); }

/* ---- MENU BUTTONS ---- */
.menu-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  color: var(--text-main);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.menu-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  transform: translateX(4px);
  box-shadow: 0 3px 10px rgba(26,58,110,0.15);
}
.menu-btn:hover .btn-arr  { opacity: 1; transform: translateX(0); }
.menu-btn:hover .btn-icon { background: rgba(255,255,255,0.12); }
.menu-btn:hover .btn-icon i { color: var(--accent); }

.menu-btn.vurgulu {
  background: #fff8e8;
  border-color: #e8d48a;
  border-left: 3px solid var(--accent);
}
.menu-btn.vurgulu:hover { background: var(--navy); border-color: var(--navy); border-left-color: var(--accent); }

.btn-icon {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.btn-icon i { font-size: 15px; color: var(--accent-dark); }

.btn-label {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  flex: 1;
}

.btn-arr {
  font-size: 16px; color: var(--accent);
  opacity: 0; transform: translateX(-5px);
  transition: all 0.15s;
}

/* ---- DOUBLE BUTTON ROW ---- */
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-row .menu-btn  { padding: 9px 11px; }
.btn-row .btn-label { font-size: 12px; }

/* ---- STAT CARDS ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 8px;
}
.stat-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 12px; text-align: center;
}
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 26px; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.stat-lbl {
  font-size: 10px; color: rgba(255,255,255,0.5);
  letter-spacing: 1px; text-transform: uppercase; margin-top: 4px;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--navy);
  padding: 10px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer span { font-size: 11px; color: rgba(255,255,255,0.35); }
.version {
  background: rgba(201,162,39,0.15);
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: 4px; padding: 2px 8px;
  font-size: 10px; color: var(--accent); font-weight: 600;
}

/* ---- LOGIN PAGE ---- */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-main);
}
.login-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%; max-width: 400px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.login-logo { text-align: center; margin-bottom: 28px; display: flex; flex-direction: column; align-items: center; }
.login-logo-box {
  width: 54px; height: 54px;
  background: var(--navy);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 26px; font-weight: 700;
  color: var(--accent);
  margin: 0 auto 12px;
}
.login-logo h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--text-main); letter-spacing: 0.5px;
}
.login-logo p {
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 1.5px; text-transform: uppercase; margin-top: 5px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 11px; color: var(--text-muted);
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; font-weight: 600;
}
.form-group input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-main); font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none; transition: border-color 0.15s;
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-dim); }

.btn-giris {
  width: 100%;
  background: var(--navy);
  border: none;
  border-radius: var(--radius);
  padding: 11px;
  color: #fff; font-size: 14px; font-weight: 600;
  font-family: 'DM Serif Display', serif;
  letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; transition: all 0.15s; margin-top: 8px;
}
.btn-giris:hover { background: var(--navy-light); }
.btn-giris:disabled { opacity: 0.6; cursor: not-allowed; }

.hata-mesaj {
  background: #fdf0ef; border: 1px solid #f5c6c2;
  border-radius: var(--radius); padding: 10px 14px;
  color: var(--danger); font-size: 13px; margin-bottom: 16px; display: none;
}
.hata-mesaj.goster { display: block; }

/* ---- LOGO YÜKLEME ---- */
.logo-alan { display: flex; align-items: center; }
.btn-logo-yukle {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.6);
  cursor: pointer; font-size: 15px; transition: all 0.15s;
}
.btn-logo-yukle:hover { border-color: var(--accent); color: var(--accent); }
.btn-logo-sil {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.6);
  cursor: pointer; font-size: 15px; transition: all 0.15s;
}
.btn-logo-sil:hover { border-color: #e74c3c; color: #e74c3c; }
#logo-yukle-wrap { display: flex; align-items: center; gap: 5px; }
.login-logo .logo-box {
  width: 72px !important; height: 72px !important;
  border-radius: 14px !important; font-size: 28px !important;
}
.login-logo .logo-box img { width: 72px !important; height: 72px !important; }

/* ---- ANİMASYONLAR ---- */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.fade-in { animation: fadeIn 0.3s ease forwards; }

/* ---- RESPONSİVE ---- */
@media (max-width: 768px) {
  .main-layout { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .topbar { padding: 0 16px; }
  .topbar-date { display: none; }
}

/* ============================================================
   MOBİL YATAY KAYMA ENGELİ (kapsamlı)
   overflow-x:hidden tek başına yetmiyorsa, taşmaya yol açan
   tüm yaygın sebepleri kaynağında kapatır.
   ============================================================ */
@media (max-width: 900px) {
  /* Kök seviyede kesin kilit */
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; position: relative; }

  /* Tüm ana kapsayıcılar ekranı aşmasın */
  .topbar, .sayfa-wrapper, .sayfa-icerik,
  .page-layout, .page-layout-wrap,
  .form-panel, .liste-panel, .grafik-kutu, .stat-kart {
    max-width: 100%;
    min-width: 0;       /* flex/grid çocuğunun küçülebilmesi için kritik */
    box-sizing: border-box;
  }

  /* Flex/grid çocukları sıkışabilsin (taşmanın en sık sebebi) */
  .sayfa-wrapper > *, .page-layout > *, .stat-grid > * { min-width: 0; }

  /* Uzun metin / başlık / URL satırı kırılsın, yatay itmesin */
  .topbar-title, .topbar-sub, .stat-label, .liste-baslik,
  td, th, .form-panel, .liste-panel {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Görseller asla taşmasın */
  img { max-width: 100%; height: auto; }

  /* Geniş tablolar yalnızca kendi kutusunda kayar, sayfayı kaydırmaz */
  table { max-width: 100%; }
  .topbar-user {
    padding: 0px 6px;
    font-size: 13px;
}
.btn-cikis {
    padding: 6px 6px;
    font-size: 12px;
}
}
