/* ============================================
   Theme — Light only (dark mode kaldırıldı)
   ============================================ */
:root {
  --bg-primary: #f5f6fa;
  --bg-secondary: #edf0f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fc;
  --bg-input: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --border-light: #edf2f7;
  --table-stripe: rgba(0, 0, 0, 0.015);
  --table-hover: rgba(0, 0, 0, 0.04);
  --navbar-bg: #1e293b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --scrollbar-track: #f1f1f1;
  --scrollbar-thumb: #c1c1c1;
  --scrollbar-thumb-hover: #a8a8a8;
}

/* ============================================
   Base
   ============================================ */
* {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
}

/* Auth gate: sayfa içerik blur'u (kilitliyken) */
body.auth-locked .navbar,
body.auth-locked .container-fluid {
  filter: blur(8px) grayscale(30%);
  pointer-events: none;
  user-select: none;
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
  background-color: var(--navbar-bg) !important;
  box-shadow: var(--shadow-md);
  padding: 0.5rem 1rem;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}

.navbar-brand i {
  opacity: 0.85;
}

#totalBadge {
  font-size: 0.8rem;
  padding: 0.35em 0.7em;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.card-body {
  color: var(--text-primary);
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* ============================================
   Stat Cards
   ============================================ */
.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  margin-top: 2px;
}

.stat-blue { border-left-color: #4c6ef5; }
.stat-blue .stat-value { color: #4c6ef5; }

.stat-green { border-left-color: #40c057; }
.stat-green .stat-value { color: #40c057; }

.stat-teal { border-left-color: #25d366; }
.stat-teal .stat-value { color: #25d366; }

.stat-purple { border-left-color: #9775fa; }
.stat-purple .stat-value { color: #9775fa; }

.stat-orange { border-left-color: #fd7e14; }
.stat-orange .stat-value { color: #fd7e14; }

.stat-cyan { border-left-color: #22b8cf; }
.stat-cyan .stat-value { color: #22b8cf; }

.stat-gray { border-left-color: #868e96; }
.stat-gray .stat-value { color: #868e96; }

/* ============================================
   Form Controls
   ============================================ */
.form-select,
.form-control {
  background-color: var(--bg-input);
  border-color: var(--border-color);
  color: var(--text-primary);
  font-size: 0.82rem;
}

.form-select:focus,
.form-control:focus {
  background-color: var(--bg-input);
  border-color: #4c6ef5;
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(76, 110, 245, 0.2);
}

.form-select option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.form-check-input {
  background-color: var(--bg-input);
  border-color: var(--border-color);
}

.form-check-input:checked {
  background-color: #4c6ef5;
  border-color: #4c6ef5;
}

.form-check-label {
  color: var(--text-secondary);
}

/* ============================================
   Table
   ============================================ */
.table {
  color: var(--text-primary);
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--table-hover);
  --bs-table-striped-bg: var(--table-stripe);
  margin-bottom: 0;
}

.table thead th {
  background-color: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.6rem 0.75rem;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.15s ease;
}

.table tbody tr:hover {
  background-color: var(--table-hover) !important;
}

.table tbody td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
  font-size: 0.85rem;
  border-bottom-color: var(--border-light);
}

.table tbody td strong {
  font-weight: 600;
  color: var(--text-primary);
}

.table tbody td small {
  color: var(--text-muted);
}

/* ============================================
   Badges
   ============================================ */
.badge-sm {
  font-size: 0.65rem;
  padding: 0.15em 0.45em;
  font-weight: 500;
  vertical-align: middle;
  border-radius: 4px;
}

.badge.bg-success {
  background-color: #25d366 !important;
}

.badge.bg-warning {
  color: #1a1a2e !important;
}

/* ============================================
   Buttons
   ============================================ */
.btn-outline-primary {
  color: #4c6ef5;
  border-color: #4c6ef5;
}

.btn-outline-primary:hover {
  background-color: #4c6ef5;
  border-color: #4c6ef5;
  color: #fff;
}

.btn-outline-warning {
  color: #fd7e14;
  border-color: #fd7e14;
}

.btn-outline-warning:hover {
  background-color: #fd7e14;
  border-color: #fd7e14;
  color: #fff;
}

.btn-outline-success {
  color: #40c057;
  border-color: #40c057;
}

.btn-outline-success:hover {
  background-color: #40c057;
  border-color: #40c057;
  color: #fff;
}

.btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.btn-outline-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline-secondary:disabled {
  color: var(--text-muted);
  border-color: var(--border-light);
  opacity: 0.5;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-sm.py-0 {
  padding-top: 0.15rem !important;
  padding-bottom: 0.15rem !important;
  font-size: 0.78rem;
}

/* ============================================
   Spinner & Loading
   ============================================ */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
  margin-right: 0.5rem;
}

/* ============================================
   Utilities
   ============================================ */
.opacity-50 {
  opacity: 0.45 !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

a.text-info {
  color: #22b8cf !important;
}

a.text-info:hover {
  color: #3bc9db !important;
}

/* ============================================
   Pagination Footer
   ============================================ */
#pagination .btn {
  min-width: 2rem;
}

#pagination small {
  font-size: 0.8rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 767.98px) {
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .stat-card {
    padding: 0.65rem 0.75rem;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .stat-label {
    font-size: 0.68rem;
  }

  .table tbody td {
    font-size: 0.78rem;
    padding: 0.4rem 0.5rem;
  }

  .table thead th {
    font-size: 0.72rem;
    padding: 0.5rem;
  }

  .navbar-brand {
    font-size: 0.95rem;
  }
}

@media (max-width: 575.98px) {
  .stat-card {
    padding: 0.5rem 0.6rem;
  }

  .stat-value {
    font-size: 1rem;
  }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-card {
  animation: fadeIn 0.4s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }
.stat-card:nth-child(5) { animation-delay: 0.2s; }
.stat-card:nth-child(6) { animation-delay: 0.25s; }
.stat-card:nth-child(7) { animation-delay: 0.3s; }

/* Parent column animation target */
#statsRow > div {
  animation: fadeIn 0.4s ease forwards;
  opacity: 0;
}

#statsRow > div:nth-child(1) { animation-delay: 0s; }
#statsRow > div:nth-child(2) { animation-delay: 0.05s; }
#statsRow > div:nth-child(3) { animation-delay: 0.1s; }
#statsRow > div:nth-child(4) { animation-delay: 0.15s; }
#statsRow > div:nth-child(5) { animation-delay: 0.2s; }
#statsRow > div:nth-child(6) { animation-delay: 0.25s; }
#statsRow > div:nth-child(7) { animation-delay: 0.3s; }
