/* =============================================
   EMLAK PROGRAMI — Sidebar (Açık/Ferah Tasarım)
   Beyaz zemin · koyu metin · sarı aktif vurgu
   ============================================= */

body.sayfa-body { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg-main); }
.sayfa-wrapper  { display: flex; flex: 1; align-items: stretch; }

:root { --sidebar-genis: 270px; }

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-genis);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-self: stretch;
  overflow-x: hidden;
  z-index: 50;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

/* ---- LOGO ---- */
.sidebar-logo {
  padding: 20px 22px 16px;
  flex-shrink: 0;
}
.sidebar-logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.sidebar-logo-title {
  font-family: 'DM Serif Display', serif;
  font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.1;
}
.sidebar-logo-sub {
  font-size: 9px; color: var(--text-muted);
  letter-spacing: 1px; text-transform: uppercase;
}

/* ---- NAV ---- */
.sidebar-nav { flex: 1; padding: 8px 0 14px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }

/* ---- GRUP BAŞLIĞI (ANA MENÜ vb.) ---- */
.sidebar-group-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 14px 24px 8px;
  background: transparent; border: none;
  color: var(--text-muted);
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  cursor: pointer; font-family: 'Inter', sans-serif; text-align: left;
}
.sidebar-group-btn > i:first-child { display: none; }   /* grup başlığında ikon gizli (görseldeki gibi sade) */
.sidebar-group-btn span { flex: 1; }
.sidebar-chevron { font-size: 13px; opacity: 0.4; transition: transform 0.2s; }
.sidebar-group.acik .sidebar-chevron { transform: rotate(180deg); }

/* ---- GRUP İTEMLERİ ---- */
.sidebar-group-items { display: none; flex-direction: column; padding: 0 14px; gap: 3px; }
.sidebar-group.acik .sidebar-group-items { display: flex; }

/* ---- MENÜ ÖĞESİ ---- */
.sidebar-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 15px; font-weight: 600;
  transition: background 0.13s, color 0.13s; position: relative;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-item i { font-size: 21px; flex-shrink: 0; color: var(--text-muted); transition: color 0.13s; }
.sidebar-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sidebar-item:hover { background: var(--bg-main); }
.sidebar-item:hover i { color: var(--navy); }

/* Aktif öğe — dolu sarı, görseldeki gibi */
.sidebar-item.aktif {
  background: var(--accent);
  color: var(--navy);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(201,162,39,0.35);
}
.sidebar-item.aktif i { color: var(--navy); }
.sidebar-aktif-dot { display: none; }   /* sarı zemin yeterli, ayrı nokta gerekmiyor */

/* ---- FOOTER (kullanıcı kartı + ana sayfa + çıkış) ---- */
.sidebar-footer { border-top: 1px solid var(--border); padding: 14px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; }

/* Kullanıcı kartı */
.sidebar-user-kart {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--bg-main); margin-bottom: 6px;
}
.sidebar-user-avatar {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: var(--accent); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.sidebar-user-bilgi { min-width: 0; line-height: 1.3; }
.sidebar-user-ad { font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-rol { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-ana-sayfa,
.sidebar-cikis {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-radius: 12px;
  text-decoration: none; font-size: 15px; font-weight: 600;
  transition: background 0.13s; cursor: pointer;
  white-space: nowrap; overflow: hidden;
  background: transparent; border: none; width: 100%; font-family: 'Inter', sans-serif; text-align: left;
}
.sidebar-ana-sayfa { color: var(--text-main); }
.sidebar-ana-sayfa i { font-size: 20px; flex-shrink: 0; color: var(--text-muted); }
.sidebar-ana-sayfa:hover { background: var(--bg-main); }

.sidebar-cikis { color: #d92d20; }
.sidebar-cikis i { font-size: 20px; flex-shrink: 0; color: #d92d20; }
.sidebar-cikis:hover { background: #fde8e6; }

/* ---- MOBİL ---- */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; top: 0; left: 0;
    height: 100vh; width: 280px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1000;
    box-shadow: 4px 0 28px rgba(0,0,0,0.18);
  }
  .sidebar.acik-mobil { transform: translateX(0); }

  .sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 999;
  }
  .sidebar-overlay.acik { display: block; }

  .sayfa-icerik { min-width: 0; max-width: 100%; }
  .sayfa-icerik .page-layout { grid-template-columns: 1fr; padding: 14px 12px 32px; max-width: 100%; }
}

/* ---- İÇERİK ALANI ---- */
.sayfa-icerik { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg-main); }
.sayfa-icerik .page-layout-wrap { flex: 1; }
.sayfa-icerik .page-layout { max-width: none; padding: 24px 24px 48px; grid-template-columns: 440px 1fr; }
