.dash-body { min-height: 100vh; }
.dash-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 32px 100px;
}

#user-info {
  color: var(--text-dim);
  font-size: 13px;
  font-family: var(--mono);
}

/* ---------- Auth ---------- */
.auth-card {
  max-width: 420px;
  margin: 60px auto;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.auth-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--text-dim); font-weight: 500;
}
.auth-form input, .auth-form select, .auth-form textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}
.auth-form input:focus, .auth-form select:focus, .auth-form textarea:focus {
  outline: none; border-color: var(--steel);
}
.auth-form button[type="submit"] { margin-top: 6px; border: 0; cursor: pointer; }
.auth-error { color: var(--red); font-size: 13px; min-height: 18px; margin: 0; }
.checkbox-label { flex-direction: row !important; align-items: center; gap: 8px !important; }
.checkbox-label input { width: auto; }
.auth-switch { margin-top: 18px; font-size: 13.5px; color: var(--text-dim); }
.link-btn {
  background: none; border: 0; color: var(--amber);
  cursor: pointer; font-size: inherit; padding: 0; text-decoration: underline;
}

/* ---------- Toolbar / filters ---------- */
.dash-toolbar {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.dash-toolbar button { border: 0; cursor: pointer; }
.dash-filters { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.dash-filters input, .dash-filters select {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
}
.dash-filters input { flex: 1; min-width: 220px; }

.empty-state { text-align: center; color: var(--text-dim); padding: 60px 0; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,12,16,0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  width: 100%; max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  position: relative;
}
.modal-close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.modal-close-x:hover { border-color: var(--red); color: var(--red); }
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
.modal::-webkit-scrollbar-thumb:hover { background: var(--steel); }
.modal h3 { margin-bottom: 4px; }
.modal-sub { color: var(--text-dim); font-size: 13px; margin: 4px 0 0; }
.modal-divider { border: none; border-top: 1px solid var(--line); margin: 8px 0 0; }
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.modal-actions button { border: 0; cursor: pointer; }
.modal-actions .btn-ghost { border: 1px solid var(--line); background: none; }

.role-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  background: var(--steel-dim);
  color: #fff;
  padding: 3px 8px;
  border-radius: 100px;
  margin-left: 4px;
}

/* ---------- Toast bildirimleri (gerçek zamanlı) ---------- */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--amber);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Stats bar (tüm paneller ortak) ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--bg-elevated);
  padding: 18px 20px;
}
.stat-box .stat-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}
.stat-box .stat-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ---------- Park Yeri / Antrepo Haritası (tüm paneller ortak) ---------- */
.modal-wide { max-width: 640px; }

#spot-grid-wrap, #depot-map-grid-wrap { max-height: 320px; overflow-y: auto; margin: 12px 0; }
.spot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
}
.spot-cell {
  aspect-ratio: 1;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: border-color .12s, transform .1s;
  position: relative;
}
.spot-cell:hover { transform: translateY(-1px); }
.spot-cell.available { border-color: rgba(76,183,131,0.4); background: rgba(76,183,131,0.06); }
.spot-cell.available:hover { border-color: var(--green); }
.spot-cell.occupied { border-color: rgba(226,87,76,0.4); background: rgba(226,87,76,0.08); cursor: default; }
.spot-cell.selected { border-color: var(--amber); background: rgba(245,166,35,0.18); box-shadow: 0 0 0 2px rgba(245,166,35,0.3); }
.spot-cell .spot-icon { font-size: 10px; margin-top: 2px; }

.spot-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-dim); margin-top: 4px;
}
.spot-legend span { display: flex; align-items: center; gap: 6px; }
.spot-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.spot-swatch.available { background: rgba(76,183,131,0.5); }
.spot-swatch.occupied { background: rgba(226,87,76,0.5); }
.spot-swatch.selected { background: var(--amber); }

.spot-info-panel {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.spot-info-panel .si-title { font-family: var(--mono); font-weight: 700; color: var(--amber); margin-bottom: 6px; }
.spot-info-panel .si-row { color: var(--text-dim); margin: 2px 0; }
.spot-info-panel .si-row strong { color: var(--text); }

.depot-row-clickable { cursor: pointer; }
.depot-row-clickable:hover { background: var(--bg-elevated-2); }

/* ---------- Sekmeler (tüm paneller ortak) ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.tab-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 14px; font-weight: 600;
  padding: 12px 18px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--amber); border-bottom-color: var(--amber); }

/* ---------- Veri listesi / satırları (tüm paneller ortak) ---------- */
.data-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.data-row {
  background: var(--bg-elevated);
  display: grid;
  grid-template-columns: 1fr 1fr 100px auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  font-size: 14px;
}
.data-row .d-primary { font-weight: 600; }
.data-row .d-secondary { color: var(--text-dim); font-size: 13px; }
.data-row .d-actions { display: flex; gap: 8px; justify-self: end; flex-wrap: wrap; }
.data-row .d-actions button {
  background: none; border: 1px solid var(--line); color: var(--text-dim);
  border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.data-row .d-actions button:hover { border-color: var(--steel); color: var(--text); }

.badge { font-size: 11px; padding: 4px 10px; border-radius: 100px; font-family: var(--mono); justify-self: start; }
.badge.ok { background: rgba(76,183,131,0.14); color: var(--green); }
.badge.off { background: rgba(226,87,76,0.14); color: var(--red); }
.badge.role { background: rgba(91,141,184,0.14); color: var(--steel); }
.self-tag { color: var(--text-faint); font-size: 11px; font-weight: 400; }

/* ---------- Aktivite Günlüğü (tüm paneller ortak) ---------- */
.activity-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.activity-row {
  background: var(--bg-elevated);
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  font-size: 13px;
}
.activity-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border-radius: 6px; font-size: 13px;
}
.activity-text { color: var(--text-dim); }
.activity-text strong { color: var(--text); }
.activity-desc { color: var(--amber); font-family: var(--mono); font-size: 12px; margin-left: 6px; }
.activity-time { color: var(--text-faint); font-size: 11.5px; font-family: var(--mono); white-space: nowrap; }

/* ---------- Rapor kartları (tüm paneller ortak) ---------- */
.report-grid, .platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.report-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  min-height: 220px;
}
.report-card canvas { max-height: 220px; }
.top-customer-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.top-customer-row:last-child { border-bottom: none; }
.top-customer-row .tc-count { color: var(--amber); font-family: var(--mono); }

@media (max-width: 800px) {
  .report-grid, .platform-grid { grid-template-columns: 1fr; }
}
