/* ====================================================
   KuzgunPanel – Modern UI Overrides
   ==================================================== */

/* ---------- Genel Temel ---------- */
html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

body {
  font-family: 'Inter', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #f4f6fb;
  color: #3a3f5c;
  margin-bottom: 60px;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

/* Topbar yüksekliğini theme'ye bildir */
#page-topbar {
  height: 64px;
}

/* ---------- Focus / Accessibility ---------- */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.15rem rgba(87, 136, 255, 0.35);
  outline: none;
}

/* ---------- Topbar ---------- */
#page-topbar {
  background: linear-gradient(135deg, #1e2a4a 0%, #263256 100%) !important;
  box-shadow: 0 2px 16px rgba(30, 42, 74, 0.18) !important;
  border-bottom: none !important;
}

.navbar-header {
  height: 64px !important;
}

.navbar-brand-box {
  background: transparent !important;
  border-right: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.navbar-brand-box img {
  max-height: 26px;
  width: auto;
  filter: brightness(1.1);
}

#vertical-menu-btn {
  color: rgba(255,255,255,0.85) !important;
  font-size: 1.05rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

#vertical-menu-btn:hover {
  color: #fff !important;
}

/* User dropdown button */
#page-header-user-dropdown {
  color: rgba(255,255,255,0.88) !important;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  transition: background 0.2s;
}

#page-header-user-dropdown:hover {
  background: rgba(255,255,255,0.1) !important;
}

.header-profile-user {
  width: 32px !important;
  height: 32px !important;
  border: 2px solid rgba(255,255,255,0.3);
  object-fit: cover;
}

/* ---------- Sidebar ---------- */
.vertical-menu {
  background: linear-gradient(180deg, #1e2a4a 0%, #202c50 60%, #1a2340 100%) !important;
  box-shadow: 3px 0 24px rgba(30, 42, 74, 0.22) !important;
  border-right: none !important;
  top: 64px !important;
}

#sidebar-menu ul li a {
  color: rgba(200, 210, 235, 0.82) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 11px 20px !important;
  border-radius: 8px !important;
  margin: 2px 10px !important;
  transition: all 0.22s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  letter-spacing: 0.02em;
}

#sidebar-menu ul li a:hover {
  background: rgba(87, 136, 255, 0.15) !important;
  color: #ffffff !important;
  transform: translateX(3px);
}

#sidebar-menu ul li.mm-active > a {
  background: linear-gradient(90deg, #5788ff 0%, #3a6be0 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(87, 136, 255, 0.35) !important;
}

#sidebar-menu ul li a i {
  font-size: 1.1rem !important;
  min-width: 20px;
  text-align: center;
  opacity: 0.9;
}

.menu-title {
  color: rgba(255,255,255,0.35) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  padding: 18px 20px 6px !important;
}

/* Submenu */
#sidebar-menu ul.submenu {
  background: rgba(0,0,0,0.18) !important;
  border-radius: 8px !important;
  margin: 2px 10px !important;
  padding: 4px 0 !important;
}

#sidebar-menu ul.submenu li a {
  font-size: 0.84rem !important;
  padding: 9px 16px 9px 38px !important;
  margin: 1px 4px !important;
  color: rgba(180, 198, 230, 0.78) !important;
}

#sidebar-menu ul.submenu li a:hover {
  color: #c8d9ff !important;
  background: rgba(87,136,255,0.12) !important;
  transform: translateX(2px);
}

/* ---------- Page Content ---------- */
.page-content {
  padding: 24px 20px !important;
  padding-top: calc(64px + 24px) !important;
  min-height: calc(100vh - 64px);
}

/* ---------- Main Content ---------- */
.main-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ---------- Cards ---------- */
.card {
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 12px rgba(30, 42, 74, 0.08) !important;
  background: #ffffff !important;
  transition: box-shadow 0.25s ease, transform 0.2s ease !important;
}

.card:hover {
  box-shadow: 0 6px 24px rgba(30, 42, 74, 0.13) !important;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid #eef0f6 !important;
  padding: 18px 22px !important;
  border-radius: 14px 14px 0 0 !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  color: #2d3560 !important;
}

.card-body {
  padding: 20px 22px !important;
}

.card-title {
  font-weight: 700 !important;
  font-size: 1rem !important;
  color: #2d3560 !important;
  margin-bottom: 6px !important;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: 8px !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  padding: 8px 18px !important;
  transition: all 0.22s ease !important;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, #5788ff 0%, #3a6be0 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(87, 136, 255, 0.3) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4a7aff 0%, #2f5fd4 100%) !important;
  box-shadow: 0 6px 18px rgba(87, 136, 255, 0.4) !important;
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #36c98e 0%, #22a875 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(54, 201, 142, 0.3) !important;
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #e84545 100%) !important;
  border: none !important;
}

.btn-warning {
  background: linear-gradient(135deg, #ffa940 0%, #f08020 100%) !important;
  border: none !important;
  color: #fff !important;
}

.btn-info {
  background: linear-gradient(135deg, #3ed6d6 0%, #1eb8cc 100%) !important;
  border: none !important;
}

.btn-secondary {
  background: #eef0f8 !important;
  border: none !important;
  color: #3a3f5c !important;
}

.btn-secondary:hover {
  background: #e0e4f0 !important;
  color: #1e2a4a !important;
}

/* ---------- Form Controls ---------- */
.form-control,
.form-select {
  border-radius: 9px !important;
  border: 1.5px solid #e2e6f0 !important;
  background: #f8f9fd !important;
  color: #3a3f5c !important;
  font-size: 0.875rem !important;
  padding: 9px 14px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.form-control:focus,
.form-select:focus {
  border-color: #5788ff !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(87, 136, 255, 0.12) !important;
}

label {
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  color: #5a6080 !important;
  margin-bottom: 5px !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Tables ---------- */
.table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.table thead th {
  background: #f4f6fb !important;
  color: #5a6080 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  border-bottom: 2px solid #e8eaf2 !important;
  padding: 12px 16px !important;
}

.table tbody tr {
  transition: background 0.15s !important;
}

.table tbody tr:hover {
  background: #f0f4ff !important;
}

.table tbody td {
  padding: 12px 16px !important;
  font-size: 0.875rem !important;
  color: #3a3f5c !important;
  border-bottom: 1px solid #f0f2f8 !important;
  vertical-align: middle !important;
}

/* ---------- Badges ---------- */
.badge {
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 0.76rem !important;
  padding: 4px 10px !important;
  letter-spacing: 0.03em;
}

/* ---------- Alerts ---------- */
.alert {
  border: none !important;
  border-radius: 12px !important;
  font-size: 0.88rem !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07) !important;
}

/* ---------- Dropdown Menus ---------- */
.dropdown-menu {
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(30, 42, 74, 0.16) !important;
  padding: 8px !important;
  font-size: 0.875rem !important;
}

.dropdown-item {
  border-radius: 8px !important;
  padding: 8px 14px !important;
  font-weight: 500 !important;
  color: #3a3f5c !important;
  transition: background 0.18s !important;
}

.dropdown-item:hover {
  background: #f0f4ff !important;
  color: #1e2a4a !important;
}

/* ---------- Page Title ---------- */
.page-title-box h4,
.page-title-box .page-title {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: #1e2a4a !important;
  letter-spacing: -0.01em;
}

.breadcrumb-item,
.breadcrumb-item a {
  font-size: 0.82rem !important;
  color: #8892b0 !important;
  text-decoration: none !important;
}

.breadcrumb-item.active {
  color: #5788ff !important;
  font-weight: 600 !important;
}

/* ---------- Simplebar Scrollbar ---------- */
.simplebar-scrollbar::before {
  background: rgba(87, 136, 255, 0.35) !important;
  border-radius: 4px !important;
}

/* ---------- Stat / Mini Widgets ---------- */
.mini-stats-wid .mini-stat-icon {
  border-radius: 12px !important;
}

/* ---------- Modals ---------- */
.modal-content {
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(30, 42, 74, 0.22) !important;
}

.modal-header {
  border-bottom: 1px solid #eef0f6 !important;
  padding: 20px 24px !important;
  border-radius: 16px 16px 0 0 !important;
}

.modal-title {
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  color: #1e2a4a !important;
}

.modal-body {
  padding: 22px 24px !important;
}

.modal-footer {
  border-top: 1px solid #eef0f6 !important;
  padding: 16px 24px !important;
  border-radius: 0 0 16px 16px !important;
}

/* ---------- Responsive: Mobile Header ---------- */
@media (max-width: 576px) {
  #page-header-user-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  #header-avatar {
    display: none !important;
  }
  #header-username {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    font-size: 0.88rem;
  }
  .header-profile-user {
    display: none !important;
  }
}

/* ---------- Select2 ---------- */
.select2-container--default .select2-selection--single {
  border-radius: 9px !important;
  border: 1.5px solid #e2e6f0 !important;
  height: 40px !important;
  background: #f8f9fd !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 38px !important;
  color: #3a3f5c !important;
  font-size: 0.875rem !important;
  padding-left: 14px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px !important;
}

.select2-container--default .select2-results__option--highlighted {
  background: #5788ff !important;
  border-radius: 6px !important;
}

.select2-dropdown {
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 32px rgba(30,42,74,0.14) !important;
}

/* ---------- DataTables ---------- */
.dataTables_wrapper .dataTables_filter input {
  border-radius: 8px !important;
  border: 1.5px solid #e2e6f0 !important;
  padding: 6px 12px !important;
  font-size: 0.875rem !important;
  background: #f8f9fd !important;
}

.dataTables_wrapper .dataTables_length select {
  border-radius: 8px !important;
  border: 1.5px solid #e2e6f0 !important;
  padding: 5px 10px !important;
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item .page-link {
  border-radius: 7px !important;
  border: none !important;
  margin: 0 2px !important;
  color: #5788ff !important;
  font-weight: 500 !important;
  font-size: 0.85rem !important;
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #5788ff 0%, #3a6be0 100%) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(87,136,255,0.3) !important;
}

/* ---------- Toastr ---------- */
#toast-container > .toast {
  border-radius: 12px !important;
  box-shadow: 0 6px 24px rgba(0,0,0,0.14) !important;
  font-size: 0.875rem !important;
  opacity: 1 !important;
}

/* ---------- Sweet Alert ---------- */
.swal2-popup {
  border-radius: 16px !important;
  font-family: 'Inter', 'Nunito', sans-serif !important;
}

/* ---------- Scrollbar (Custom) ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f4f6fb;
}

::-webkit-scrollbar-thumb {
  background: #c5cce8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0acd4;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
.page-content > .container-fluid > .row > * {
  animation: fadeInUp 0.3s ease both;
}

/* ---------- Utility ---------- */
.text-gradient {
  background: linear-gradient(135deg, #5788ff 0%, #a06bff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rounded-xl {
  border-radius: 14px !important;
}

.shadow-soft {
  box-shadow: 0 2px 16px rgba(30,42,74,0.09) !important;
}
