@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

:root {
  --sidebar-collapsed: 88px;
  --sidebar-expanded: 300px;
  --sidebar-bg: #F5F6FB;
  --sidebar-border: #e4e9f5;
  --sidebar-shadow: 0 28px 60px rgba(20, 46, 115, 0.18);
  --sidebar-primary: #1f58d5;
  --sidebar-primary-dark: #123a8c;
  --sidebar-text: #142552;
  --sidebar-muted: #6b7a9a;
  --sidebar-hover: #eef3ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

body {
  background: #F5F6FB;
  min-height: 100vh;
}

/* ===== Global Modal Header Styling (applies sitewide) ===== */
.modal-header,
.themed-modal .modal-header {
  background: linear-gradient(120deg, #324cdd, #7f9cf5) !important;
  color: #fff !important;
  border-bottom: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header .modal-title,
.modal-header h5 {
  color: #fff !important;
  font-weight: 700;
}

.modal-header .close {
  opacity: 1 !important;
  color: #fff !important;
  text-shadow: none;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  position: relative;
  top: 3px;
  right: 6px;
  transform: translateY(2px);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.modal-header .close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.modal-header .btn-close {
  opacity: 1 !important;
  color: #fff !important;
  text-shadow: none;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3e%3cpath d='M2.146 2.146a.5.5 0 0 1 .708 0L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
  margin: 0;
  position: relative;
  top: 3px;
  right: 6px;
  transform: translateY(2px);
}

.modal-header .btn-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
/* ===== Global Table Alignment ===== */
.table th,
.table td,
.user-table th,
.user-table td {
  vertical-align: middle !important; /* Dikey ortalama */
  text-align: center !important;     /* Yatay ortalama */
}

/* ===== Sticky Table Headers (global) ===== */
.table-wrapper table thead th,
.table-responsive thead th,
table.sticky-head thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f6f8ff;
  box-shadow: 0 2px 10px rgba(20, 33, 61, 0.14);
}
/* ========== SIDEBAR CORE ========== */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-collapsed);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: var(--sidebar-shadow);
  padding: 26px 0 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  transition: width 0.28s ease;
    filter: none !important;
  opacity: 1 !important;
  z-index: 1050;
}

/* Desktop: show pointer when sidebar can expand on hover */
@media (min-width: 1200px) {
  .sidebar {
    cursor: pointer !important;
  }
  .sidebar.locked {
    cursor: default !important;
  }
}

/* genişlemiş durumda (hover-open veya opened class ile) */
.sidebar.hover-open,
.sidebar.opened {
  width: var(--sidebar-expanded);
}

/* locked ise genişlemesin */
.sidebar.locked.hover-open,
.sidebar.locked.opened {
  width: var(--sidebar-collapsed);
}

/* kapama butonu (sadece mobile’da görünüyor aslında) */
.sidebar .sidebar-close-btn {
  margin: 0 auto 20px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--sidebar-primary);
  color: #fff;
  border: none;
  display: none;
  place-items: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(31, 88, 213, 0.25);
}

.sidebar .sidebar-close-btn i {
  font-size: 22px;
}

/* üst blok (kilit kartı + vs) */
.sidebar-controls {
  padding: 0 18px 22px;
}

/* kilit kartının ana container'ı */
.sidebar-lock-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95),
    rgba(31, 88, 213, 0.12)
  );
  border: 1px solid rgba(31, 88, 213, 0.18);
  box-shadow: 0 18px 32px rgba(20, 46, 115, 0.12);
}

/* kart içindeki metin */
.sidebar-lock-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.sidebar-lock-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sidebar-text);
}

.sidebar-lock-desc {
  font-size: 12px;
  color: var(--sidebar-text); /* önce --sidebar-muted idi, soluktu */
  opacity: 1;                /* 0.85 yerine tam */
}

/* kilit butonu */
.sidebar-lock-btn {
  border: none;
  background: rgba(31, 88, 213, 0.12); /* daha dolu mavi, sabit */
  color: var(--sidebar-text);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(31, 88, 213, 0.22);
  transition: none;
}

.sidebar-lock-btn .sidebar-lock-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(31, 88, 213, 0.32); /* 0.18 -> biraz daha dolu */
  color: var(--sidebar-primary);
  font-size: 18px;
  transition: none;
}

.sidebar-lock-btn .lock-label {
  white-space: nowrap;
}

/* hover’da renk değiştirme YOK artık */
.sidebar-lock-btn:hover {
  background: rgba(31, 88, 213, 0.12);
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(31, 88, 213, 0.22);
}

.sidebar-lock-btn:hover .sidebar-lock-icon {
  background: rgba(31, 88, 213, 0.32);
  color: var(--sidebar-primary);
}

/* locked modda sabit mavi buton */
.sidebar.locked .sidebar-lock-btn {
  background: var(--sidebar-primary);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.sidebar.locked .sidebar-lock-btn .sidebar-lock-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* COLLAPSED MOD: kart küçülür, sadece mavi kare kalır */
.sidebar.close .sidebar-lock-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  justify-content: center;
}

.sidebar.close .sidebar-lock-text {
  display: none;
}

.sidebar.close .sidebar-lock-btn {
  padding: 0;
  width: 60px;
  height: 60px;
  justify-content: center;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.sidebar.close .sidebar-lock-btn .lock-label {
  display: none;
}

.sidebar.close .sidebar-lock-btn .sidebar-lock-icon {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: rgba(31, 88, 213, 0.18);
  color: var(--sidebar-primary);
}

/* locked değilse bile sabit stil kalsın */
.sidebar.close:not(.locked) .sidebar-lock-btn .sidebar-lock-icon {
  background: rgba(31, 88, 213, 0.18);
  color: var(--sidebar-primary);
}

/* ========== NAV LINKS ========== */

.sidebar .nav-links {
  list-style: none;
  padding: 0 12px;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar .nav-links::-webkit-scrollbar {
  width: 0;
}

.sidebar .nav-links > li {
  margin-bottom: 6px;
}

/* her zaman aktif görünüm */
.sidebar .nav-links > li > a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--sidebar-hover);      /* artık hep dolu arka plan */
  color: var(--sidebar-text);            /* gri değil, koyu metin */
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 16px 32px rgba(20, 46, 115, 0.06); /* hafif depth */
  transition: none;
  cursor: pointer; /* Sidebar menü linklerinde el imleci */
}

/* ikon da her zaman dolu */
.sidebar .nav-links > li > a i {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 88, 213, 0.24); /* 0.48 çok patlıyordu, 0.24 dengeli */
  color: var(--sidebar-primary);
  border-radius: 14px;
  font-size: 20px;
  transition: none;
}

/* hover’da değişmesin */
.sidebar .nav-links > li > a:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
  box-shadow: 0 16px 32px rgba(20, 46, 115, 0.06);
  cursor: pointer !important;
}

/* Ensure pointer also on inner elements inside the link (icon, text) */
.sidebar .nav-links > li > a *,
.sidebar .nav-links > li > a:hover * {
  cursor: pointer !important;
}

.sidebar .nav-links > li > a:hover i {
  background: rgba(31, 88, 213, 0.24);
  color: var(--sidebar-primary);
}

/* link yazısı */
.sidebar .nav-links > li > a .link_name {
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  transition: none;
}

/* collapsed modda metin yok */
.sidebar.close .nav-links > li > a .link_name {
  display: none;
}

/* collapsed modda ortala ikonları */
.sidebar.close .nav-links > li > a {
  justify-content: center;
  padding: 12px 0;
}

/* collapsed durumda da aynı renkler kalsın */
.sidebar.close .nav-links > li > a {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
  box-shadow: 0 16px 32px rgba(20, 46, 115, 0.06);
}

.sidebar.close .nav-links > li > a i {
  background: rgba(31, 88, 213, 0.24);
  color: var(--sidebar-primary);
}

/* ========== TOOLTIP (küçük hover tooltip gibi şeyler) ========== */

.sidebar-hover-tooltip {
  position: fixed;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--sidebar-text);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 16px 32px rgba(20, 46, 115, 0.18);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) scale(0.95);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 2000;
  white-space: nowrap;
  display: none;
}

.sidebar-hover-tooltip.visible {
  display: block;
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* ========== FOOTER / USER CARD ========== */

.sidebar .sidebar-footer {
  padding: 16px 18px 0;
  border-top: 1px solid var(--sidebar-border);
  opacity: 1;               /* her zaman görünür */
  transform: none;
  pointer-events: auto;
  box-shadow: none;
  transition: none;
}

.sidebar.close .sidebar-footer {
  padding: 18px 0;
  display: flex;
  justify-content: center;
}

/* user card */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar.close .sidebar-user-card {
  flex-direction: column;
  align-items: center;
}

.sidebar-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(31, 88, 213, 0.18);
}

.sidebar.close .sidebar-user-avatar {
  border-radius: 50%;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--sidebar-text);
}

.sidebar.close .sidebar-user-info {
  display: none;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--sidebar-text);
}

.sidebar-user-role {
  font-size: 12px;
  color: var(--sidebar-text); /* muted yerine text rengi */
  white-space: nowrap;
}

/* logout butonu */
.sidebar-logout-btn {
  margin-left: auto;
  border: none;
  background: rgba(20, 46, 115, 0.08);
  color: var(--sidebar-primary);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  cursor: pointer;
  transition: none;
}

.sidebar.close .sidebar-logout-btn {
  margin-left: 0;
}

/* ========== OVERLAY (mobilde arkayı karartma) ========== */

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 26, 54, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 1040;
}

/* sidebar açıldığında overlay aktif */
.sidebar.hover-open ~ .sidebar-overlay,
.sidebar.opened ~ .sidebar-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* locked durumunda overlay devre dışı */
.sidebar.locked.hover-open ~ .sidebar-overlay,
.sidebar.locked.opened ~ .sidebar-overlay {
  opacity: 1;
  visibility: hidden;
  pointer-events: none;
}


.home-section {
  position: relative;
  min-height: 100vh;
  margin-left: var(--sidebar-collapsed);
  transition: filter 0.28s ease;
}

.home-section .hamburger-btn {
  border: none;
  background: #1E58D5;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;

  /* efekler */
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
  box-shadow: 0 18px 32px rgba(20, 46, 115, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  /* 🔹 pozisyon: sağ alt köşe */
  position: fixed;
  bottom: 40px;
  right: 40px;

  z-index: 1100;
}

/* hover & focus efektleri */
.home-section .hamburger-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 24px 42px rgba(20, 46, 115, 0.38);
  opacity: 0.9;
}

.home-section .hamburger-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 88, 213, 0.25);
}


.mobile-only {
  display: none;
}

body.sidebar-mobile-open {
  overflow: hidden;
}

.home-section .main {
  padding: 32px;
}

@media (max-width: 1200px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1100;
  }

  .sidebar.hover-open,
  .sidebar.opened {
    transform: translateX(0);
    width: var(--sidebar-expanded);
  }

  .sidebar .sidebar-close-btn {
    display: grid;
  }

 .home-section .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 30px;

    position: fixed;
    bottom: 24px;
    right: 24px;
  }

  .mobile-only {
    display: block;
  }

  .home-section {
    margin-left: 0;
    padding-top: 10px;
  }

  .home-section .main {
    padding: 24px 16px;
  }
}

@media (min-width: 1200px) {
  .home-section .hamburger-btn {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar .nav-links > li > a {
    justify-content: flex-start;
    padding: 12px 20px;
  }
}
/* ===== Global cursor rules for clickable elements ===== */
a,
a[href],
button,
.btn,
a.btn,
.nav-link,
[role="button"],
[onclick],
[data-action],
[data-toggle],
[data-bs-toggle],
label[for],
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
.cursor-pointer,
.dropdown-item,
.page-link,
.list-group-item-action {
  cursor: pointer !important;
}

/* Sidebar menu: make entire list row show pointer, including inner elements */
.sidebar .nav-links,
.sidebar .nav-links *,
.sidebar .nav-links > li,
.sidebar .nav-links > li:hover,
.sidebar .nav-links > li *,
.sidebar .nav-links > li:hover * {
  cursor: pointer !important;
}

/* Broader fallbacks for other interactive elements */
:any-link,
[tabindex]:not([tabindex="-1"]),
summary {
  cursor: pointer !important;
}

/* Disabled states should reflect not-allowed */
button:disabled,
.btn:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled,
a.disabled,
.disabled,
[aria-disabled="true"],
fieldset:disabled button,
fieldset:disabled .btn {
  cursor: not-allowed !important;
}
