/* ============================================================
   BAÜN İSGBYS - Custom Theme Override
   Eski projedeki güzel tasarım elementlerinin entegrasyonu
   ============================================================ */

/* === 1. CSS Değişken Override'ları === */
:root {
  --isg-primary: #1e293b;
  --isg-primary-rgb: 30, 41, 59;
  --isg-primary-light: #334155;
  --isg-primary-lighter: #e2e8f0;
  --isg-accent: #3b82f6;
  --isg-accent-rgb: 59, 130, 246;
  --isg-sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  --isg-sidebar-text: #94a3b8;
  --isg-sidebar-active: #3b82f6;
  --isg-sidebar-hover-bg: rgba(59, 130, 246, 0.1);
  --isg-card-radius: 12px;
  --isg-card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(27, 46, 94, 0.08);
  --isg-card-shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 12px 32px rgba(27, 46, 94, 0.12);
  --isg-body-bg: #f1f5f9;
  --isg-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 2. Body & Arka Plan === */
body {
  background-color: var(--isg-body-bg) !important;
  position: relative;
}

/* Mazgal/Grid Arka Plan Deseni */
.pc-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(30, 41, 59, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.pc-container .pc-content {
  position: relative;
  z-index: 1;
}

/* Sidebar kapalıyken grid tam genişlik */
.pc-sidebar.pc-sidebar-hide ~ .pc-container::before {
  left: 0;
}

/* === 3. Sidebar Tasarımı === */
.pc-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
  border-right: 1px solid rgba(255,255,255,0.05) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15) !important;
}

.pc-sidebar .m-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 16px 20px;
}

.pc-sidebar .m-header .b-brand img {
  opacity: 1;
  padding: 10px;
}

/* Sidebar Menü Stilleri */
.pc-sidebar .navbar-content {
  background: transparent !important;
}

.pc-sidebar .pc-navbar > .pc-item > .pc-link {
  color: #94a3b8 !important;
  border-radius: 8px;
  margin: 2px 12px;
  padding: 10px 14px !important;
  transition: all var(--isg-transition);
  font-size: 13.5px;
}

.pc-sidebar .pc-navbar > .pc-item > .pc-link:hover {
  color: #e2e8f0 !important;
  background: rgba(59, 130, 246, 0.08) !important;
}

.pc-sidebar .pc-navbar > .pc-item.active > .pc-link,
.pc-sidebar .pc-navbar > .pc-item > .pc-link.active {
  color: #ffffff !important;
  background: rgba(59, 130, 246, 0.15) !important;
  font-weight: 500;
}

.pc-sidebar .pc-navbar > .pc-item.active > .pc-link .pc-micon i,
.pc-sidebar .pc-navbar > .pc-item > .pc-link.active .pc-micon i {
  color: var(--isg-sidebar-active) !important;
}

/* Sidebar İkon Rengi */
.pc-sidebar .pc-micon i {
  color: #64748b !important;
  transition: color var(--isg-transition);
}

.pc-sidebar .pc-navbar > .pc-item > .pc-link:hover .pc-micon i {
  color: #93c5fd !important;
}

/* Sidebar Caption (Bölüm Başlıkları) */
.pc-sidebar .pc-caption label {
  color: #475569 !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pc-sidebar .pc-caption i {
  color: #334155 !important;
}

/* Sidebar Submenu */
.pc-sidebar .pc-submenu {
  background: rgba(0,0,0,0.15) !important;
  border-radius: 8px;
  margin: 0 12px;
  padding: 4px 0;
}

.pc-sidebar .pc-submenu .pc-link {
  color: #94a3b8 !important;
  font-size: 13px;
  padding: 12px 30px 12px 60px !important;
  transition: all var(--isg-transition);
}

.pc-sidebar .pc-submenu .pc-link:hover {
  color: #e2e8f0 !important;
  padding-left: 44px !important;
}

/* Sidebar Arrow */
.pc-sidebar .pc-arrow i {
  color: #475569 !important;
}

/* Sidebar Alt Kullanıcı Kartı */
.pc-sidebar .card.pc-user-card {
  background: rgba(255,255,255,0.05) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.pc-sidebar .card.pc-user-card h6 {
  color: #e2e8f0 !important;
}

.pc-sidebar .card.pc-user-card .btn-icon i {
  color: #94a3b8 !important;
}

.pc-sidebar .card.pc-user-card .dropdown-menu {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
}

.pc-sidebar .card.pc-user-card .dropdown-menu a {
  color: #94a3b8;
}

.pc-sidebar .card.pc-user-card .dropdown-menu a:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.1);
}

/* === 4. Header Tasarımı === */
.pc-header {
  background: rgba(241, 245, 249, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* === 5. Card Tasarımı === */
.card {
  border-radius: var(--isg-card-radius) !important;
  box-shadow: var(--isg-card-shadow) !important;
  border: 1px solid rgba(0,0,0,0.04) !important;
  transition: box-shadow var(--isg-transition), transform var(--isg-transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--isg-card-shadow-hover) !important;
}

.card .card-header {
  background: transparent;
  border-bottom: 1px solid #f1f5f9;
  padding: 16px 24px;
}

.card .card-body {
  padding: 20px 24px;
}

/* Özel KPI/Stat kartları */
.card.support-bar {
  border-left: 4px solid var(--isg-accent) !important;
  border-radius: var(--isg-card-radius) !important;
}

.card.support-bar:nth-child(2) {
  border-left-color: #10b981 !important;
}

/* === 6. Buton Tasarımları === */
.btn-primary {
  background: var(--isg-primary) !important;
  border-color: var(--isg-primary) !important;
  border-radius: 8px;
  font-weight: 500;
  transition: all var(--isg-transition);
}

.btn-primary:hover {
  background: var(--isg-primary-light) !important;
  border-color: var(--isg-primary-light) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--isg-primary-rgb), 0.3);
}

.btn-outline-primary {
  color: var(--isg-primary) !important;
  border-color: var(--isg-primary) !important;
  border-radius: 8px;
  font-weight: 500;
  transition: all var(--isg-transition);
}

.btn-outline-primary:hover {
  background: var(--isg-primary) !important;
  border-color: var(--isg-primary) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* === 7. Alert/Badge Geliştirmeleri === */
.badge {
  border-radius: 6px;
  font-weight: 500;
  padding: 4px 10px;
}

.alert {
  border-radius: 10px;
}

/* === 8. Tablo Geliştirmeleri === */
.table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.table-dark th {
  background: var(--isg-primary) !important;
  color: #e2e8f0 !important;
}

/* === 9. Progress Bar Geliştirmesi === */
.progress {
  border-radius: 8px;
  height: 8px;
  background: #e2e8f0;
}

.progress-bar {
  border-radius: 8px;
}

/* === 10. Tab Stilleri Güncelleme === */
.nav-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--isg-primary) 0%, var(--isg-primary-light) 100%) !important;
  color: white !important;
  border-color: var(--isg-primary) !important;
  border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link {
  border-radius: 8px 8px 0 0;
  font-weight: 500;
  transition: all var(--isg-transition);
  color: #64748b;
}

.nav-tabs .nav-link:hover {
  color: var(--isg-primary);
}

/* === 11. Scrollbar Özelleştirme === */
.pc-sidebar .navbar-content::-webkit-scrollbar {
  width: 4px;
}

.pc-sidebar .navbar-content::-webkit-scrollbar-track {
  background: transparent;
}

.pc-sidebar .navbar-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.pc-sidebar .navbar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* === 12. Footer === */
.pc-footer {
  background: transparent !important;
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* === 13. Page Header === */
.page-header h2 {
  color: var(--isg-primary);
  font-weight: 600;
}

/* === 14. Loader === */
.loader-fill {
  background: linear-gradient(135deg, var(--isg-accent), var(--isg-primary)) !important;
}

/* === 15. Form Elemanları === */
.form-control:focus,
.form-select:focus {
  border-color: var(--isg-accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(var(--isg-accent-rgb), 0.15) !important;
}

/* === 16. Gradient Kartlar (Personel Hareketleri vs.) === */
.card[style*="linear-gradient"] {
  border: none !important;
  border-radius: var(--isg-card-radius) !important;
}

/* === 17. Responsive === */
@media (max-width: 1024px) {
  .pc-container::before {
    left: 0;
  }
}
