/* HealthBooking Admin – Profesyonel, hızlı tasarım */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --sidebar: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: rgba(14, 165, 233, 0.15);
  --bg: #f8fafc;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Layout – hızlı render */
.dashboard-page {
  display: flex;
  min-height: 100vh;
  contain: layout style;
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-header i { color: var(--primary); }
.sidebar-nav { flex: 1; padding: 0.5rem 0; overflow-y: auto; }
.sidebar-nav .nav-item,
.sidebar-footer .nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.25rem;
  color: #94a3b8;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav .nav-item:hover,
.sidebar-footer .nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav .nav-item.active { background: var(--sidebar-active); color: var(--primary); }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 0.5rem 0; }

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}
.topbar {
  background: var(--card);
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 1.2rem; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }
.topbar-actions .btn { text-decoration: none; }
.topbar-user { color: var(--muted); font-size: 0.85rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--primary-dark); }
.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: 6px;
}
.btn-secondary { background: var(--muted); color: #fff; }
.btn-secondary:hover { background: #475569; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg); }

/* Content area */
.dashboard-section {
  padding: 1.25rem 1.5rem;
  flex: 1;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--card);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  contain: layout;
}
.stat-card i { font-size: 1.75rem; color: var(--primary); }
.stat-value { display: block; font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.85rem; color: var(--muted); }

/* Table – compact, hızlı */
.table-wrap { overflow-x: auto; margin-bottom: 1rem; -webkit-overflow-scrolling: touch; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td { padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: #f8fafc; font-weight: 600; color: var(--text); white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #f8fafc; }
.admin-table .cell-actions { white-space: nowrap; }
.admin-table .cell-actions .btn-sm { margin-right: 0.25rem; }
.text-muted { color: var(--muted); font-size: 0.85rem; }
.table-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  vertical-align: middle;
}

.loading-msg, .error-msg { padding: 0.75rem; font-size: 0.9rem; }
.error-msg { color: var(--danger); }
.pagination-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.pagination-link {
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  background: var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
}
.pagination-link:hover { background: #cbd5e1; }
.pagination-link.active { background: var(--primary); color: #fff; }

/* Forms */
.form-section { max-width: 920px; }
.form-actions-top { margin-bottom: 1rem; }
.tabs {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tab-headers {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.tab-btn {
  padding: 0.6rem 1.25rem;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); background: var(--card); }
.tab-content-wrap { padding: 1.25rem; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { margin-bottom: 0.3rem; font-weight: 500; font-size: 0.85rem; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 72px; }
.form-actions { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; }
.form-message { margin-top: 1rem; padding: 0.6rem 1rem; border-radius: var(--radius); font-size: 0.9rem; }
.form-message.success { background: #dcfce7; color: #166534; }
.form-message.error { background: #fee2e2; color: #991b1b; }
.checkbox-list { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; max-height: 180px; overflow-y: auto; }
.checkbox-label { display: flex; align-items: center; gap: 0.35rem; font-weight: normal; cursor: pointer; font-size: 0.9rem; }
.checkbox-label input { margin: 0; }

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sidebar) 0%, #1e293b 100%);
}
.login-box {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 380px;
}
.login-header { text-align: center; margin-bottom: 1.5rem; }
.login-header i { font-size: 2.25rem; color: var(--primary); }
.login-header h1 { margin: 0.5rem 0 0; font-size: 1.35rem; }
.login-header p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.login-form .form-group { margin-bottom: 1rem; }
.login-form label { display: block; margin-bottom: 0.25rem; font-weight: 500; font-size: 0.9rem; }
.login-form input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
}
.btn-block { width: 100%; justify-content: center; margin-top: 0.5rem; }
.login-footer { text-align: center; margin-top: 1rem; font-size: 0.9rem; }
.login-footer a { color: var(--primary); }

.list-title { margin: 0 0 0.75rem; font-size: 1.05rem; font-weight: 600; }
.table-actions { margin-bottom: 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.list-count { color: var(--muted); font-size: 0.9rem; }

/* Empty / loading state */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Galeri: küçük resim grid + sil butonu */
.gallery-section { margin-top: 0.5rem; }
.gallery-section .list-title { font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
  aspect-ratio: 1;
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item-error.show { display: block !important; padding: 0.25rem; text-align: center; font-size: 0.75rem; }
.gallery-item .gallery-delete {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.3rem 0.4rem;
  min-width: auto;
  font-size: 0.75rem;
  background: rgba(239, 68, 68, 0.95);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.gallery-item .gallery-delete:hover { background: var(--danger); }
.gallery-section input[type="file"] { display: block; margin-top: 0.25rem; }

/* Bootstrap uyumlu admin tabloları */
.admin-table-modern { font-size: 0.9rem; }
.admin-table-modern tbody tr.admin-row-link { cursor: pointer; }
.admin-table-modern tbody tr.admin-row-link:hover { background-color: rgba(14, 165, 233, 0.06); }
.tab-headers.card-header .tab-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius);
}
.tab-headers.card-header .tab-btn:hover { color: var(--text); }
.tab-headers.card-header .tab-btn.active { color: var(--primary); font-weight: 600; background: var(--card); }

/* Transfer list (Minimal UI tarzı) */
.transfer-list {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: nowrap;
}
.transfer-list-left,
.transfer-list-right {
  flex: 1;
  min-width: 0;
  max-width: 280px;
}
.transfer-list-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}
.transfer-list-items {
  max-height: 240px;
  overflow-y: auto;
  padding: 0.25rem 0;
}
.transfer-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.transfer-list-item:last-child { border-bottom: none; }
.transfer-list-item:hover { background: rgba(14, 165, 233, 0.06); }
.transfer-list-item input[type="checkbox"] { margin: 0; cursor: pointer; }
.transfer-list-item .transfer-list-item-label { flex: 1; }
.transfer-list-item .transfer-list-item-meta { font-size: 0.75rem; color: var(--muted); }
@media (max-width: 768px) {
  .transfer-list { flex-wrap: wrap; }
  .transfer-list-left, .transfer-list-right { max-width: 100%; }
}

@media (max-width: 768px) {
  .sidebar { width: 72px; }
  .sidebar-header span,
  .sidebar-nav .nav-item span:not(.fa),
  .sidebar-footer .nav-item span:not(.fa) { display: none; }
  .sidebar-nav .nav-item,
  .sidebar-footer .nav-item { justify-content: center; padding: 0.75rem; }
  .form-grid { grid-template-columns: 1fr; }
}
