:root {
  --rail-w: 280px;
  --rail-mini: 74px;
  --accent: #4ade80;
  --accent-hover: #86efac;
  --text-light: #dfe6f8;
  --header-h: 70px;

  /* Sider özel renkler - bu değerler colors.css.php tarafından override edilecek */
  --sider-bg: rgba(15, 23, 35, 0.55);
  --sider-text: #dfe6f8;
  --sider-accent: #4ade80;
  --sider-hover: #86efac;
}

/* === SAĞ MENÜ (buzlu cam koyu) === */
.sider {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  width: var(--rail-w);
  background: var(--sider-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 36px 18px 20px; /* ↑ profil aşağı indi */
  gap: 20px;
  transition: width 0.35s ease, background 0.4s ease;
  z-index: 80;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 24px rgba(0, 0, 0, 0.45);
  color: var(--sider-text);
}

.sider:hover {
  background: rgba(15, 23, 35, 0.72);
}

/* === Üst profil (header altı) === */
.sider-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(74, 222, 128, 0.15);
  background: rgba(74, 222, 128, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.sider-brand:hover {
  background: rgba(74, 222, 128, 0.08);
  border-bottom-color: rgba(74, 222, 128, 0.25);
}

.sider-brand img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--sider-accent);
  box-shadow: 0 4px 16px rgba(74, 222, 128, 0.3);
  flex-shrink: 0;
}

.sider-brand .brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.3;
  flex: 1;
}

.t1 {
  font-weight: 700;
  font-size: 16px;
  color: var(--sider-accent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.3px;
}

.t2 {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  opacity: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* === Menü bağlantıları === */
.sider-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 8px;
}

.sider-link {
  display: flex;
  align-items: left;
  justify-content: left; /* 🧭 ikonları tam ortaya al */
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: var(--sider-text);
  background: rgba(14, 22, 40, 0.45);
  transition: background 0.25s, border 0.25s, color 0.25s, transform 0.25s;
  backdrop-filter: blur(10px);
  min-height: 56px;
}
.sider-link:hover {
  background: rgba(74, 222, 128, 0.1);
  transform: translateY(-2px);
}
.sider-link.active {
  border-left: 3px solid var(--sider-accent);
  background: rgba(74, 222, 128, 0.15);
  color: var(--sider-accent) !important;
}
.sider-link i {
  font-size: 22px;
  color: var(--sider-accent);
}

/* === Yasal Belgeler Bölümü === */
.sider-legal {
  margin-top: auto;
  padding-top: 16px;
  padding-bottom: 16px;
  border-top: 1px solid rgba(74, 222, 128, 0.15);
}

.sider-legal-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--sider-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding: 0 14px;
  opacity: 0.8;
}

.sider-legal-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(14, 22, 40, 0.3);
  transition: all 0.25s ease;
  font-size: 13px;
  margin-bottom: 8px;
  border: 1px solid transparent;
}

.sider-legal-link:hover {
  background: rgba(74, 222, 128, 0.08);
  color: var(--sider-accent);
  border-color: rgba(74, 222, 128, 0.15);
  transform: translateX(3px);
}

.sider-legal-link i {
  font-size: 14px;
  color: var(--sider-accent);
  opacity: 0.7;
}

.sider-legal-link span {
  flex: 1;
  font-weight: 500;
}

/* === Alt iletişim === */
.sider-contact {
  margin-top: auto;
  font-size: 13px;
}
.sider-contact a {
  color: var(--sider-accent);
  text-decoration: none;
}

/* === Küçük ekran === */
@media (max-width: 900px) {
  .sider {
    width: var(--rail-mini);
    align-items: center;
    padding: 20px 8px;
    background: var(--sider-bg);
    backdrop-filter: blur(16px) saturate(120%);
  }

  .sider .brand-text,
  .sider .sider-contact {
    display: none;
  }

  .sider-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 26px;
    padding: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.15);
    background: rgba(74, 222, 128, 0.05);
    border-radius: 10px;
  }

  .sider-brand img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--sider-accent);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
  }

  .sider-link {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
  }

  .sider-link span {
    display: none;
  }

  .sider-link i {
    font-size: 22px;
    color: var(--sider-accent);
  }

  /* Yasal belgeler küçük ekranda gizle */
  .sider-legal {
    display: none;
  }
}

/* Mobil/Tablet (<=980px): Menü açılınca tam genişlik ve metinler görünsün */
@media (max-width: 980px) {
  .sider.is-open {
    width: 100vw !important;
    align-items: stretch !important;
    padding: 18px !important;
    z-index: 1002 !important; /* backdrop'tan yüksek */
    /* Mobil hamburger panel: blur kapalı, net görünüm */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Profil kısmı mobilde açıkken görünsün */
  .sider.is-open .brand-text {
    display: flex !important;
  }

  .sider.is-open .sider-brand {
    margin-bottom: 20px;
    padding: 14px;
  }

  .sider-nav {
    align-items: stretch !important;
  }
  .sider-nav .sider-link {
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: auto !important;
    height: auto !important;
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  /* Koyu modda (varsayılan) seçili olmayan linkler beyaz */
  body.dark-mode .sider-nav .sider-link span {
    display: inline !important;
    color: #ffffff !important;
  }

  /* Açık modda seçili olmayan linkler siyah */
  body.light-mode .sider-nav .sider-link span {
    display: inline !important;
    color: #0d1a14 !important;
  }

  /* Seçili linkler her iki modda da yeşil */
  .sider-nav .sider-link.active span {
    color: var(--accent) !important;
    font-weight: 600;
  }

  /* Yasal belgeler mobilde açıkken göster */
  .sider.is-open .sider-legal {
    display: block !important;
  }

  .sider.is-open .sider-legal-title {
    display: block !important;
    color: var(--accent) !important;
  }

  .sider.is-open .sider-legal-link span {
    display: inline !important;
  }

  /* Koyu modda yasal belgeler - beyaz yapılıyor */
  body.dark-mode .sider.is-open .sider-legal-link span {
    color: #ffffff !important;
  }

  body.dark-mode .sider.is-open .sider-legal-link:hover span {
    color: var(--accent) !important;
  }

  /* Açık modda yasal belgeler - beyaz yap */
  body.light-mode .sider.is-open .sider-legal-link span {
    color: #ffffff !important;
  }

  body.light-mode .sider.is-open .sider-legal-link:hover span {
    color: var(--accent) !important;
  }
}
