/* Dark Mode Styles */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-card: #333333;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #404040;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
  --hover-bg: #404040;
}

[data-theme="light"] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --hover-bg: #f8f9fa;
}

/* Global Styles */
body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar Styles */
.navbar {
  background-color: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.navbar-brand {
  color: var(--text-primary) !important;
  font-weight: 600;
}

.navbar-nav .nav-link {
  color: var(--text-secondary) !important;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--text-primary) !important;
}

.navbar-nav .nav-link.active {
  color: var(--text-primary) !important;
  font-weight: 500;
}

/* Card Styles */
.card {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text-primary) !important;
}

.card-header {
  background-color: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Form Styles */
.form-control {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

.form-control:focus {
  background-color: var(--bg-secondary) !important;
  border-color: #007bff !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.form-label {
  color: var(--text-primary) !important;
}

/* Table Styles */
.table {
  color: var(--text-primary) !important;
  background: var(--bg-card) !important;
}

.table thead th {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  padding: 0.75rem 0.5rem !important;
}

.table tbody td {
  font-size: 0.85rem !important;
  padding: 0.6rem 0.5rem !important;
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

.table tbody tr {
  background-color: var(--bg-card) !important;
  border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
  background-color: var(--hover-bg) !important;
}

.table td, .table th {
  border-color: var(--border-color) !important;
}

/* List Group Styles */
.list-group-item {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.list-group-item:hover {
  background-color: var(--hover-bg) !important;
}

/* Alert Styles */
.alert {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Button Styles */
.btn-outline-secondary {
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

.btn-outline-secondary:hover {
  background-color: var(--hover-bg) !important;
  color: var(--text-primary) !important;
}

/* Dropdown Styles */
.dropdown-menu {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow) !important;
}

.dropdown-item {
  color: var(--text-primary) !important;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--hover-bg) !important;
  color: var(--text-primary) !important;
}

.dropdown-item:focus {
  background-color: var(--hover-bg) !important;
  color: var(--text-primary) !important;
}

.dropdown-divider {
  border-color: var(--border-color) !important;
}

/* Navbar Dropdown */
.navbar-nav .dropdown-menu {
  margin-top: 0.5rem;
}

.navbar-nav .dropdown-toggle::after {
  border-top-color: var(--text-secondary) !important;
}

.navbar-nav .dropdown-toggle:hover::after {
  border-top-color: var(--text-primary) !important;
}

/* Text Colors */
.text-muted {
  color: var(--text-secondary) !important;
}

.text-primary {
  color: #007bff !important;
}

.text-success {
  color: #28a745 !important;
}

.text-info {
  color: #17a2b8 !important;
}

.text-warning {
  color: #ffc107 !important;
}

.text-danger {
  color: #dc3545 !important;
}

/* Small Text */
small {
  color: var(--text-secondary) !important;
}

/* Badge Styles */
.badge {
  color: #ffffff !important;
}

/* Role Badges */
.badge.bg-dark {
  background-color: #343a40 !important;
  color: #ffffff !important;
}

.badge.bg-secondary {
  background-color: #6c757d !important;
  color: #ffffff !important;
}

/* Update Button Styles */
.btn-outline-dark {
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
  background-color: var(--bg-secondary) !important;
}

.btn-outline-dark:hover {
  background-color: var(--hover-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

.btn-outline-dark:focus {
  background-color: var(--hover-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Form Select */
.form-select {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

.form-select:focus {
  background-color: var(--bg-secondary) !important;
  border-color: #007bff !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Pagination */
.pagination .page-link {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.pagination .page-link:hover {
  background-color: var(--hover-bg) !important;
  color: var(--text-primary) !important;
}

.pagination .page-item.active .page-link {
  background-color: #007bff !important;
  border-color: #007bff !important;
  color: #ffffff !important;
}

.pagination .page-item.disabled .page-link {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

/* Navbar Toggler */
.navbar-toggler {
  border-color: var(--border-color) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

[data-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Dark Mode Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background-color: var(--hover-bg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-nav {
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
  }
  
  .theme-toggle {
    margin: 0.5rem 0;
  }
}

/* Additional Dark Mode Fixes */
.btn-group .btn {
  border-color: var(--border-color) !important;
}

.btn-group .btn:hover {
  background-color: var(--hover-bg) !important;
}

/* Card Header with Background Colors */
.card-header.bg-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.card-header.bg-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.card-header.bg-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.card-header.bg-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
  color: #212529 !important;
}

.card-header.bg-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
}

/* Alert Colors */
.alert-success {
  background-color: rgba(40, 167, 69, 0.1) !important;
  border-color: rgba(40, 167, 69, 0.3) !important;
  color: var(--text-primary) !important;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1) !important;
  border-color: rgba(220, 53, 69, 0.3) !important;
  color: var(--text-primary) !important;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1) !important;
  border-color: rgba(255, 193, 7, 0.3) !important;
  color: var(--text-primary) !important;
}

.alert-info {
  background-color: rgba(23, 162, 184, 0.1) !important;
  border-color: rgba(23, 162, 184, 0.3) !important;
  color: var(--text-primary) !important;
}

/* Table Striped */
.table-striped > tbody > tr:nth-of-type(odd) > td {
  background-color: var(--hover-bg) !important;
}

/* Focus States */
.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Input Placeholder */
.form-control::placeholder {
  color: var(--text-secondary) !important;
  opacity: 0.7;
}

/* Shadow for Cards */
.shadow {
  box-shadow: var(--shadow) !important;
}

/* Display Classes */
.display-4 {
  color: var(--text-secondary) !important;
}

/* Center Text */
.text-center {
  text-align: center !important;
}

/* Font Weight */
.fw-bold {
  font-weight: bold !important;
  color: var(--text-primary) !important;
}

/* Button Group Vertical */
.btn-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.btn-group-vertical .btn {
  border-radius: 0.375rem !important;
  margin: 0;
}

/* Form Control Small */
.form-control-sm {
  font-size: 0.875rem !important;
  padding: 0.25rem 0.5rem !important;
}

/* Small Buttons */
.btn-sm {
  font-size: 0.875rem !important;
  padding: 0.25rem 0.5rem !important;
}

/* Text Success */
.text-success {
  color: #28a745 !important;
}

/* Responsive Table */
@media (max-width: 768px) {
  .table thead th {
    font-size: 1rem !important;
    padding: 0.75rem 0.5rem !important;
  }
  
  .table tbody td {
    font-size: 0.9rem !important;
    padding: 0.5rem !important;
  }
  
  .btn-sm {
    font-size: 0.8rem !important;
    padding: 0.2rem 0.4rem !important;
  }
}

/* Modern Table Design */
.modern-table-container {
  width: 100%;
  background: var(--bg-card);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.table-wrapper {
  width: 100%;
}

.table-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--hover-bg) 100%);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-row {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr 1fr 1fr 1.5fr 1fr;
  gap: 1rem;
  padding: 1rem;
  align-items: center;
}

.header-cell {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.table-body {
  max-height: 600px;
  overflow-y: auto;
}

.table-row {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr 1fr 1fr 1.5fr 1fr;
  gap: 1rem;
  padding: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
  background: var(--bg-card);
}

.table-row:hover {
  background: var(--hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.table-cell {
  color: var(--text-primary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

/* User Info Styles */
.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--hover-bg) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.user-details strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Role Badge Styles */
.role-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-transform: capitalize;
}

.role-admin {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.role-user {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Leave Count Styles */
.leave-count {
  padding: 0.3rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.leave-annual {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.leave-extra {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

/* Update Form Styles */
.update-form {
  width: 100%;
}

.update-form .input-group {
  display: flex;
  gap: 0.25rem;
}

.update-form .form-control {
  border-radius: 0.5rem 0 0 0.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.update-form .btn {
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Action Buttons Styles */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.action-buttons .btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.action-buttons .btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design for Modern Table */
@media (max-width: 1200px) {
  .header-row,
  .table-row {
    grid-template-columns: 1.2fr 1.2fr 0.8fr 0.8fr 0.8fr 0.8fr 0.8fr 1.2fr 0.8fr;
    gap: 0.5rem;
    padding: 0.75rem;
  }
  
  .header-cell,
  .table-cell {
    font-size: 0.8rem;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .role-badge,
  .leave-count {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

@media (max-width: 768px) {
  .modern-table-container {
    border-radius: 0.5rem;
  }
  
  .header-row,
  .table-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
  }
  
  .header-cell {
    display: none;
  }
  
  .table-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .table-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 1rem;
  }
  
  .user-info {
    width: 100%;
    justify-content: space-between;
  }
  
  .action-buttons {
    width: 100%;
    justify-content: flex-end;
  }
  
  .update-form .input-group {
    width: 100%;
  }
}



/* Badge Improvements */
.badge {
  font-size: 0.75rem !important;
  padding: 0.375rem 0.75rem !important;
  border-radius: 1rem !important;
  font-weight: 500 !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.badge.bg-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
}

/* Button Improvements */
.btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3) !important;
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
  border: none !important;
  color: white !important;
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3) !important;
}

/* Mobile Responsive Improvements */
@media (max-width: 576px) {
  .table-container {
    font-size: 0.8rem;
    border-radius: 0.25rem;
    background: var(--bg-card) !important;
  }
  
  .table thead th {
    font-size: 0.7rem !important;
    padding: 0.4rem 0.2rem !important;
    white-space: nowrap;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
  }
  
  .table tbody td {
    font-size: 0.65rem !important;
    padding: 0.3rem 0.2rem !important;
    white-space: nowrap;
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
  }
  
  .badge {
    font-size: 0.6rem !important;
    padding: 0.15rem 0.3rem !important;
  }
  
  .btn-sm {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.3rem !important;
  }
  
  .btn-group-vertical {
    gap: 0.05rem !important;
  }
  
  .btn-group-vertical .btn {
    font-size: 0.6rem !important;
    padding: 0.15rem 0.3rem !important;
  }
  
  .form-control-sm {
    font-size: 0.7rem !important;
    padding: 0.15rem 0.3rem !important;
  }
  
  /* Mobilde tablo hücre genişliklerini ayarla */
  .table th:nth-child(1), .table td:nth-child(1) { width: 15%; }
  .table th:nth-child(2), .table td:nth-child(2) { width: 18%; }
  .table th:nth-child(3), .table td:nth-child(3) { width: 15%; }
  .table th:nth-child(4), .table td:nth-child(4) { width: 12%; }
  .table th:nth-child(5), .table td:nth-child(5) { width: 10%; }
  .table th:nth-child(6), .table td:nth-child(6) { width: 10%; }
  .table th:nth-child(7), .table td:nth-child(7) { width: 10%; }
  .table th:nth-child(8), .table td:nth-child(8) { width: 10%; }
  .table th:nth-child(9), .table td:nth-child(9) { width: 10%; }
}

/* Tablet Responsive */
@media (min-width: 577px) and (max-width: 991px) {
  .table-container {
    border-radius: 0.375rem;
    background: var(--bg-card) !important;
  }
  
  .table thead th {
    font-size: 0.8rem !important;
    padding: 0.6rem 0.4rem !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
  }
  
  .table tbody td {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.4rem !important;
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
  }
  
  .btn-group-vertical {
    gap: 0.15rem !important;
  }
  
  .badge {
    font-size: 0.65rem !important;
    padding: 0.25rem 0.5rem !important;
  }
  
  .btn-sm {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
  }
}

/* Hover Effects */
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.btn:active {
  transform: translateY(0);
}

/* Form Control Improvements */
.form-control:focus {
  transform: scale(1.02);
  transition: all 0.3s ease;
}

/* Pagination Improvements */
.pagination .page-link {
  border-radius: 0.375rem !important;
  margin: 0 0.125rem !important;
  transition: all 0.3s ease !important;
}

.pagination .page-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Animation for theme transition */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
} 