/* ═══════════════════════════════
   PANEL HEADER (per-section top bar)
   ═══════════════════════════════ */
.panel-header {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
  /* Full-bleed: counteract the panel's 24px padding */
  margin: 0 -24px;
  margin-bottom: 24px;
}

.panel-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.panel-title .material-icons-outlined,
.panel-title svg {
  font-size: 22px;
  width: 22px;
  height: 22px;
  color: var(--primary);
}

/* ═══════════════════════════════
   PANELS
   ═══════════════════════════════ */
.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-top: 0;
}

#panel-dashboard.active {
  padding-top: 28px;
  max-width: 1400px;
}

/* Content area below header — generous padding */
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ═══════════════════════════════
   STAT CARDS (compartidas: descargas,
   El Panal, Hill King, City Canvas…)
   El Dashboard Overview usa .dsh-kpi
   en css/admin_dashboard.css
   ═══════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 0;
  padding: 0;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-card .stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.stat-card .stat-icon svg,
.stat-card .stat-icon .material-icons-outlined {
  font-size: 22px;
  width: 22px;
  height: 22px;
}

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-card .stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══════════════════════════════
   TABLE
   ═══════════════════════════════ */
.admin-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr {
  transition: background var(--transition);
}

.admin-table tbody tr:hover {
  background: color-mix(in srgb, var(--bg) 50%, transparent);
}

.admin-table td strong {
  color: var(--text);
  font-weight: 600;
}

/* Table thumbnail */
.table-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
}

.table-thumb-placeholder {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* ═══════════════════════════════
   BUTTONS
   ═══════════════════════════════ */

/* Primary action button (e.g. "Nuevo Evento") */
.btn-create {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px var(--primary-shadow);
  transition: all var(--transition);
}

.btn-create:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 8px var(--primary-shadow);
  transform: translateY(-1px);
}

.btn-create:active {
  transform: translateY(0);
}

.btn-create .material-icons-outlined,
.btn-create svg {
  font-size: 18px;
  width: 16px;
  height: 16px;
}

/* Action buttons (edit / delete inline) */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-action .material-icons-outlined,
.btn-action svg {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.btn-edit {
  color: var(--text-muted);
  background: none;
}

.btn-edit:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-delete {
  color: var(--text-muted);
  background: none;
}

.btn-delete:hover {
  color: var(--rose);
  background: var(--rose-soft);
}

