html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* Explicit Button Utilities ensuring 100% visibility */
.btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 1rem !important;
  background-color: #072847 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 4px 14px 0 rgba(7, 40, 71, 0.25) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
}
.btn-primary:hover {
  background-color: #0a3660 !important;
  transform: translateY(-1px) scale(1.02) !important;
  box-shadow: 0 6px 20px 0 rgba(7, 40, 71, 0.35) !important;
}
.btn-primary:active {
  transform: translateY(0) scale(0.99) !important;
}

.btn-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 0.875rem !important;
  background-color: #ffffff !important;
  color: #374151 !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  border-radius: 0.75rem !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  text-decoration: none !important;
}
.btn-secondary:hover {
  background-color: #f9fafb !important;
  border-color: #d1d5db !important;
  transform: translateY(-1px) !important;
}

.btn-danger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 1rem !important;
  background-color: #e11d48 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
}
.btn-danger:hover {
  background-color: #be123c !important;
  transform: translateY(-1px) scale(1.02) !important;
}

/* ===== Brand Colors & Gradient Utilities ===== */
.bg-brand-500 { background-color: #072847; }
.bg-brand-600 { background-color: #0a3660; }
.bg-brand-650 { background-color: #062039; }
.bg-brand-700 { background-color: #072847; }
.text-brand-500 { color: #072847; }
.text-brand-600 { color: #0a3660; }
.text-brand-650 { color: #062039; }
.border-brand-500 { border-color: #072847; }
.hover\:bg-brand-650:hover { background-color: #062039; }
.hover\:bg-brand-700:hover { background-color: #072847; }

.dashboard-liquidity-banner {
  background: linear-gradient(135deg, #072847 0%, #0a3660 50%, #020d18 100%) !important;
}

/* ===== Responsive CSS Grid & Flex Utilities (Complete 1-12 Cols & Spans) ===== */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-6 { grid-column: span 6 / span 6; }
.col-span-7 { grid-column: span 7 / span 7; }
.col-span-8 { grid-column: span 8 / span 8; }
.col-span-9 { grid-column: span 9 / span 9; }
.col-span-10 { grid-column: span 10 / span 10; }
.col-span-11 { grid-column: span 11 / span 11; }
.col-span-12 { grid-column: span 12 / span 12; }
.col-span-full { grid-column: 1 / -1; }

@media (min-width: 640px) {
  .sm\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .sm\:col-span-1 { grid-column: span 1 / span 1 !important; }
  .sm\:col-span-2 { grid-column: span 2 / span 2 !important; }
  .sm\:col-span-3 { grid-column: span 3 / span 3 !important; }
  .sm\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .sm\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .sm\:col-span-6 { grid-column: span 6 / span 6 !important; }
  .sm\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .sm\:col-span-8 { grid-column: span 8 / span 8 !important; }
  .sm\:col-span-9 { grid-column: span 9 / span 9 !important; }
  .sm\:col-span-10 { grid-column: span 10 / span 10 !important; }
  .sm\:col-span-11 { grid-column: span 11 / span 11 !important; }
  .sm\:col-span-12 { grid-column: span 12 / span 12 !important; }
  .sm\:col-span-full { grid-column: 1 / -1 !important; }
  .sm\:flex-row { flex-direction: row !important; }
  .sm\:flex-col { flex-direction: column !important; }
  .sm\:items-center { align-items: center !important; }
  .sm\:justify-between { justify-content: space-between !important; }
}

@media (min-width: 768px) {
  .md\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .md\:col-span-1 { grid-column: span 1 / span 1 !important; }
  .md\:col-span-2 { grid-column: span 2 / span 2 !important; }
  .md\:col-span-3 { grid-column: span 3 / span 3 !important; }
  .md\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .md\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .md\:col-span-6 { grid-column: span 6 / span 6 !important; }
  .md\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .md\:col-span-8 { grid-column: span 8 / span 8 !important; }
  .md\:col-span-9 { grid-column: span 9 / span 9 !important; }
  .md\:col-span-10 { grid-column: span 10 / span 10 !important; }
  .md\:col-span-11 { grid-column: span 11 / span 11 !important; }
  .md\:col-span-12 { grid-column: span 12 / span 12 !important; }
  .md\:col-span-full { grid-column: 1 / -1 !important; }
  .md\:flex-row { flex-direction: row !important; }
  .md\:flex-col { flex-direction: column !important; }
  .md\:items-center { align-items: center !important; }
  .md\:justify-between { justify-content: space-between !important; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .lg\:col-span-1 { grid-column: span 1 / span 1 !important; }
  .lg\:col-span-2 { grid-column: span 2 / span 2 !important; }
  .lg\:col-span-3 { grid-column: span 3 / span 3 !important; }
  .lg\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .lg\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .lg\:col-span-6 { grid-column: span 6 / span 6 !important; }
  .lg\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .lg\:col-span-8 { grid-column: span 8 / span 8 !important; }
  .lg\:col-span-9 { grid-column: span 9 / span 9 !important; }
  .lg\:col-span-10 { grid-column: span 10 / span 10 !important; }
  .lg\:col-span-11 { grid-column: span 11 / span 11 !important; }
  .lg\:col-span-12 { grid-column: span 12 / span 12 !important; }
  .lg\:col-span-full { grid-column: 1 / -1 !important; }
  .lg\:flex-row { flex-direction: row !important; }
  .lg\:flex-col { flex-direction: column !important; }
  .lg\:items-center { align-items: center !important; }
  .lg\:justify-between { justify-content: space-between !important; }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .xl\:col-span-1 { grid-column: span 1 / span 1 !important; }
  .xl\:col-span-2 { grid-column: span 2 / span 2 !important; }
  .xl\:col-span-3 { grid-column: span 3 / span 3 !important; }
  .xl\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .xl\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .xl\:col-span-6 { grid-column: span 6 / span 6 !important; }
  .xl\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .xl\:col-span-8 { grid-column: span 8 / span 8 !important; }
  .xl\:col-span-9 { grid-column: span 9 / span 9 !important; }
  .xl\:col-span-10 { grid-column: span 10 / span 10 !important; }
  .xl\:col-span-11 { grid-column: span 11 / span 11 !important; }
  .xl\:col-span-12 { grid-column: span 12 / span 12 !important; }
  .xl\:col-span-full { grid-column: 1 / -1 !important; }
}

/* ===== Main Content Offset + Sidebar Rail (icon-only) ===== */
#sidebar {
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease-out;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .main-content-wrapper {
    padding-left: 248px;
    transition: padding-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Daraltılmış = RAIL: yalnızca ikonlar. Genişlik, sola hizalı ikonu görsel olarak
     ortalayacak şekilde seçildi (ikon ekspand'deki x'te kalır, rail'de de ortada durur). */
  html.sidebar-collapsed #sidebar {
    width: 76px;
  }
  html.sidebar-collapsed .main-content-wrapper {
    padding-left: 76px;
  }

  /* Rail modunda metinleri/alt menüleri/chevron'ları gizle, ikonları ortala */
  html.sidebar-collapsed:not(.sidebar-peek) .sidebar-brand-text,
  html.sidebar-collapsed:not(.sidebar-peek) .sidebar-link span,
  html.sidebar-collapsed:not(.sidebar-peek) .sidebar-link svg:not(.sidebar-icon),
  html.sidebar-collapsed:not(.sidebar-peek) .sidebar-submenu,
  html.sidebar-collapsed:not(.sidebar-peek) .rail-hide {
    display: none !important;
    opacity: 0;
  }

  html.sidebar-collapsed:not(.sidebar-peek) .sidebar-heading {
    visibility: hidden;
  }

  /* Genişlerken içeriklerin anında çıkıp patlamasını önlemek için fade-in ve delay ekliyoruz */
  html.sidebar-collapsed.sidebar-peek .sidebar-brand-text,
  html.sidebar-collapsed.sidebar-peek .sidebar-link span,
  html.sidebar-collapsed.sidebar-peek .sidebar-link svg:not(.sidebar-icon),
  html.sidebar-collapsed.sidebar-peek .sidebar-submenu,
  html.sidebar-collapsed.sidebar-peek .rail-hide {
    animation: fadeInRailContent 0.15s ease-out both;
    animation-delay: 0.08s; /* menü biraz genişledikten sonra içerik belirsin */
  }

  html.sidebar-collapsed.sidebar-peek .sidebar-heading {
    visibility: visible;
    animation: fadeInRailContent 0.15s ease-out both;
    animation-delay: 0.08s;
  }

  @keyframes fadeInRailContent {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  /* Menü ikonları doğal sol konumlarında (≈22px) kalır: açık menüdeki ikon x'i ile birebir
     aynı. Daraltınca sadece sağdaki yazı alanı kaybolur, ikon yatayda HİÇ oynamaz. */
  html.sidebar-collapsed:not(.sidebar-peek) .sidebar-link {
    overflow: hidden;
  }
  /* PEEK: hover edildiğinde sidebar genişler ve içeriği iter (sayfa daralır). */
  html.sidebar-collapsed.sidebar-peek #sidebar {
    width: 248px;
  }
  html.sidebar-collapsed.sidebar-peek .main-content-wrapper {
    padding-left: 248px;
  }
}

/* ===== Sidebar Styles ===== */

.sidebar-scroll::-webkit-scrollbar {
  width: 3px;
}
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(56, 165, 246, 0.2);
  border-radius: 9999px;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 165, 246, 0.4);
}

.sidebar-heading {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: #93c5fd; /* blue-300 */
  transition: color 0.15s ease;
}

.sidebar-link {
  display: flex;
  align-items: center;
  height: 40px; /* fixed height to prevent vertical shifting */
  gap: 0.625rem;
  padding: 0 0.625rem; /* remove vertical padding since height is fixed */
  border-radius: 0.5rem;
  font-size: 16px;
  font-weight: 500;
  color: #f0f7ff; /* beyaz-mavi parlak ton */
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-link:hover .sidebar-icon {
  color: #ffffff;
}

.sidebar-link.active {
  background: rgba(56, 165, 246, 0.15); /* primary blue tint */
  color: #38bdf8; /* sky-400 */
  font-weight: 600;
  border-color: rgba(56, 165, 246, 0.25);
}

.sidebar-link.active .sidebar-icon {
  color: #38bdf8; /* sky-400 */
}

.sidebar-submenu {
  margin-left: 1.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.125rem;
  margin-bottom: 0.25rem;
}

.sidebar-sublink {
  display: block;
  padding: 0.375rem 0.625rem;
  font-size: 15px;
  font-weight: 500;
  color: #cbd5e1; /* slate-300 */
  border-radius: 0.375rem;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.sidebar-sublink:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-sublink.active {
  color: #38bdf8; /* sky-400 */
  background: rgba(56, 165, 246, 0.12);
  font-weight: 600;
}

.page-hidden {
  display: none !important;
}