/* ============================================================
   Ekip Takip Sistemi v2.0 - Ana Stil Dosyası
   Modern, Responsive, Aydınlık/Karanlık Tema
   ============================================================ */

/* ─── CSS Değişkenleri (Aydınlık Tema) ─────────────────────── */
:root {
  --bg:          #f1f5f9;
  --bg-card:     #ffffff;
  --bg-sidebar:  #1e1b4b;
  --bg-hover:    #f1f5f9;
  --bg-input:    #ffffff;
  --border:      #e2e8f0;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-sidebar:#cbd5e1;
  --text-sidebar-active: #ffffff;
  --primary:     #4f46e5;
  --primary-dark:#4338ca;
  --primary-light:#eef2ff;
  --success:     #10b981;
  --success-bg:  #d1fae5;
  --warning:     #f59e0b;
  --warning-bg:  #fef3c7;
  --danger:      #ef4444;
  --danger-bg:   #fee2e2;
  --info:        #06b6d4;
  --info-bg:     #cffafe;
  --purple:      #8b5cf6;
  --purple-bg:   #ede9fe;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.05);
  --shadow:      0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:   0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --radius:      0.625rem;
  --radius-lg:   1rem;
  --sidebar-w:   260px;
  --header-h:    64px;
  --transition:  all 0.2s ease;
}

/* ─── Karanlık Tema ─────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #0f172a;
  --bg-card:     #1e293b;
  --bg-sidebar:  #020617;
  --bg-hover:    #334155;
  --bg-input:    #1e293b;
  --border:      #334155;
  --text:        #f1f5f9;
  --text-muted:  #94a3b8;
  --text-sidebar:#94a3b8;
  --text-sidebar-active: #ffffff;
  --primary-light:#1e3a5f;
  --success-bg:  #064e3b;
  --warning-bg:  #451a03;
  --danger-bg:   #450a0a;
  --info-bg:     #083344;
  --purple-bg:   #2e1065;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.3);
  --shadow:      0 4px 6px -1px rgba(0,0,0,.4);
  --shadow-lg:   0 10px 15px -3px rgba(0,0,0,.5);
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ─── Layout ────────────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-brand-text { color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.2; }
.sidebar-brand-sub  { color: rgba(255,255,255,0.4); font-size: 0.7rem; }

.sidebar-nav { flex: 1; padding: 1rem 0; }

.sidebar-section {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  margin-top: 0.5rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  color: var(--text-sidebar);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 0;
  position: relative;
  text-decoration: none;
}

.sidebar-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  text-decoration: none;
}

.sidebar-item.active {
  background: var(--primary);
  color: #fff;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #93c5fd;
  border-radius: 0 2px 2px 0;
}

.sidebar-item-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }
.sidebar-item.active .sidebar-item-icon { opacity: 1; }

.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-user:hover { background: rgba(255,255,255,0.06); }

.sidebar-avatar {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { color: #fff; font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,0.4); font-size: 0.7rem; }

/* ─── Main Content ──────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-title { font-size: 1.125rem; font-weight: 700; flex: 1; }
.header-subtitle { font-size: 0.75rem; color: var(--text-muted); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
  border-radius: var(--radius);
}

.menu-toggle:hover { background: var(--bg-hover); }

/* ─── Page Content ──────────────────────────────────────────── */
.page-content { padding: 1.5rem; flex: 1; }

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-title { font-size: 0.9375rem; font-weight: 600; }
.card-body  { padding: 1.25rem; }
.card-footer { padding: 0.875rem 1.25rem; border-top: 1px solid var(--border); background: var(--bg-hover); }

/* ─── Stat Cards ────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1.2; }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; color: #fff; }

.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover  { background: #dc2626; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #d97706; color: #fff; }

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

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-icon { padding: 0.5rem; }
.btn-block { width: 100%; justify-content: center; }

/* ─── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: var(--text); }
.form-label .required { color: var(--danger); margin-left: 0.2rem; }

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.875rem;
  transition: var(--transition);
  line-height: 1.5;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: 0.6; cursor: not-allowed; }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 0.25rem; }
.form-control.is-invalid { border-color: var(--danger); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ─── Tables ────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-hover); }
.table-striped tbody tr:nth-child(even) { background: rgba(0,0,0,0.02); }

/* ─── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-purple  { background: var(--purple-bg);  color: var(--purple); }
.badge-gray    { background: var(--bg-hover);   color: var(--text-muted); }

/* ─── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(-10px);
  transition: var(--transition);
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title { font-size: 1rem; font-weight: 700; flex: 1; }

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: var(--radius);
  font-size: 1.25rem;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover { background: var(--bg-hover); color: var(--text); }

.modal-body   { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; justify-content: flex-end; }

/* ─── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.alert-success { background: var(--success-bg); color: #065f46; border-left: 4px solid var(--success); }
.alert-danger  { background: var(--danger-bg);  color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-bg); color: #92400e; border-left: 4px solid var(--warning); }
.alert-info    { background: var(--info-bg);    color: #0e7490; border-left: 4px solid var(--info); }

[data-theme="dark"] .alert-success { color: #6ee7b7; }
[data-theme="dark"] .alert-danger  { color: #fca5a5; }
[data-theme="dark"] .alert-warning { color: #fcd34d; }
[data-theme="dark"] .alert-info    { color: #67e8f9; }

/* ─── Toast Notifications ───────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
  font-size: 0.875rem;
}

.toast-success { border-left: 4px solid var(--success); background: var(--success-bg); color: var(--success); font-weight: 600; }
.toast-danger  { border-left: 4px solid var(--danger); background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.toast-warning { border-left: 4px solid var(--warning); background: var(--warning-bg); color: var(--warning); font-weight: 600; }
.toast-info    { border-left: 4px solid var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ─── Loading Spinner ───────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

.spinner-lg { width: 40px; height: 40px; border-width: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

[data-theme="dark"] .loading-overlay { background: rgba(0,0,0,0.5); }

/* ─── Photo Upload ──────────────────────────────────────────── */
.photo-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-hover);
}

.photo-dropzone:hover, .photo-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-item img { width: 100%; height: 100%; object-fit: cover; }

.photo-delete {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(239,68,68,0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px; height: 22px;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.photo-item:hover .photo-delete { opacity: 1; }

/* ─── Priority Badges ───────────────────────────────────────── */
.priority-urgent { background: #fee2e2; color: #991b1b; }
.priority-high   { background: #fef3c7; color: #92400e; }
.priority-normal { background: #dbeafe; color: #1e40af; }
.priority-low    { background: #f1f5f9; color: #475569; }

/* ─── Check Item ────────────────────────────────────────────── */
.check-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.check-item:last-child { border-bottom: none; }
.check-item:hover { background: var(--bg-hover); }
.check-item.checked { opacity: 0.6; }

.check-item-checkbox {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-card);
}
.check-item-checkbox:hover {
  border-color: var(--primary);
  transform: scale(1.1);
}

.check-item-checkbox.checked {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.check-item-info { flex: 1; min-width: 0; }
.check-item-name { font-size: 0.875rem; font-weight: 500; }
.check-item-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.125rem; }

.check-item-actions { display: flex; gap: 0.375rem; }

/* ─── Login Page ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  padding: 1rem;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  padding: 2rem;
  text-align: center;
  color: #fff;
}

.login-logo {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
}

.login-title { font-size: 1.25rem; font-weight: 700; }
.login-subtitle { font-size: 0.8rem; opacity: 0.8; margin-top: 0.25rem; }
.login-body { padding: 2rem; }

/* ─── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.empty-state-text  { font-size: 0.875rem; }

/* ─── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: center;
  padding: 1rem;
}

.page-btn {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 0 0.5rem;
}

.page-btn:hover { background: var(--bg-hover); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Tabs ──────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border); gap: 0; margin-bottom: 1.5rem; }

.tab-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── Search & Filter Bar ───────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.search-input {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input input { padding-left: 2.25rem; }
.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ─── Utilities ─────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.p-4 { padding: 1rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .form-row, .form-row-3 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-content { padding: 1rem; }
  .modal { max-width: 100%; margin: 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 95vh; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar > * { width: 100%; }
}

/* ─── Sidebar Overlay (Mobile) ──────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

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


/* ─── Enhanced Mobile Responsive (Tablet & Mobile) ───────────────────── */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 220px;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-w: 260px;
  }
  
  /* Grid Layout Stacking */
  [style*="grid-template-columns:280px 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  
  .form-row, .form-row-3 {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .header {
    padding: 0 1rem;
  }
  
  .header-title {
    font-size: 1rem;
  }
  
  .header-subtitle {
    display: none;
  }
  
  .card-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .card-title {
    font-size: 0.875rem;
  }
  
  .sidebar-item {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 640px) {
  .stats-grid { 
    grid-template-columns: 1fr; 
  }
  
  .filter-bar { 
    flex-direction: column; 
  }
  
  .filter-bar > * { 
    width: 100%; 
  }
  
  .table {
    font-size: 0.8rem;
  }
  
  .table th, .table td {
    padding: 0.5rem 0.375rem;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .btn-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .form-label {
    font-size: 0.875rem;
  }
  
  .form-control {
    font-size: 16px;
    padding: 0.625rem 0.75rem;
  }
  
  .form-row, .form-row-3 {
    gap: 0.75rem;
  }
  
  .modal {
    max-height: 90vh;
    width: 95vw;
    margin: auto;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
  }
  
  .modal-footer {
    padding: 1rem;
    gap: 0.5rem;
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
  
  .flex {
    flex-wrap: wrap;
  }
  
  .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
  
  /* Check Item Mobile */
  .check-item {
    padding: 0.75rem 0.875rem;
    gap: 0.625rem;
  }
  
  .check-item-name {
    font-size: 0.8rem;
  }
  
  .check-item-meta {
    font-size: 0.7rem;
  }
  
  /* Card adjustments */
  .card-body {
    padding: 1rem;
  }
  
  .card-header {
    padding: 0.875rem 1rem;
  }
  
  /* Stat card mobile */
  .stat-card {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  :root {
    --header-h: 56px;
  }
  
  .page-content {
    padding: 0.75rem;
  }
  
  .card {
    border-radius: var(--radius);
  }
  
  .card-header {
    padding: 0.75rem 0.875rem;
  }
  
  .card-body {
    padding: 0.875rem;
  }

  /* Form Gönder Butonu Mobil Sabitleme */
  .check-footer-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    padding: 1rem;
    border-top: 1px solid var(--border);
    margin: 0 -1rem -1rem -1rem;
    z-index: 10;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
  }
  
  .header {
    padding: 0 0.75rem;
    height: var(--header-h);
  }
  
  .header-title {
    font-size: 0.9rem;
  }
  
  .sidebar-brand-text {
    display: none;
  }
  
  .sidebar-item span:last-child {
    display: none;
  }
  
  .btn {
    padding: 0.5rem 0.625rem;
    font-size: 0.8rem;
  }
  
  .form-control {
    font-size: 16px;
    padding: 0.5rem 0.625rem;
  }
  
  .form-row, .form-row-3 {
    gap: 0.5rem;
  }
  
  .table {
    font-size: 0.75rem;
  }
  
  .table th, .table td {
    padding: 0.375rem 0.25rem;
  }
  
  /* Modal full screen on very small devices */
  .modal {
    max-height: 95vh;
    width: 100vw;
    border-radius: 0;
  }
  
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  
  .modal-header {
    padding: 0.875rem;
  }
  
  .modal-body {
    padding: 0.875rem;
  }
  
  .modal-footer {
    padding: 0.875rem;
    gap: 0.375rem;
  }
  
  .modal-footer .btn {
    flex: 1;
    min-width: 0;
  }
  
  /* Input spacing for iOS */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px;
    padding: 0.625rem 0.75rem;
  }
}


/* ─── Responsive Grid Utility ───────────────────────────────────────── */
.responsive-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .responsive-grid {
    grid-template-columns: 240px 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .responsive-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}


/* ─── Sidebar Araç Bilgisi Bölümü ──────────────────────────────────────── */
.sidebar-vehicle-section {
  margin: 0;
  padding: .625rem 1rem;
  background: rgba(59,130,246,.12);
  border-bottom: 1px solid rgba(255,255,255,.08);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sidebar-vehicle-info {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  min-width: 0;
}

.sidebar-change-vehicle {
  font-size: .7rem;
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: .2rem .5rem;
  white-space: nowrap;
  text-decoration: none;
  transition: all .2s;
  flex-shrink: 0;
}

.sidebar-change-vehicle:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
}

/* ─── Select Vehicle Sayfası: main-content tam genişlik ─────────────────── */
.sv-fullpage .main-content {
  margin-left: 0 !important;
  width: 100% !important;
}
