/* =========================================================
   EPAS Servis · Tasarım Sistemi
   Renk Paleti, Tipografi, Bileşenler, Responsive
   (EPAS stok paneliyle aynı tasarım ailesi, turuncu kimlik)
   ========================================================= */

:root {
  /* Marka (turuncu) */
  --primary: #F57C00;
  --primary-hover: #E66F00;
  --primary-dark: #C25E00;
  --primary-light: #FFF3E6;
  --primary-soft: #FFF8F1;
  --primary-rgb: 245, 124, 0;

  /* Nötrler */
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e9f2;
  --border-soft: #eef1f6;
  --text: #0f172a;
  --text-2: #334155;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  /* Genel durum renkleri */
  --danger: #ef4444;
  --danger-soft: #fef2f2;

  /* Servis durumları: ana renk (grafik/nokta) · metin · zemin */
  --st-pending: #94a3b8;  --st-pending-text: #475569;  --st-pending-soft: #f1f5f9;
  --st-planned: #3b82f6;  --st-planned-text: #2563eb;  --st-planned-soft: #eff6ff;
  --st-field: var(--primary); --st-field-text: var(--primary-dark); --st-field-soft: var(--primary-light);
  --st-missing: #8b5cf6;  --st-missing-text: #7c3aed;  --st-missing-soft: #f5f3ff;
  --st-done: #10b981;     --st-done-text: #059669;     --st-done-soft: #ecfdf5;
  --st-late: #ef4444;     --st-late-text: #dc2626;     --st-late-soft: #fef2f2;

  /* Efektler */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-primary: 0 8px 24px rgba(var(--primary-rgb), 0.28);

  /* Radius */
  --radius: 8px;
  --radius-pill: 999px;

  /* Yerleşim */
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 76px;
  --header-h: 68px;

  --transition: 180ms cubic-bezier(.4, 0, .2, 1);
}

/* Koyu tema */
[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111a2b;
  --surface-2: #0f1827;
  --border: #1e293b;
  --border-soft: #182236;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-muted: #94a3b8;
  --text-soft: #64748b;
  --primary-dark: #FFA040;
  --primary-light: rgba(var(--primary-rgb), 0.15);
  --primary-soft: rgba(var(--primary-rgb), 0.08);
  --danger-soft: rgba(239, 68, 68, 0.12);

  --st-pending-text: #cbd5e1; --st-pending-soft: rgba(148, 163, 184, 0.14);
  --st-planned-text: #60a5fa; --st-planned-soft: rgba(59, 130, 246, 0.14);
  --st-missing-text: #a78bfa; --st-missing-soft: rgba(139, 92, 246, 0.14);
  --st-done-text: #34d399;    --st-done-soft: rgba(16, 185, 129, 0.14);
  --st-late-text: #f87171;    --st-late-soft: rgba(239, 68, 68, 0.14);

  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -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;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }

p { margin: 0; color: var(--text-2); }

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

button { font-family: inherit; cursor: pointer; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

/* =====================
   APP SHELL
   ===================== */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns var(--transition);
}
.app-shell.collapsed { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
.app-body { min-width: 0; }

/* SIDEBAR */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  z-index: 50;
}
.sidebar__header {
  height: var(--header-h);
  padding: 0 22px;
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 18px;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.sidebar__brand:hover { color: var(--text); }
.logo-mark {
  width: 38px; height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: grid; place-items: center;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-primary);
}
.sidebar__brand small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0;
  margin-top: -2px;
}
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
}
.sidebar__group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 14px 8px;
  white-space: nowrap;
}
.sidebar__group-label:first-child { padding-top: 4px; }
.sidebar__item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  margin-bottom: 2px;
  position: relative;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.sidebar__item:hover { background: var(--surface-2); color: var(--text); }
.sidebar__item.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}
.sidebar__item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}
.sidebar__item.active svg { color: var(--primary); }
.sidebar__item svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar__item span { overflow: hidden; text-overflow: ellipsis; }
.sidebar__item--logout:hover { background: var(--danger-soft); color: var(--danger); }
.sidebar__footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.app-shell.collapsed .sidebar__brand-text,
.app-shell.collapsed .sidebar__item span,
.app-shell.collapsed .sidebar__group-label { display: none; }
.app-shell.collapsed .sidebar__header { padding: 0; justify-content: center; }
.app-shell.collapsed .sidebar__item { justify-content: center; padding: 10px; }

/* Overlay yalnızca mobilde */
.sidebar-overlay { display: none; }

/* HEADER */
.app-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0;
  z-index: 40;
}
.app-header__title { min-width: 0; }
.app-header__title h1 {
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.breadcrumb {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
}
.breadcrumb svg { width: 12px; height: 12px; color: var(--text-soft); }
.breadcrumb b { font-weight: 500; color: var(--text-2); }
.app-header__search {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}
.app-header__search input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}
.app-header__search input::placeholder { color: var(--text-soft); }
.app-header__search input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.app-header__search > svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.app-header__actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.icon-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--text-2);
  position: relative;
  flex-shrink: 0;
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--surface-2); color: var(--primary); border-color: var(--primary-light); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--surface);
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  transition: all var(--transition);
}
.user-chip:hover { background: var(--surface-2); }
.user-chip svg { width: 14px; height: 14px; color: var(--text-muted); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: grid; place-items: center;
  color: white; font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}
.user-chip__info { line-height: 1.1; text-align: left; }
.user-chip__info b { font-size: 13px; font-weight: 600; display: block; color: var(--text); }
.user-chip__info small { font-size: 11px; color: var(--text-muted); }

/* MAIN */
.app-main {
  padding: 28px;
  min-height: calc(100vh - var(--header-h));
}

/* =====================
   BUTTON
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  user-select: none;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.36);
}
.btn--primary:active { transform: translateY(0); }
.btn--secondary {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--border);
}
.btn--secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--text-soft); }
.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn--sm { padding: 7px 12px; font-size: 12.5px; }
.btn--icon { padding: 6px; width: 32px; height: 32px; }
.btn--icon:hover { background: var(--primary-light); color: var(--primary-dark); border-color: transparent; }

/* =====================
   CARD
   ===================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}
.card__header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.card__header > div { min-width: 0; }
.card__header h3 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__header small { display: block; font-size: 12px; color: var(--text-muted); font-weight: 400; }
.card__header .spacer { flex: 1; }
.card__header-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  display: grid; place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}
.card__header-icon svg { width: 16px; height: 16px; }
.card__header-icon--danger { background: var(--danger-soft); color: var(--danger); }
.card__body { padding: 22px; }
.card__body--list { padding: 6px 22px; }

/* =====================
   STAT CARDS
   ===================== */
.stat-grid {
  display: grid;
  /* 5 kart: üstte 3, altta 2 geniş kart */
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat-grid > .stat { grid-column: span 2; }
.stat-grid > .stat:nth-child(n+4) { grid-column: span 3; }
@media (min-width: 1680px) {
  .stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stat-grid > .stat, .stat-grid > .stat:nth-child(n+4) { grid-column: auto; }
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  display: flex; gap: 16px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--tone-soft);
  color: var(--tone);
}
.stat__icon svg { width: 22px; height: 22px; }
.stat__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat__value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat__delta {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat__delta svg { width: 12px; height: 12px; flex-shrink: 0; }
.stat__delta b { font-weight: 600; color: var(--tone-text); }

/* Ton sınıfları (status.js → tone-*): stat kartı, rozet, liste ve açıklama renkleri */
.tone-pending { --tone: var(--st-pending); --tone-soft: var(--st-pending-soft); --tone-text: var(--st-pending-text); }
.tone-planned { --tone: var(--st-planned); --tone-soft: var(--st-planned-soft); --tone-text: var(--st-planned-text); }
.tone-field { --tone: var(--st-field); --tone-soft: var(--st-field-soft); --tone-text: var(--st-field-text); }
.tone-missing { --tone: var(--st-missing); --tone-soft: var(--st-missing-soft); --tone-text: var(--st-missing-text); }
.tone-done { --tone: var(--st-done); --tone-soft: var(--st-done-soft); --tone-text: var(--st-done-text); }
.tone-late { --tone: var(--st-late); --tone-soft: var(--st-late-soft); --tone-text: var(--st-late-text); }
.tone-pending .stat__icon { color: var(--st-pending-text); }

/* =====================
   BADGE
   ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--tone-soft, var(--surface-2));
  color: var(--tone-text, var(--text-2));
}
.badge--dot::before {
  content: ''; width: 6px; height: 6px;
  background: var(--tone, currentColor); border-radius: 50%;
}

/* =====================
   TABLE
   ===================== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
/* İlk/son sütunlar kart kenarıyla hizalı */
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table tbody td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-2);
  vertical-align: middle;
  white-space: nowrap;
}
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody td b { color: var(--text); font-weight: 600; }
.table .text-right { text-align: right; }
.cell-truncate {
  display: block;
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-truncate--md { max-width: 155px; }
.table-empty { text-align: center; padding: 36px 16px !important; color: var(--text-muted) !important; }

.staff {
  display: flex; align-items: center; gap: 8px;
  max-width: 165px;
}
.staff__avatars { display: flex; flex-shrink: 0; }
.staff__avatars .avatar {
  width: 26px; height: 26px;
  font-size: 10.5px;
  border: 2px solid var(--surface);
}
.staff__avatars .avatar + .avatar { margin-left: -8px; }
.staff__names { overflow: hidden; text-overflow: ellipsis; }

/* =====================
   LİSTELER (Hareketler / Uyarılar)
   ===================== */
.list-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
}
.list-item:last-child { border-bottom: none; }
.list-item__icon {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--tone-soft);
  color: var(--tone);
}
.list-item__icon svg { width: 16px; height: 16px; }
.list-item__body { flex: 1; min-width: 0; }
.list-item__title {
  font-size: 13.5px;
  color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.list-item__title b { color: var(--text); font-weight: 600; }
.list-item__meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
}
.list-item__meta svg { width: 12px; height: 12px; }
.list-item__meta .sep { color: var(--text-soft); }
.list-item__status { font-weight: 600; color: var(--tone-text); }
.list-item__aside { flex-shrink: 0; align-self: center; }

.empty-note {
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
}

/* =====================
   DROPDOWN
   ===================== */
.dropdown { position: relative; display: inline-block; }
.dropdown__menu {
  position: absolute;
  right: 0; top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  padding: 6px;
  z-index: 100;
  display: none;
  animation: fade-in 120ms ease;
}
.dropdown.open .dropdown__menu { display: block; }
.dropdown__head {
  padding: 8px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.dropdown__head .spacer { flex: 1; }
.dropdown__head b { font-size: 13px; display: block; }
.dropdown__head small { font-size: 12px; color: var(--text-muted); }
.dropdown__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text-2);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-weight: 500;
}
.dropdown__item:hover { background: var(--primary-light); color: var(--primary-dark); }
.dropdown__item svg { width: 16px; height: 16px; flex-shrink: 0; }
.dropdown__item--danger { color: var(--danger); }
.dropdown__item--danger:hover { background: var(--danger-soft); color: var(--danger); }
.dropdown__divider { height: 1px; background: var(--border); margin: 6px 0; }

.notif-menu { width: 340px; max-width: calc(100vw - 32px); }
.notif-menu .list-item { padding: 10px; border-bottom: none; border-radius: var(--radius); }
.notif-menu .list-item:hover { background: var(--surface-2); }
.notif-menu .list-item__title { white-space: normal; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* =====================
   TOAST
   ===================== */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column-reverse;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; align-items: flex-start; gap: 12px;
  min-width: 280px; max-width: 380px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 240ms ease;
}
.toast.removing { animation: toast-out 200ms ease forwards; }
.toast > svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.toast b { font-size: 14px; color: var(--text); display: block; margin-bottom: 2px; }
.toast p { font-size: 13px; color: var(--text-muted); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* =====================
   GRAFİK & IZGARA
   ===================== */
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.section { margin-bottom: 24px; }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.chart-wrap { position: relative; height: 300px; }
.chart-wrap--donut { height: 210px; }
.chart-wrap--bars { height: 320px; }
.chart-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.chart-center b { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--text); }
.chart-center small { font-size: 12px; color: var(--text-muted); }
.chart-error {
  height: 100%;
  display: grid; place-items: center;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.legend {
  list-style: none;
  margin: 16px 0 0; padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}
.legend li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  min-width: 0;
}
.legend li::before {
  content: '';
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--tone);
  flex-shrink: 0;
}
.legend span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend b { font-weight: 600; color: var(--text); }
.legend small { color: var(--text-muted); font-size: 11.5px; min-width: 38px; text-align: right; }

/* =====================
   YARDIMCILAR
   ===================== */
.mobile-only { display: none; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1360px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 > .card--alert { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
  .grid-main, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .mobile-only { display: grid; }
  .desktop-only { display: none !important; }
  .app-shell, .app-shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
  }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 49;
  }
  .app-shell.sidebar-open .sidebar-overlay { display: block; }
  .app-main { padding: 18px; }
  .app-header { padding: 0 16px; gap: 12px; }
  .user-chip { padding: 4px; }
  .user-chip__info, .user-chip > svg { display: none; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat-grid > .stat, .stat-grid > .stat:nth-child(n+4) { grid-column: auto; }
  .stat-grid > .stat:last-child { grid-column: 1 / -1; }
  .stat { padding: 16px; gap: 12px; }
  .stat__value { font-size: 22px; }
  .stat__icon { width: 40px; height: 40px; }
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .card__header { padding: 14px 16px; }
  .card__body { padding: 16px; }
  .card__body--list { padding: 4px 16px; }
  .breadcrumb { display: none; }
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: 0; max-width: none; }
}
