/* ═══════════════════════════════════════════
   DEMO ADMIN PANEL — scoped under #demoAdminDash
═══════════════════════════════════════════ */

#demoAdminDash {
  background: #f8fafc;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #0f172a;
  min-height: 540px;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Inner tab bar ── */
#demoAdminDash .da-tabs {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 0 20px;
  gap: 2px;
  flex-shrink: 0;
}
#demoAdminDash .da-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 13px 16px; border: none; background: transparent;
  font-size: 13px; font-weight: 500; color: #64748b;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: color 0.18s, border-color 0.18s;
  font-family: inherit; white-space: nowrap;
}
#demoAdminDash .da-tab svg { width: 15px; height: 15px; }
#demoAdminDash .da-tab:hover { color: #0f172a; }
#demoAdminDash .da-tab.active {
  color: #2563eb; border-bottom-color: #2563eb; font-weight: 600;
}

/* ── Tab panels ── */
#demoAdminDash .da-panel {
  display: none; padding: 20px 24px; overflow-y: auto; flex: 1;
}
#demoAdminDash .da-panel.active { display: block; }

/* ── KPI row ── */
#demoAdminDash .da-kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 18px;
}
#demoAdminDash .da-kpi {
  background: #ffffff; border: 1px solid #e2e8f0;
  border-radius: 14px; padding: 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow 0.18s, transform 0.18s;
}
#demoAdminDash .da-kpi:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
#demoAdminDash .da-kpi-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
#demoAdminDash .da-kpi-icon svg { width: 18px; height: 18px; }
#demoAdminDash .da-kpi-icon.blue   { background: #eff6ff; color: #2563eb; }
#demoAdminDash .da-kpi-icon.green  { background: #dcfce7; color: #16a34a; }
#demoAdminDash .da-kpi-icon.orange { background: #fef9c3; color: #ca8a04; }
#demoAdminDash .da-kpi-icon.purple { background: #ede9fe; color: #7c3aed; }
#demoAdminDash .da-kpi-lbl {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8;
}
#demoAdminDash .da-kpi-val {
  font-size: 24px; font-weight: 800; color: #0f172a; line-height: 1.1; margin-top: 3px;
}
#demoAdminDash .da-kpi-trend { font-size: 11px; font-weight: 600; margin-top: 2px; color: #16a34a; }
#demoAdminDash .da-kpi-trend.down { color: #dc2626; }

/* ── Card ── */
#demoAdminDash .da-card {
  background: #ffffff; border: 1px solid #e2e8f0;
  border-radius: 14px; margin-bottom: 14px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
#demoAdminDash .da-card-header {
  padding: 12px 18px; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; justify-content: space-between;
  background: #fafbfc;
}
#demoAdminDash .da-card-title {
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: #374151;
}
#demoAdminDash .da-card-meta { font-size: 11px; color: #94a3b8; }
#demoAdminDash .da-card-body { padding: 16px 18px; }

/* ── Service labels ── */
#demoAdminDash .da-service-lbl {
  font-size: 11px; font-weight: 700; color: #374151;
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em;
}
#demoAdminDash .da-service-group { margin-bottom: 16px; }
#demoAdminDash .da-service-group:last-child { margin-bottom: 0; }

/* ── Slot cards ── */
#demoAdminDash .da-slots { display: flex; flex-wrap: wrap; gap: 6px; }
#demoAdminDash .da-slot {
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: 8px 12px; min-width: 72px; text-align: center;
  cursor: pointer; transition: all 0.15s;
  background: #fff; user-select: none;
}
#demoAdminDash .da-slot:hover { border-color: #2563eb; background: #eff6ff; }
#demoAdminDash .da-slot.selected {
  background: #2563eb; border-color: #2563eb; color: white;
  box-shadow: 0 3px 12px rgba(37,99,235,0.28);
}
#demoAdminDash .da-slot-time { font-size: 13px; font-weight: 600; }
#demoAdminDash .da-slot-count { font-size: 11px; margin-top: 2px; color: #94a3b8; }
#demoAdminDash .da-slot.selected .da-slot-count { color: rgba(255,255,255,0.7); }

/* ── Weekly grid ── */
#demoAdminDash .da-week-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
#demoAdminDash .da-day-card {
  border: 1.5px solid #e2e8f0; border-radius: 11px;
  padding: 12px 14px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
#demoAdminDash .da-day-card:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
#demoAdminDash .da-day-card.today { background: #eff6ff; border-color: #2563eb; }
#demoAdminDash .da-day-lbl { font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 6px; }
#demoAdminDash .da-day-card.today .da-day-lbl { color: #2563eb; }
#demoAdminDash .da-day-val { font-size: 26px; font-weight: 800; color: #0f172a; line-height: 1; }
#demoAdminDash .da-day-card.today .da-day-val { color: #2563eb; }
#demoAdminDash .da-day-unit {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #cbd5e1; margin-top: 3px;
}
#demoAdminDash .da-day-card.today .da-day-unit { color: rgba(37,99,235,0.45); }

/* ── Reservations table ── */
#demoAdminDash .da-filter-bar {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
#demoAdminDash .da-input, #demoAdminDash .da-select {
  padding: 8px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 8px; font-size: 12.5px;
  background: #fff; color: #0f172a; outline: none; font-family: inherit;
  transition: border-color 0.15s;
}
#demoAdminDash .da-input { min-width: 200px; }
#demoAdminDash .da-input:focus, #demoAdminDash .da-select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

#demoAdminDash .da-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid #e2e8f0; }
#demoAdminDash .da-table { width: 100%; border-collapse: collapse; min-width: 500px; }
#demoAdminDash .da-table th {
  text-align: left; padding: 10px 14px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #94a3b8; background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
}
#demoAdminDash .da-table td {
  padding: 11px 14px; border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px; vertical-align: middle; color: #0f172a;
}
#demoAdminDash .da-table tr:last-child td { border-bottom: none; }
#demoAdminDash .da-table tbody tr:hover td { background: #f8fafc; }
#demoAdminDash .da-name { font-weight: 600; }
#demoAdminDash .da-phone { font-size: 11px; color: #94a3b8; margin-top: 1px; }

#demoAdminDash .da-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700;
}
#demoAdminDash .da-badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
#demoAdminDash .da-badge.confirmed { background: #dcfce7; color: #166534; }
#demoAdminDash .da-badge.pending   { background: #fef9c3; color: #854d0e; }
#demoAdminDash .da-badge.seated    { background: #eff6ff; color: #1d4ed8; }
#demoAdminDash .da-badge.cancelled { background: #fee2e2; color: #991b1b; }

/* ── Analytics KPIs ── */
#demoAdminDash .da-analytics-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 16px;
}
#demoAdminDash .da-akpi {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
#demoAdminDash .da-akpi-val { font-size: 24px; font-weight: 800; color: #0f172a; }
#demoAdminDash .da-akpi-lbl { font-size: 11px; color: #64748b; margin-top: 3px; }
#demoAdminDash .da-akpi-trend { font-size: 11px; font-weight: 600; color: #16a34a; margin-top: 4px; }

#demoAdminDash .da-analytics-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; }

/* bar chart */
#demoAdminDash .da-bar-chart {
  display: flex; align-items: flex-end; gap: 5px; height: 140px; padding-bottom: 2px;
}
#demoAdminDash .da-bar-group {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; height: 100%; justify-content: flex-end; gap: 2px;
}
#demoAdminDash .da-bar {
  width: 100%; border-radius: 4px 4px 0 0; min-height: 2px;
  transition: opacity 0.2s; cursor: pointer;
}
#demoAdminDash .da-bar:hover { opacity: 0.72; }
#demoAdminDash .da-bar.midi { background: #f59e0b; }
#demoAdminDash .da-bar.soir { background: #2563eb; }
#demoAdminDash .da-bar-lbl { font-size: 10px; color: #94a3b8; white-space: nowrap; margin-top: 5px; }
#demoAdminDash .da-chart-legend { display: flex; gap: 14px; margin-top: 10px; }
#demoAdminDash .da-legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: #64748b;
}
#demoAdminDash .da-legend-dot { width: 8px; height: 8px; border-radius: 50%; }
#demoAdminDash .da-legend-dot.midi { background: #f59e0b; }
#demoAdminDash .da-legend-dot.soir { background: #2563eb; }

/* top list */
#demoAdminDash .da-top-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid #f1f5f9;
}
#demoAdminDash .da-top-item:last-child { border-bottom: none; }
#demoAdminDash .da-top-rank {
  width: 22px; height: 22px; border-radius: 50%;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #64748b; flex-shrink: 0;
}
#demoAdminDash .da-top-rank.gold { background: #fef9c3; color: #854d0e; }
#demoAdminDash .da-top-info { flex: 1; }
#demoAdminDash .da-top-name { font-size: 12.5px; font-weight: 600; color: #0f172a; }
#demoAdminDash .da-top-sub  { font-size: 10.5px; color: #94a3b8; margin-top: 1px; }
#demoAdminDash .da-top-bar  { flex: 1; }
#demoAdminDash .da-top-bg   { height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
#demoAdminDash .da-top-fill { height: 100%; border-radius: 3px; background: #2563eb; }
#demoAdminDash .da-top-val  { font-size: 12.5px; font-weight: 700; color: #0f172a; width: 32px; text-align: right; }

/* heatmap */
#demoAdminDash .da-heatmap-wrap { margin-top: 10px; }
#demoAdminDash .da-heatmap-hours {
  display: flex; padding-left: 54px; gap: 3px; margin-bottom: 4px;
}
#demoAdminDash .da-hm-hour { flex: 1; text-align: center; font-size: 9px; color: #cbd5e1; }
#demoAdminDash .da-heatmap-rows { display: flex; flex-direction: column; gap: 3px; }
#demoAdminDash .da-hm-row { display: flex; align-items: center; gap: 3px; }
#demoAdminDash .da-hm-row-lbl { width: 50px; font-size: 10px; color: #94a3b8; flex-shrink: 0; }
#demoAdminDash .da-hm-cell {
  flex: 1; height: 26px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
}
#demoAdminDash .hm-0 { background: #f8fafc; }
#demoAdminDash .hm-1 { background: #dbeafe; color: #1d4ed8; }
#demoAdminDash .hm-2 { background: #93c5fd; color: #1e3a8a; }
#demoAdminDash .hm-3 { background: #3b82f6; color: white; }
#demoAdminDash .hm-4 { background: #1d4ed8; color: white; }

/* responsive */
@media (max-width: 900px) {
  #demoAdminDash .da-kpi-row { grid-template-columns: repeat(2, 1fr); }
  #demoAdminDash .da-week-grid { grid-template-columns: repeat(3, 1fr); }
  #demoAdminDash .da-analytics-grid { grid-template-columns: 1fr; }
  #demoAdminDash .da-analytics-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  #demoAdminDash .da-kpi-row { grid-template-columns: 1fr 1fr; }
  #demoAdminDash .da-week-grid { grid-template-columns: repeat(2, 1fr); }
  #demoAdminDash .da-panel { padding: 14px; }
}
