/**
 * Galerici Yönetim Sistemi - Özel Tasarım Stilleri
 * Modern, Mobil Uyumlu, Prestijli Otomotiv Arayüzü
 */

:root {
  --primary-color: #0f172a;
  --primary-accent: #2563eb;
  --secondary-accent: #3b82f6;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.32;
}

/* Global Kompakt Tipografi */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  line-height: 1.2 !important;
  margin-bottom: 0.3rem !important;
}

p {
  margin-bottom: 0.35rem;
  line-height: 1.32;
}

.small, small {
  line-height: 1.25;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar .sidebar-menu {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar .sidebar-menu::-webkit-scrollbar {
  width: 4px;
}

.sidebar .sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.sidebar .sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.sidebar .sidebar-footer {
  height: 46px;
  flex-shrink: 0;
  padding: 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.sidebar .brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .nav-link {
  color: #94a3b8;
  padding: 0.75rem 1.25rem;
  margin: 0.2rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.925rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: all 0.2s ease;
}

.sidebar .nav-link i {
  font-size: 1.2rem;
  color: #64748b;
  transition: color 0.2s ease;
}

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

.sidebar .nav-link:hover i {
  color: var(--secondary-accent);
}

.sidebar .nav-link.active {
  color: #ffffff;
  background: var(--primary-accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sidebar .nav-link.active i {
  color: #ffffff;
}

.sidebar .nav-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 1.25rem 1.5rem 0.4rem;
  font-weight: 700;
}

/* Layout Full-Width Enforcements - Tüm Sayfalar Tam Dolu Ekran */
body > .d-flex {
  width: 100% !important;
  min-height: 100vh;
  display: flex !important;
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width) !important;
  width: calc(100% - var(--sidebar-width)) !important;
  max-width: calc(100% - var(--sidebar-width)) !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

/* Top Navbar */
.topbar {
  width: 100% !important;
  height: var(--topbar-height);
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar .company-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar .date-badge {
  background-color: #f1f5f9;
  color: #475569;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
}

.topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.topbar-center .date-badge-center {
  pointer-events: auto;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.92rem;
  padding: 0.35rem 1.1rem;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .topbar-center {
    display: none !important;
  }
}

/* Cards & Content */
.content-body {
  padding: 1.5rem;
  padding-bottom: 4.5rem; /* Sabit footer için alt pay */
  flex: 1;
}

/* Sabit Footer */
.fixed-footer {
  position: fixed;
  bottom: 0;
  right: 0;
  left: var(--sidebar-width);
  height: 46px;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
  z-index: 1025;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  transition: left 0.3s ease-in-out;
}

@media (max-width: 991.98px) {
  .fixed-footer {
    left: 0 !important;
    padding: 0 1rem;
  }
}

.card {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  background-color: #ffffff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.card-header {
  background-color: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  padding: 1rem 1.25rem;
  font-weight: 600;
}

/* Stat Cards */
.stat-card {
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.primary { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.danger  { background: rgba(239, 68, 68, 0.1);  color: #ef4444; }
.stat-icon.info    { background: rgba(6, 182, 212, 0.1);  color: #0891b2; }

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

/* Turkish License Plate Badge (Türk Plaka Tasarımı) */
.tr-plate {
  display: inline-flex !important;
  align-items: stretch !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  background: #ffffff !important;
  border: 2.5px solid #000000 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  font-family: 'Segoe UI Black', 'Arial Black', Impact, sans-serif !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16) !important;
  font-size: 1.05rem;
  line-height: 1;
  vertical-align: middle;
  padding: 0 !important;
  box-sizing: border-box !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
}

.tr-plate .plate-flag {
  background: #003893 !important;
  color: #ffffff !important;
  font-family: 'Segoe UI Black', 'Arial Black', Arial, sans-serif !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: center !important;
  padding: 0.22rem 0.44rem 0.15rem 0.44rem !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
  border-right: none !important;
  letter-spacing: 0.5px !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
}

.tr-plate .plate-text {
  color: #000000 !important;
  font-family: 'Segoe UI Black', 'Arial Black', Impact, sans-serif !important;
  font-weight: 900 !important;
  -webkit-text-stroke: 0.5px #000000;
  letter-spacing: 1.5px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.18rem 0.65rem !important;
  line-height: 1.15 !important;
  text-transform: uppercase !important;
}

.tr-plate.plate-lg {
  font-size: 1.45rem !important;
  border: 3.5px solid #000000 !important;
  border-radius: 8px !important;
}

.tr-plate.plate-lg .plate-flag {
  padding: 0.35rem 0.65rem 0.22rem 0.65rem !important;
  font-size: 0.95rem !important;
  border-right: none !important;
}

.tr-plate.plate-lg .plate-text {
  padding: 0.28rem 1.1rem !important;
  letter-spacing: 2.5px !important;
  -webkit-text-stroke: 0.8px #000000;
}

.tr-plate.tr-plate-xs {
  font-size: 0.78rem !important;
  border: 1.8px solid #000000 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.tr-plate.tr-plate-xs .plate-flag {
  font-size: 0.54rem !important;
  padding: 0.08rem 0.25rem 0.05rem 0.25rem !important;
  border-right: none !important;
}

.tr-plate.tr-plate-xs .plate-text {
  padding: 0.05rem 0.32rem !important;
  letter-spacing: 0.6px !important;
  -webkit-text-stroke: 0.3px #000000;
}

/* Vehicle Grid Item Card */
.vehicle-card {
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.12);
}

.vehicle-card .card-img-wrapper {
  position: relative;
  height: 200px;
  background: #e2e8f0;
  overflow: hidden;
}

.vehicle-card .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.vehicle-card:hover .card-img-wrapper img {
  transform: scale(1.04);
}

.vehicle-card .price-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
}

/* 5'li Kompakt Araç Kartı Grid Düzeni - Tüm Sekmelerde Sabit 5 Kart */
@media (min-width: 992px) {
  .col-gallery-5 {
    flex: 0 0 20% !important;
    max-width: 20% !important;
    width: 20% !important;
  }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .col-gallery-5 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }
}
@media (max-width: 575.98px) {
  .col-gallery-5 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Kompakt Araç Kartı İç Detayları - Tüm Sekmelerde Eşit ve Orijinal Kompakt Boyut */
.vehicle-card-compact {
  font-size: 0.78rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
  min-height: 236px !important;
  display: flex !important;
  flex-direction: column !important;
  cursor: pointer;
  position: relative;
  overflow: visible !important;
}

.vehicle-card-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.09) !important;
  z-index: 20;
}

/* Plaka ile Durum Rozeti (Bizim/Konsinye) Arasındaki Küçük Resim */
.vehicle-card-compact .card-header-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  position: relative;
  z-index: 25;
}

/* Küçük Resim (HER ZAMAN SABİT KALIR, TİTREMEZ) */
.vehicle-card-compact .card-thumb-inline {
  width: 44px;
  height: 26px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
  display: block;
}

/* Üzerine Gelince Açılan Titremeyen Büyütülmüş Önizleme Katmanı */
.thumb-zoom-popup {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 210px;
  height: 130px;
  background-color: #ffffff;
  border-radius: 6px;
  border: 2px solid #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.40), 0 2px 6px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 99999 !important;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.thumb-zoom-popup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* YALNIZCA FOTOĞRAFIN ÜZERİNE GELİNDİĞİNDE BÜYÜTÜLMÜŞ GÖRSELİ GÖSTER */
.card-header-thumb:hover .thumb-zoom-popup {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.vehicle-card-compact .card-thumb-inline-empty {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  color: #94a3b8;
  font-size: 0.82rem;
  cursor: default;
}

/* Tablo Görünümü Küçük Resim ve Zoom Popup */
.table-thumb-box {
  width: 38px;
  height: 26px;
  position: relative;
}

.table-thumb-box .table-thumb-img {
  width: 38px;
  height: 26px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.table-thumb-box .table-zoom-popup {
  top: -20px;
  left: 45px;
  transform: translateY(0);
  width: 200px;
  height: 125px;
}

.table-thumb-box:hover .table-zoom-popup {
  opacity: 1;
  visibility: visible;
}

/* Açık Pastel Kart Zeminleri - Bizim (Açık Yeşil), Konsinye (Açık Sarı), Satılanlar (Açık Gri) */
.card-pastel-bizim,
.card-pastel-green {
  background-color: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
}

.card-pastel-konsinye,
.card-pastel-amber {
  background-color: #fefce8 !important;
  border-color: #fef08a !important;
}

.card-pastel-satildi,
.card-pastel-blue {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.card-pastel-purple {
  background-color: #f6f3fb !important;
  border-color: #e3dbf3 !important;
}

.card-pastel-rose {
  background-color: #fdf3f4 !important;
  border-color: #f9d6d8 !important;
}

/* Genel Tabanı Renkli Rozetler (Badge) */
.badge {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px;
  padding: 0.35rem 0.65rem !important;
  border-radius: 6px;
}

.vehicle-card-compact .price-tag {
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  padding: 0.28rem 0.65rem !important;
  bottom: 8px !important;
  right: 8px !important;
  border-radius: 6px !important;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.vehicle-card-compact .status-pill {
  top: 8px !important;
  left: 8px !important;
}

.vehicle-card .status-pill .badge,
.vehicle-card-compact .status-pill .badge {
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  padding: 0.35rem 0.7rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.vehicle-card .car-title,
.vehicle-card-compact .car-title {
  font-size: 0.94rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #0f172a;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-bottom: 0.2rem !important;
}

.vehicle-card-compact .car-brand-name {
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: -0.2px;
}

.vehicle-card-compact .car-model-name {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #1e293b;
}

.vehicle-card-compact .car-sub-model {
  font-size: 0.72rem;
}

.vehicle-card-compact .vehicle-specs-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 3px !important;
  width: 100% !important;
  overflow: hidden !important;
}

.vehicle-card-compact .car-spec-badge {
  font-size: 0.64rem !important;
  font-weight: 700 !important;
  padding: 0.12rem 0.22rem !important;
  border-radius: 4px;
  background: #f8fafc !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  white-space: nowrap !important;
  flex: 1 1 auto !important;
  min-width: 0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  letter-spacing: -0.2px;
}

.vehicle-card-compact .car-spec-badge i {
  font-size: 0.60rem !important;
  color: #64748b;
  flex-shrink: 0;
}

.vehicle-card-compact .tr-plate {
  font-size: 0.9rem !important;
  border: 2px solid #000000 !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
  display: inline-flex !important;
  align-items: stretch !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  background: #ffffff !important;
  overflow: hidden !important;
  padding: 0 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
}

.vehicle-card-compact .tr-plate .plate-flag {
  background: #003893 !important;
  color: #ffffff !important;
  font-family: 'Segoe UI Black', 'Arial Black', Arial, sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  padding: 0.14rem 0.32rem 0.08rem 0.32rem !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  border-right: none !important;
  display: inline-flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: center !important;
  line-height: 1 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
}

.vehicle-card-compact .tr-plate .plate-text {
  color: #000000 !important;
  font-family: 'Segoe UI Black', 'Arial Black', Impact, sans-serif !important;
  padding: 0.1rem 0.42rem !important;
  font-weight: 900 !important;
  -webkit-text-stroke: 0.4px #000000;
  letter-spacing: 0.8px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.15 !important;
}

.vehicle-card-compact .cost-box {
  font-size: 0.74rem;
  padding: 0.22rem 0.38rem !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  min-height: 56px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin-bottom: 0.25rem !important;
}

.vehicle-card-compact .cost-box .d-flex {
  white-space: nowrap !important;
}

.vehicle-card-compact .cost-box span {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  white-space: nowrap !important;
}

.vehicle-card-compact .cost-box strong {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.vehicle-card-compact .action-btns {
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
}

.vehicle-card-compact .action-btns .btn {
  flex: 1 1 0 !important;
  padding: 0.2rem 0 !important;
  font-size: 0.78rem !important;
  height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #ffffff;
}

/* Satış Yap Butonu İkonu ve Rengi (Yeşil Zemin, Beyaz İkon) */
.vehicle-card-compact .action-btns .btn-success,
.vehicle-card .action-btns .btn-success {
  background-color: #16a34a !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
}

.vehicle-card-compact .action-btns .btn-success:hover,
.vehicle-card .action-btns .btn-success:hover {
  background-color: #15803d !important;
  border-color: #15803d !important;
  color: #ffffff !important;
}

.vehicle-card-compact .action-btns .btn-success i,
.vehicle-card .action-btns .btn-success i {
  color: #ffffff !important;
  font-size: 0.85rem !important;
  display: inline-block !important;
}

/* Satılmış Araç Fatura / Satış Kaydı Butonu */
.vehicle-card-compact .action-btns .btn-outline-success {
  color: #16a34a !important;
  border-color: #16a34a !important;
  background-color: #ffffff !important;
}

.vehicle-card-compact .action-btns .btn-outline-success:hover {
  background-color: #16a34a !important;
  color: #ffffff !important;
}

.vehicle-card-compact .action-btns .btn-outline-success i {
  color: #16a34a !important;
}

.vehicle-card-compact .action-btns .btn-outline-success:hover i {
  color: #ffffff !important;
}

.vehicle-card .status-pill {
  position: absolute;
  top: 12px;
  left: 12px;
}

.car-spec-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
}

/* Mobile Sidebar & Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1030;
}

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar-overlay.show {
    display: block;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .topbar {
    padding: 0 1rem;
  }

  .content-body {
    padding: 1rem;
  }
}

/* ==========================================================================
   TÜM SAYFALAR İÇİN MAKSİMUM DARALTILMIŞ SATIR YÜKSEKLİĞİ & MOBİL UYUM
   ========================================================================== */

/* 1. Maksimum Daraltılmış Kompakt Tablo Satırları (Table Row Heights) */
.table {
  --bs-table-padding-y: 0.28rem;
  --bs-table-padding-x: 0.55rem;
  margin-bottom: 0 !important;
}

.table th,
.table td,
.table > :not(caption) > * > * {
  padding: 0.28rem 0.55rem !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
}

.table th {
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 700;
  background-color: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  padding-top: 0.38rem !important;
  padding-bottom: 0.38rem !important;
  white-space: nowrap;
}

.table td {
  font-size: 0.84rem !important;
  color: #1e293b;
  white-space: nowrap;
}

.table-hover > tbody > tr:hover > * {
  background-color: #f1f5f9;
}

/* Küçük Tablolar (.table-sm) için Ultra Kompakt Satırlar */
.table-sm th,
.table-sm td,
.table-sm > :not(caption) > * > * {
  padding: 0.18rem 0.4rem !important;
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
}

/* Tablo İçi Aksiyon ve Buton Yükseklikleri */
.table .btn-sm,
.btn-action-icon {
  padding: 0.18rem 0.4rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 26px;
  font-size: 0.8rem !important;
  line-height: 1 !important;
}

/* 2. Form Satırları, Girdi Yükseklikleri ve Aralıkları */
.form-label {
  margin-bottom: 0.18rem !important;
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
  font-weight: 600;
}

.form-control,
.form-select {
  padding: 0.26rem 0.55rem !important;
  font-size: 0.85rem !important;
  line-height: 1.28 !important;
  min-height: 31px !important;
  border-radius: 6px !important;
}

.form-control-sm,
.form-select-sm {
  padding: 0.18rem 0.45rem !important;
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
  min-height: 26px !important;
}

textarea.form-control {
  min-height: auto !important;
  line-height: 1.3 !important;
  padding: 0.35rem 0.55rem !important;
}

.input-group-text {
  padding: 0.26rem 0.55rem !important;
  font-size: 0.82rem !important;
  min-height: 31px !important;
}

.form-check {
  margin-bottom: 0.25rem !important;
  min-height: 1.2rem !important;
  line-height: 1.2 !important;
}

.form-check-input {
  margin-top: 0.15em !important;
}

/* Form Satır Grid Aralıkları (Gutter Yükseklik Daraltma) */
.content-body .row.g-4 {
  --bs-gutter-y: 0.75rem !important;
  --bs-gutter-x: 0.85rem !important;
}

.content-body .row.g-3 {
  --bs-gutter-y: 0.5rem !important;
  --bs-gutter-x: 0.75rem !important;
}

.content-body .row.g-2 {
  --bs-gutter-y: 0.35rem !important;
  --bs-gutter-x: 0.5rem !important;
}

.content-body .mb-4 {
  margin-bottom: 0.75rem !important;
}

.content-body .mb-3 {
  margin-bottom: 0.5rem !important;
}

.content-body .mb-2 {
  margin-bottom: 0.35rem !important;
}

/* 3. Kartlar, Başlıklar ve İçerik Boşlukları */
.card {
  margin-bottom: 0.75rem !important;
  border-radius: 8px !important;
}

.card-header {
  padding: 0.45rem 0.85rem !important;
  line-height: 1.25 !important;
  font-size: 0.88rem !important;
}

.card-body {
  padding: 0.75rem 0.85rem !important;
}

.card-footer {
  padding: 0.4rem 0.85rem !important;
  line-height: 1.2 !important;
}

.content-body {
  width: 100% !important;
  padding: 0.85rem 1.25rem 3.5rem !important;
}

/* 4. Butonlar, Rozetler, Sekmeler ve Bildirimler */
.btn {
  line-height: 1.25 !important;
}

.btn-sm {
  padding: 0.18rem 0.45rem !important;
  font-size: 0.78rem !important;
  min-height: 26px !important;
  line-height: 1.2 !important;
}

.alert {
  padding: 0.4rem 0.75rem !important;
  margin-bottom: 0.6rem !important;
  font-size: 0.84rem !important;
  line-height: 1.28 !important;
  border-radius: 6px !important;
}

/* =========================================================================
   Sekme Başlıkları ve Zemin Rengi (Tab Headers & Backgrounds)
   ========================================================================= */
.card-header:has(.nav-tabs),
.nav-tabs-header,
.tab-header-bg {
  background-color: #f1f5f9 !important; /* Sekmeler başlığı alanının zemin rengi */
  border-bottom: 1px solid #cbd5e1 !important;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.nav-tabs {
  border-bottom: none !important;
  gap: 4px;
  margin-bottom: 0 !important;
}

.nav-tabs .nav-link {
  color: #475569;
  background-color: #e2e8f0; /* Sekme başlıklarının zemin rengi */
  border: 1px solid #cbd5e1 !important;
  border-bottom: none !important;
  border-radius: 6px 6px 0 0 !important;
  font-weight: 600 !important;
  padding: 0.45rem 0.95rem !important;
  font-size: 0.85rem !important;
  transition: all 0.2s ease-in-out;
}

.nav-tabs .nav-link.text-success {
  color: #15803d !important;
}

.nav-tabs .nav-link:hover {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: #94a3b8 !important;
}

.nav-tabs .nav-link.active {
  color: #0f172a !important;
  background-color: #ffffff !important; /* Aktif sekme zemin rengi */
  border-color: #cbd5e1 #cbd5e1 #ffffff !important;
  border-top: 3px solid var(--primary-accent, #2563eb) !important;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
  font-weight: 700 !important;
  position: relative;
  z-index: 2;
  margin-bottom: -1px !important;
}

.list-group-item {
  padding: 0.35rem 0.75rem !important;
  line-height: 1.25 !important;
  font-size: 0.85rem !important;
}

.badge {
  padding: 0.2rem 0.45rem !important;
  font-size: 0.74rem !important;
  line-height: 1.15 !important;
}

/* 5. İstatistik Kartları (Stat Cards) Kompakt */
.stat-card {
  padding: 0.65rem 0.85rem !important;
  border-radius: 8px !important;
}

.stat-icon {
  width: 40px !important;
  height: 40px !important;
  font-size: 1.2rem !important;
  border-radius: 8px !important;
}

.stat-number {
  font-size: 1.25rem !important;
  line-height: 1.15 !important;
}

.stat-label {
  font-size: 0.76rem !important;
}

/* 6. Mobil Uyumluluk Kural ve İyileştirmeleri (Responsive Rules) */
@media (max-width: 991.98px) {
  .topbar {
    height: 52px !important;
    padding: 0 0.85rem !important;
  }

  .content-body {
    padding: 0.65rem 0.75rem 3.5rem !important;
  }

  .fixed-footer {
    height: 40px !important;
    padding: 0 0.85rem !important;
    font-size: 0.78rem !important;
  }

  /* Mobilde tablolarda satırların kırılmadan tek satırda kalması ve akıcı yatay kaydırma */
  .table-responsive {
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0.5rem !important;
  }

  .table-responsive .table {
    margin-bottom: 0 !important;
  }

  .table th,
  .table td {
    white-space: nowrap !important;
    padding: 0.32rem 0.55rem !important;
    font-size: 0.82rem !important;
  }

  /* Mobilde form kontrolleri - rahat dokunma ve iOS otomatik zoom engeli (min 15px) */
  .form-control,
  .form-select {
    font-size: 15px !important;
    min-height: 35px !important;
    padding: 0.32rem 0.6rem !important;
  }

  .form-control-sm,
  .form-select-sm {
    font-size: 14px !important;
    min-height: 30px !important;
  }

  .table .btn-sm {
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 0.22rem 0.45rem !important;
  }

  .card-header {
    padding: 0.45rem 0.75rem !important;
  }

  .card-body {
    padding: 0.65rem 0.75rem !important;
  }

  .stat-card {
    padding: 0.55rem 0.75rem !important;
  }

  .stat-number {
    font-size: 1.15rem !important;
  }

  .stat-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.1rem !important;
  }
}

@media (max-width: 575.98px) {
  .content-body {
    padding: 0.5rem 0.5rem 3.5rem !important;
  }

  .card {
    margin-bottom: 0.5rem !important;
    border-radius: 6px !important;
  }

  .btn-group {
    flex-wrap: wrap;
  }

  .tr-plate {
    font-size: 0.95rem !important;
  }
}

/* Custom Print Styles */
@media print {
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .sidebar, .topbar, .no-print, .btn, .breadcrumb, footer {
    display: none !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .content-body {
    padding: 0 !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}

/* Kasko Araç Kataloğu ve Akıllı Seçici Stilleri */
.select-kasko {
  font-weight: 600;
  border-color: #cbd5e1;
  transition: all 0.2s ease-in-out;
}
.select-kasko:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.15);
}
.kasko-highlight-pulse {
  animation: kaskoPulse 1.8s ease-in-out;
}
@keyframes kaskoPulse {
  0% { background-color: rgba(16, 185, 129, 0.25); border-color: #10b981; }
  100% { background-color: transparent; border-color: inherit; }
}

/* Arama ve Tıklanabilir Dropdown Stilleri (Marka / Model / Paket) */
.searchable-dropdown-wrapper {
  position: relative;
}
.searchable-dropdown-wrapper input.form-control {
  cursor: pointer;
  background-color: #ffffff !important;
}
.searchable-dropdown-wrapper input.form-control:focus {
  cursor: text;
}
.searchable-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  z-index: 1055;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  display: none;
}
.searchable-dropdown-menu .list-group-item {
  cursor: pointer;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  padding: 0.55rem 0.85rem;
  font-size: 0.86rem;
  transition: background-color 0.1s ease, color 0.1s ease;
}
.searchable-dropdown-menu .list-group-item:last-child {
  border-bottom: none;
}
.searchable-dropdown-menu .list-group-item:hover,
.searchable-dropdown-menu .list-group-item:focus {
  background-color: #f1f5f9 !important;
  color: #0d6efd !important;
  font-weight: 600;
}
.searchable-dropdown-menu .list-group-item.active {
  background-color: #e0edff !important;
  color: #0d6efd !important;
  font-weight: 700;
}
.dropdown-chevron-btn {
  cursor: pointer;
  transition: transform 0.2s ease;
  user-select: none;
}
.dropdown-chevron-btn.open {
  transform: translateY(-50%) rotate(180deg) !important;
}
