/*
 * Pembemavi Doktor
 * Renkler ve dil pmhst/labsorgu ile aynı: pembe #df5f90, mor #755d97
 */

:root {
  --primary: #df5f90;
  --primary-dark: #c84679;
  --primary-light: #fce7f3;
  --secondary: #755d97;
  --secondary-dark: #5c4779;
  --secondary-light: #f3e8ff;
  --gradient-main: linear-gradient(135deg, #755d97 0%, #df5f90 100%);
  --gradient-hover: linear-gradient(135deg, #5c4779 0%, #c84679 100%);
  --text-main: #1e1b4b;
  --text-muted: #64748b;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --field-bg: #faf5ff;
  --border-color: #e2e8f0;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 12px rgba(223, 95, 144, 0.08);
  --shadow-md: 0 10px 25px -5px rgba(223, 95, 144, 0.12), 0 8px 10px -6px rgba(117, 93, 151, 0.08);
  --shadow-lg: 0 25px 50px -12px rgba(117, 93, 151, 0.22);
  --sidebar-w: 268px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-main);
  background: linear-gradient(135deg, #f5f3ff 0%, #fff1f2 50%, #f8fafc 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--secondary); }
a:hover { color: var(--primary); }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid rgba(223, 95, 144, 0.45);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Yerleşim ---------- */

.app { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 4px 0 24px rgba(117, 93, 151, 0.06);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.25rem 1.25rem 1rem;
  text-decoration: none;
}
.brand img { height: 42px; width: auto; display: block; }
.brand-sub {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  background: var(--primary-light);
  white-space: nowrap;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text .title {
  font-weight: 800;
  font-size: 1.1rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-text .subtitle { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.nav {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.85rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}
.nav-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.9rem 0.75rem 0.4rem;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 4px;
  border-radius: var(--radius-md);
  color: var(--secondary-dark);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.nav a i {
  width: 20px;
  text-align: center;
  color: var(--secondary);
  opacity: 0.8;
}
.nav a:hover { background: var(--secondary-light); color: var(--secondary-dark); }
.nav a.active {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 14px rgba(117, 93, 151, 0.3);
}
.nav a.active i { color: #fff; opacity: 1; }

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(117, 93, 151, 0.05);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title { font-size: 1.05rem; font-weight: 800; color: var(--secondary-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: #fff;
  color: var(--secondary);
  cursor: pointer;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gradient-main);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.user-name { display: flex; flex-direction: column; line-height: 1.2; }
.user-name strong { font-size: 0.875rem; color: var(--secondary-dark); }
.user-name span { font-size: 0.75rem; color: var(--text-muted); }

.page {
  flex: 1;
  width: 100%;
  padding: 2rem;
}

.footer {
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.7);
}
.footer i { color: var(--primary); }

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 75, 0.35);
  z-index: 150;
}

/* ---------- Kart ---------- */

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1.5rem 1.75rem 1.85rem;
  background: var(--gradient-main);
  color: #fff;
}
.card-head::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 16px;
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
}
.card-head-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.card-head h2 { font-size: 1.2rem; font-weight: 800; }
.card-head p { margin: 2px 0 0; font-size: 0.85rem; opacity: 0.9; }
.card-head .badge-count {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.95);
  color: var(--secondary-dark);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  white-space: nowrap;
}

.card-body { padding: 1.25rem 1.75rem 1.75rem; }
.card-body-table { padding-top: 1.5rem; }

/* ---------- Karşılama ve istatistik ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--gradient-main);
  color: #fff;
  padding: 2.25rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-lg);
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.hero::before { width: 260px; height: 260px; right: -60px; top: -90px; }
.hero::after { width: 160px; height: 160px; right: 140px; bottom: -90px; }
.hero h1 { font-size: 1.6rem; font-weight: 800; position: relative; }
.hero p { margin: 0.35rem 0 0; opacity: 0.92; position: relative; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1.5px solid #f3e8ff;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: #fbcfe8;
  box-shadow: var(--shadow-md);
  color: inherit;
}
.stat-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  background: var(--gradient-main);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 6px 16px rgba(117, 93, 151, 0.3);
  flex-shrink: 0;
}
.stat-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { display: block; font-size: 1.9rem; font-weight: 800; color: var(--secondary-dark); line-height: 1.1; }
.stat-link { margin-left: auto; color: var(--primary); }

/* ---------- Form ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
  align-items: end;
}

.field { margin-bottom: 1.1rem; }
.form-grid .field { margin-bottom: 0; }

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--secondary-dark);
  margin-bottom: 0.45rem;
}
.form-label i { color: var(--primary); }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > i {
  position: absolute;
  left: 1rem;
  color: var(--secondary);
  opacity: 0.7;
  pointer-events: none;
}
.input-wrap .form-control { padding-left: 2.6rem; }

.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.93rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background-color: var(--field-bg);
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(223, 95, 144, 0.15);
}
.form-control[readonly] { background-color: #f8fafc; color: var(--text-main); }
textarea.form-control { min-height: 96px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23755d97' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.input-wrap .flatpickr-input { padding-left: 2.6rem; }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.25rem; }

/* ---------- Butonlar ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 16px rgba(117, 93, 151, 0.3);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gradient-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(223, 95, 144, 0.4);
}

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

.btn-block { width: 100%; padding: 0.95rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.42rem 0.85rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient-main);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(117, 93, 151, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-row:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(223, 95, 144, 0.35); }

.btn-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: #fff;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ---------- Tablo ---------- */

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.table-info { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1.5px solid #f3e8ff;
  border-radius: var(--radius-md);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.data th {
  background: #faf5ff;
  color: var(--secondary-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1.5px solid #f3e8ff;
  white-space: nowrap;
}
table.data td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f5f0fb;
  vertical-align: middle;
  white-space: nowrap;
}
table.data td.col-text { white-space: normal; min-width: 280px; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background 0.15s; }
table.data tbody tr:hover { background: #fdf2f8; }
table.data td.col-action, table.data th.col-action { text-align: right; width: 1%; }
table.data td.empty { text-align: center; padding: 0; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}
.pager button {
  min-width: 38px; height: 38px;
  padding: 0 0.6rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: #fff;
  color: var(--secondary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.pager button:hover:not(:disabled):not(.active) { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.pager button.active { background: var(--gradient-main); border-color: transparent; color: #fff; box-shadow: 0 3px 10px rgba(117, 93, 151, 0.25); }
.pager button:disabled { opacity: 0.4; cursor: default; }

/* ---------- Bilgi kutuları ---------- */

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border-left: 4px solid;
}
.alert-danger { background: var(--danger-bg); border-color: var(--danger); color: var(--danger-text); }
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success-text); }
.alert .alert-close { margin-left: auto; background: none; border: none; color: inherit; cursor: pointer; opacity: 0.6; font-size: 1rem; }
.alert .alert-close:hover { opacity: 1; }

.empty-state { text-align: center; padding: 2.25rem 1rem; }
.empty-state-icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: #fdf2f8;
  border: 2px solid #fbcfe8;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 0.85rem;
}
.empty-state h3 { font-size: 1.05rem; font-weight: 800; color: var(--secondary-dark); margin-bottom: 0.3rem; }
.empty-state p { margin: 0; color: var(--text-muted); font-size: 0.875rem; }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 2rem 1rem;
  color: var(--secondary);
  font-weight: 700;
}
.spinner {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 3px solid var(--secondary-light);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Modal (native <dialog>) ---------- */

dialog.modal {
  border: none;
  padding: 0;
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--card-bg);
  color: var(--text-main);
  overflow: hidden;
}
dialog.modal.modal-lg { width: min(960px, calc(100vw - 2rem)); }
dialog.modal[open] { display: flex; flex-direction: column; animation: modal-in 0.2s ease; }
dialog.modal::backdrop { background: rgba(30, 27, 75, 0.45); backdrop-filter: blur(2px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

dialog.modal form { display: contents; }
.modal .card-head { flex-shrink: 0; }
.modal-close {
  margin-left: auto;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.32); }
.modal-body { padding: 1.1rem 1.75rem 1.25rem; overflow-y: auto; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 1rem 1.75rem 1.25rem;
  border-top: 1px solid #f3e8ff;
  flex-shrink: 0;
}
.modal-footer .spacer { margin-right: auto; }
.modal .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.modal-message { text-align: center; padding: 1.5rem 1.75rem 0.5rem; }
.modal-message p { margin: 0 0 1rem; color: var(--text-main); font-weight: 600; }

/* ---------- Giriş ---------- */

.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(117, 93, 151, 0.05);
  padding: 0.9rem 2rem;
}
.auth-navbar .brand { padding: 0; max-width: 1100px; margin: 0 auto; }
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}
.auth-card { width: 100%; max-width: 460px; margin: 0; box-shadow: var(--shadow-lg); }
.auth-card .card-head { flex-direction: column; text-align: center; padding: 2.25rem 1.75rem 2rem; gap: 0; }
.auth-card .card-head h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.35rem; }
.auth-card .card-head p { font-size: 0.9rem; opacity: 0.92; margin: 0; }
.logo-badge {
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 20px;
  border-radius: 50px;
  display: inline-flex;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.logo-badge img { height: 38px; width: auto; }
.auth-card .card-body { padding: 1.75rem 2rem 2rem; }
.auth-card .input-wrap .form-control { padding-top: 0.9rem; padding-bottom: 0.9rem; }

/* ---------- Flatpickr renkleri ---------- */

.flatpickr-calendar { border-radius: var(--radius-md); box-shadow: var(--shadow-md); font-family: inherit; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--primary); border-color: var(--primary); }
.flatpickr-day.today { border-color: var(--secondary); }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months { color: var(--secondary-dark); }

/* ---------- Mobil ---------- */

@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .overlay { display: block; }
  .topbar { padding: 0.75rem 1rem; }
  .page { padding: 1.25rem 0.85rem; }
  .user-name { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .card-head { padding: 1.25rem 1.25rem 1.6rem; }
  .card-body { padding: 1rem 1.1rem 1.25rem; }
  .modal-body, .modal-footer { padding-left: 1.1rem; padding-right: 1.1rem; }
  .modal .two-col { grid-template-columns: 1fr; }
  .hero { padding: 1.75rem 1.35rem; }
  .hero h1 { font-size: 1.3rem; }
  .crumb { display: none; }

  /* Tablolar kart listesine dönüşür */
  .table-wrap { border: none; overflow: visible; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data thead { display: none; }
  table.data tbody tr {
    background: #faf5ff;
    border: 1.5px solid #f3e8ff;
    border-radius: var(--radius-md);
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.75rem;
  }
  table.data tbody tr:hover { background: #fdf2f8; border-color: #fbcfe8; }
  table.data td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed #ede4f7;
    text-align: right;
  }
  table.data td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: left;
  }
  table.data td:last-child { border-bottom: none; }
  table.data td.col-action { width: 100%; }
  table.data td.empty { display: block; }
  table.data td.empty::before { display: none; }
  table.data tr.empty-row { background: none; border: none; padding: 0; }
}

/* ---------- Rozetler ---------- */

.table-actions { display: flex; justify-content: flex-end; margin-bottom: 1rem; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.pill-danger { background: var(--danger-bg); color: var(--danger-text); }
.pill-info { background: var(--secondary-light); color: var(--secondary-dark); }
.pill-muted { background: #f1f5f9; color: var(--text-muted); }

.sidebar .brand { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 1.1rem; border-bottom: 1px solid #f3e8ff; margin-bottom: 0.25rem; }

@media (max-width: 640px) {
  table.data td { white-space: normal; }
  table.data td.col-text { display: block; min-width: 0; text-align: left; }
  table.data td.col-text::before { display: block; margin-bottom: 0.2rem; }
  table.data td.col-action .btn-row { width: 100%; justify-content: center; padding: 0.6rem; }
  table.data td.col-action::before { display: none; }
  .form-control { font-size: 16px; }
}

/* ---------- Ana sayfa paneli ---------- */

.hero-dash {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hero-text { position: relative; max-width: 760px; }
.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 0.75rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  font-weight: 700;
}
.hero-actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }

.btn-white { background: #fff; color: var(--secondary-dark); box-shadow: 0 6px 18px rgba(30, 27, 75, 0.15); }
.btn-white:hover { color: var(--primary); transform: translateY(-2px); }
.btn-glass { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, 0.28); color: #fff; transform: translateY(-2px); }

.stat-grid { margin-bottom: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
.stat-grid .stat-link { display: none; }
.stat-grid .stat-label { display: block; line-height: 1.25; margin-bottom: 2px; }
.stat-grid .stat-card > span:nth-child(2) { min-width: 0; }
.stat-grid .stat-card { padding: 1.1rem 1.15rem; gap: 0.85rem; }
.stat-grid .stat-icon { width: 48px; height: 48px; font-size: 1.15rem; }

.dash-grid { columns: 2; column-gap: 1.5rem; }
.dash-grid > .panel { break-inside: avoid; margin-bottom: 1.5rem; }

.panel {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1.5px solid #f3e8ff;
  box-shadow: var(--shadow-sm);
  padding: 1.35rem 1.5rem 1.5rem;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary-light);
}
.panel-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--gradient-main);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(117, 93, 151, 0.25);
}
.panel-head h2 { font-size: 1.02rem; font-weight: 800; color: var(--secondary-dark); }
.panel-head p { margin: 2px 0 0; font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.panel-link {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.4rem 0.75rem;
  border-radius: 50px;
  background: var(--primary-light);
}
.panel-link:hover { background: var(--primary); color: #fff; }
.panel .empty-state { padding: 1.5rem 1rem 0.5rem; }

.progress {
  height: 8px;
  border-radius: 50px;
  background: var(--secondary-light);
  overflow: hidden;
}
.progress span { display: block; height: 100%; border-radius: 50px; background: var(--gradient-main); }
.progress-text { margin: 0.45rem 0 0.9rem; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }

/* Zaman akışı */
.timeline { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow-y: auto; }
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 54px 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 10px;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-md);
}
.timeline-item + .timeline-item { margin-top: 2px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(0.5rem + 54px + 10px + 8px);
  top: 0; bottom: 0;
  width: 2px;
  background: #f3e8ff;
}
.timeline-item:first-child::before { top: 50%; }
.timeline-item:last-child::before { bottom: 50%; }
.timeline-time { font-weight: 800; font-size: 0.9rem; color: var(--secondary-dark); line-height: 1.15; }
.timeline-time small { display: block; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.timeline-dot {
  position: relative;
  width: 14px; height: 14px;
  margin-left: 2px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #e9d5ff;
  z-index: 1;
}
.timeline-body { display: flex; flex-direction: column; min-width: 0; }
.timeline-body strong { font-size: 0.9rem; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-body span { font-size: 0.78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-item.is-gecti { opacity: 0.55; }
.timeline-item.is-gecti .timeline-dot { background: #e9d5ff; }
.timeline-item.is-simdi, .timeline-item.is-sirada { background: #fdf2f8; }
.timeline-item.is-simdi .timeline-dot, .timeline-item.is-sirada .timeline-dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(223, 95, 144, 0.2);
}
.pill-primary { background: var(--gradient-main); color: #fff; }

/* Kayıt listesi */
.item-list { list-style: none; margin: 0; padding: 0; }
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.7rem 0.6rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.item:hover { background: #fdf2f8; color: inherit; }
.item-list li + li { border-top: 1px dashed #ede4f7; }
.item-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--secondary-light);
  color: var(--secondary-dark);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.item-avatar-soft { background: var(--primary-light); color: var(--primary); }
.item-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.item-body strong { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-body span { font-size: 0.78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; font-size: 0.8rem; font-weight: 700; color: var(--secondary-dark); }
.item-meta small { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1199px) {
  .dash-grid { columns: 1; }
}
@media (max-width: 640px) {
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .panel { padding: 1.1rem 1rem 1.15rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 0.6rem; padding: 1rem; }
  .stat-icon { width: 42px; height: 42px; font-size: 1.05rem; border-radius: 12px; }
  .stat-value { font-size: 1.5rem; }
  .stat-link { display: none; }
  .item-meta small { display: none; }
}
