html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Theme variables */
:root {
  --bg: #f5f7fa;
  --text: #0f172a;
  --muted: #64748b;
  --surface: #f7f9fc;
  --surface-strong: #eef2f7;
  --border-neutral: #e5e7eb;
  --primary: #0f70b7;
  --accent: #94c11f;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #9aa4b2;
  --surface: #111827;
  --surface-strong: #0e1626;
  --border-neutral: #1f2937;
  --primary: #58a6ff;
  --accent: #80d16a;
}

/* Header Styling */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.75rem 1rem !important;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255,255,255,0.1);
  border-radius: 6px;
}

/* Card Styling */
.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  background-color: var(--surface);
}

.card-header {
  border-radius: 15px 15px 0 0 !important;
  border: none;
  padding: 1.5rem;
  font-weight: 600;
}

.card-body {
  padding: 2rem;
}

/* Dashboard Cards */
.dashboard-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.dashboard-card.bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.dashboard-card.bg-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%) !important;
}

.dashboard-card.bg-info {
  background: linear-gradient(135deg, #3494e6 0%, #ec6ead 100%) !important;
}

.dashboard-card.bg-warning {
  background: linear-gradient(135deg, #ffb347 0%, #ffcc33 100%) !important;
  color: #333 !important;
}

/* Button Styling */
.btn {
  border-radius: 10px;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 4px 15px rgba(15, 112, 183, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0a5a8f 0%, #7ba01a 100%);
  box-shadow: 0 6px 20px rgba(15, 112, 183, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
  box-shadow: 0 4px 15px rgba(86, 171, 47, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #4a9629 0%, #95d4b8 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ff5252 0%, #e53e3e 100%);
}

.btn-warning {
  background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
  color: #333;
  box-shadow: 0 4px 15px rgba(254, 202, 87, 0.3);
}

.btn-info {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

/* Improve visibility of light/outline buttons across the app */
.btn-light {
  background: linear-gradient(135deg, #eef6ff 0%, #e3f0ff 100%);
  color: #0f70b7;
  border: 1px solid #cfe2ff;
  box-shadow: 0 4px 12px rgba(15, 112, 183, 0.15);
}

.btn-light:hover {
  background: #d9eaff;
  color: #0a58ca;
  box-shadow: 0 6px 18px rgba(15, 112, 183, 0.25);
}

.btn-outline-primary {
  color: #0f70b7;
  border-color: #0f70b7;
}

.btn-outline-primary:hover {
  background: #0f70b7;
  color: #fff;
  border-color: #0f70b7;
}

.btn-outline-success {
  color: #2e7d32;
  border-color: #2e7d32;
}

.btn-outline-success:hover {
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
}

.btn-outline-danger {
  color: #c62828;
  border-color: #c62828;
}

.btn-outline-danger:hover {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
}

/* Form Styling */
.form-control, .form-select {
  border-radius: 10px;
  border: 2px solid var(--border-neutral);
  padding: 0.75rem 1rem;
  background-color: #fbfbfb;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(15, 112, 183, 0.15);
}

.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
}

/* Table Styling */
.table {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  margin-bottom: 0;
}

.table thead th {
  background: var(--surface-strong);
  border: none;
  font-weight: 600;
  color: var(--text);
  padding: 1rem;
  border-bottom: 2px solid var(--border-neutral);
}

.table tbody tr:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-color: var(--border-neutral);
}

/* Badge Styling */
.badge {
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

/* Alert Styling */
.alert {
  border-radius: 15px;
  border: none;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.alert-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
  color: white;
}

.alert-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
}

.alert-info {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .card-body {
    padding: 1.5rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .table-responsive {
    border-radius: 15px;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  margin-top: auto;
}

/* Custom utility classes */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-custom {
  box-shadow: 0 10px 35px rgba(0,0,0,0.1) !important;
}

.border-radius-custom {
  border-radius: 20px !important;
}

/* Login Page Specific */
.login-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  padding: 3rem;
  width: 100%;
  max-width: 450px;
}

/* Search Box */
.search-box {
  position: relative;
}

.search-box input {
  padding-left: 3rem;
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

/* Force non-white surfaces on custom cards defined inline in views */
.search-card { background: var(--surface) !important; }
.stats-card { background: var(--surface) !important; }
.modal-content { background: var(--surface); }

/* Dark theme specific tweaks */
html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}
html[data-theme="dark"] .table tbody tr:hover {
  background-color: rgba(255,255,255,0.03);
}
html[data-theme="dark"] .btn-light {
  background: #374151;
  color: #e5e7eb;
  border: 1px solid #4b5563;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .btn-light:hover {
  background: #4b5563;
  color: #fff;
}

.flat-green {
  background-color: #28a745 !important; /* Düz yeşil */
  border-color: #28a745 !important;
  box-shadow: none !important; /* Bootstrap gölgesini kapat */
  background-image: none !important; /* Gradyen kapat */
}
.flat-green:hover {
  background-color: #218838 !important; /* Hover */
  border-color: #1e7e34 !important;
}