/* ===============================
   DASHBOARD · BASE LIMPIA
================================ */

.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 24px;
}

/* ===============================
   TARJETAS BASE
================================ */

.tesla-card {
  background: linear-gradient(135deg, #0b1220, #020617);
  border-radius: 18px;
  padding: 24px;
  color: #e5e7eb;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}

/* ===============================
   TÍTULOS
================================ */

.tesla-card h2,
.tesla-card h3 {
  color: #22c55e;
  margin-bottom: 12px;
}

.tesla-card p {
  color: #e2e8f0;
  line-height: 1.5;
}

/* ===============================
   ESTADO SISTEMA
================================ */

.estado-detenido {
  border-left: 6px solid #ef4444;
}

.estado-activo {
  border-left: 6px solid #22c55e;
}

.estado-detenido .estado-label {
  color: #ef4444;
  font-weight: 600;
}

.estado-activo .estado-label {
  color: #22c55e;
  font-weight: 600;
}

/* ===============================
   LISTAS DE BLOQUEO
================================ */

.lista-bloqueos {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.bloqueo-item {
  background: rgba(255,255,255,0.04);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #cbd5f5;
}

/* ===============================
   BOTONES
================================ */

.btn-principal {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.btn-secundario {
  background: rgba(255,255,255,0.08);
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.btn-principal:hover,
.btn-secundario:hover {
  transform: translateY(-1px);
}

/* ===============================
   PROGRESO
================================ */

.progreso-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.progreso-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
}

/* ===============================
   UTILIDADES
================================ */

.text-muted {
  color: #cbd5f5;
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #22c55e;
}

/* ======================================================
   TESLA CARD · BASE ÚNICA DEL DASHBOARD
====================================================== */

.tesla-card {
  background: linear-gradient(135deg, #0b1220, #020617);
  border-radius: 18px;
  padding: 24px;
  color: #e5e7eb;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  margin-bottom: 32px;
  position: relative;
}

/* ===============================
   ESTADOS DEL SISTEMA
================================ */

.tesla-card.estado-detenido {
  border-left: 6px solid #ef4444;
}

.tesla-card.estado-espera {
  border-left: 6px solid #f59e0b;
}

.tesla-card.estado-activo {
  border-left: 6px solid #22c55e;
}


/* ===============================
   TIPOGRAFÍA
================================ */

.tesla-card h2,
.tesla-card h3 {
  color: #22c55e;
  margin-bottom: 12px;
  font-weight: 600;
}

.tesla-card p {
  color: #e2e8f0;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ===============================
   LISTAS DE INFORMACIÓN
================================ */

.lista-info {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.lista-info .item {
  background: rgba(255,255,255,0.05);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #cbd5f5;
}

/* ===============================
   BOTONES
================================ */

.btn-principal {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-secundario {
  background: rgba(255,255,255,0.08);
  color: #e5e7eb;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
}

.btn-principal:hover,
.btn-secundario:hover {
  opacity: 0.9;
}

.familia-toroidal {
  margin: 24px 0;
}

.familia-titulo {
  color: #22c55e;
  margin-bottom: 16px;
  font-weight: 600;
}

.familia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.familia-item {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
}

.familia-item strong {
  display: block;
  font-size: 14px;
}

.familia-item span {
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin: 6px 0;
}

.familia-item small {
  font-size: 12px;
  opacity: 0.7;
}

.familia-item.activo {
  border-color: #22c55e;
  color: #22c55e;
}

.familia-item.pendiente {
  border-color: #f59e0b;
  color: #f59e0b;
}

.familia-nota {
  margin-top: 12px;
  font-size: 13px;
  color: #94a3b8;
}

.toroide-wrapper {
  margin-top: 32px;
  min-height: 600px;
}


/* =========================================
   ACADEMIA · NETFLIX STYLE
========================================= */

.academia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.curso-card {
  background: linear-gradient(135deg, #020617, #0b1220);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,0.08);
}

.curso-header h3 {
  color: #22c55e;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.curso-body {
  flex: 1;
}

.badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-ok {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

.badge-progreso {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}

.curso-footer {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ==============================
   FIX TEXTO ACADEMIA · VISIBILIDAD
   ============================== */

.academia-grid,
.academia-grid * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
}

.tesla-card {
    position: relative;
    background: radial-gradient(circle at top, #0b1c2d, #020814);
    color: #ffffff;
}

.curso-card h3,
.curso-card h4,
.curso-card p,
.curso-card a {
    color: #ffffff !important;
}


/* ===============================
   TABLAS · HISTÓRICO DONACIONES
=============================== */
.tesla-table,
.tesla-table th,
.tesla-table td {
  color: #e5e7eb !important; /* texto claro */
}

.tesla-table th {
  color: #93c5fd !important; /* encabezados */
  font-weight: 600;
}

.tesla-table tr {
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.tesla-table a {
  color: #22c55e;
  font-weight: 600;
}
/* =====================================================
   TABLAS · HISTÓRICO DONACIONES
===================================================== */

.tesla-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.tesla-table th,
.tesla-table td {
  padding: 14px 12px;
  text-align: left;
  color: #e5e7eb;
}

.tesla-table th {
  color: #93c5fd;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.tesla-table tr {
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .2s ease;
}

.tesla-table tr:hover {
  background: rgba(255,255,255,.03);
}

.tesla-table a {
  color: #22c55e;
  font-weight: 600;
  text-decoration: none;
}

.tesla-table a:hover {
  text-decoration: underline;
}


/* =====================================================
   TESLA 7 · BOTONES ACCESO ACADEMIA / MARKETPLACE
===================================================== */

.item-acceso {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(145deg, #020617, #0f172a);
  padding: 20px 24px;
  border-radius: 20px;
  margin-bottom: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
  border: 1px solid rgba(34,197,94,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}

.item-acceso:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 65px rgba(0,0,0,.75);
}

.item-label {
  font-size: 15px;
  color: #e5e7eb;
}

.btn-tesla-acceso {
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #020617;
  font-weight: 800;
  text-decoration: none;
  font-size: 13px;
  box-shadow: 0 0 25px rgba(34,197,94,.6);
  transition: all .25s ease;
  white-space: nowrap;
}

.btn-tesla-acceso:hover {
  box-shadow: 0 0 45px rgba(34,197,94,.9);
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* =====================================================
   🎯 CONTENEDOR GENERAL
===================================================== */

.dashboard {
    padding: 20px;
}

/* =====================================================
   🔝 KPI SUPERIOR
===================================================== */

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

/* =====================================================
   📊 KPI GRID INFERIOR
===================================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

/* =====================================================
   🧱 TARJETAS BASE
===================================================== */

.kpi-card {
    background: linear-gradient(145deg, #1f2333, #161925);
    border-radius: 16px;
    padding: 18px 20px;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.03);
}

/* Hover elegante */
.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

/* =====================================================
   🔝 KPI SUPERIOR (centrado)
===================================================== */

.dashboard-kpis .kpi-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 95px;
}

.dashboard-kpis .kpi-label {
    font-size: 13px;
    opacity: 0.65;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.dashboard-kpis .kpi-value {
    font-size: 24px;
    font-weight: 600;
}

/* =====================================================
   📊 KPI REGISTRADOS (horizontal con icono)
===================================================== */

.kpi-grid .kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 85px;
}

.kpi-icon {
    font-size: 28px;
}

.kpi-grid .kpi-label {
    font-size: 13px;
    opacity: 0.7;
}

.kpi-grid .kpi-value {
    font-size: 21px;
    font-weight: 600;
}

/* =====================================================
   🎨 COLORES ESTADO
===================================================== */

.text-success,
.kpi-ok {
    color: #00e676;
}

.text-warning,
.kpi-wait {
    color: #ffb300;
}

.text-danger {
    color: #ff5252;
}

/* =====================================================
   📱 RESPONSIVE
===================================================== */

@media (max-width: 1100px) {
    .dashboard-kpis,
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-kpis,
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   ⚛️ TOOLTIP MAPA TOROIDAL (ESTILO TESLA)
===================================================== */

.nodo-tooltip {
    position: absolute;
    z-index: 2000;
    min-width: 220px;
    background: rgba(11, 28, 45, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--accent);
    border-radius: 14px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 255, 208, 0.3);
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
}

.nodo-tooltip.hidden {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-mini {
    font-size: 1.4rem;
    background: rgba(0, 255, 208, 0.15);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 208, 0.3);
}

.tooltip-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tooltip-info p {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
    font-family: inherit;
}

.tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--accent);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* === SISTEMA DE DISENO TESLA === */

/* ============================================================
   SISTEMA DE DISEÑO TESLA ⚛️ - ECONOMÍA CUÁNTICA
   ============================================================ */

:root {
    --bg-deep: #020617;
    --bg-card: rgba(15, 23, 42, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
    --accent: #00ffd0; /* Cian Neón */
    --accent-glow: rgba(0, 255, 208, 0.3);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

body {
    background-color: var(--bg-deep);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 255, 208, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 41, 59, 0.1) 0px, transparent 50%);
    color: var(--text-primary);
    margin: 0;
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* CONTENEDOR TESLA */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* TARJETAS GLASSMORPHISM */
.panel-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.panel-card:hover {
    border-color: rgba(0, 255, 208, 0.3);
}

.panel-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* TÍTULOS */
.panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.025em;
}

/* GRID DINÁMICO */
.grid-tesla {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ESTADÍSTICAS TESLA */
.stat-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* BOTONES TESLA */
.btn-tesla {
    background: linear-gradient(135deg, #00ffd0 0%, #0081ff 100%);
    color: #020617;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-tesla:hover {
    box-shadow: 0 0 20px rgba(0, 255, 208, 0.4);
    transform: scale(1.02);
}

/* TICKERS Y ALERTAS */
.ticker-card {
    background: linear-gradient(90deg, rgba(0, 255, 208, 0.1) 0%, transparent 100%);
    border-left: 4px solid var(--accent);
    padding: 1.25rem 2rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Redundancia eliminada - Estilos movidos al componente */

/* RESPONSIVE */
@media (max-width: 768px) {
    .dashboard-container { padding: 1rem; gap: 1.5rem; }
    .stat-num { font-size: 1.5rem; }
    .toroidal-map { height: 400px; transform: scale(0.7); }
}



/* === SISTEMA DE DISENO TESLA ⚛️ === */

/* ============================================================
   SISTEMA DE DISEÑO TESLA ⚛️ - ECONOMÍA CUÁNTICA
   ============================================================ */

:root {
    --bg-deep: #020617;
    --bg-card: rgba(15, 23, 42, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
    --accent: #00ffd0; /* Cian Neón */
    --accent-glow: rgba(0, 255, 208, 0.3);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

body {
    background-color: var(--bg-deep);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 255, 208, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 41, 59, 0.1) 0px, transparent 50%);
    color: var(--text-primary);
    margin: 0;
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* CONTENEDOR TESLA */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* TARJETAS GLASSMORPHISM */
.panel-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.panel-card:hover {
    border-color: rgba(0, 255, 208, 0.3);
}

.panel-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* TÍTULOS */
.panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.025em;
}

/* GRID DINÁMICO */
.grid-tesla {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ESTADÍSTICAS TESLA */
.stat-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* BOTONES TESLA */
.btn-tesla {
    background: linear-gradient(135deg, #00ffd0 0%, #0081ff 100%);
    color: #020617;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-tesla:hover {
    box-shadow: 0 0 20px rgba(0, 255, 208, 0.4);
    transform: scale(1.02);
}

/* TICKERS Y ALERTAS */
.ticker-card {
    background: linear-gradient(90deg, rgba(0, 255, 208, 0.1) 0%, transparent 100%);
    border-left: 4px solid var(--accent);
    padding: 1.25rem 2rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Los estilos del Mapa Toroidal han sido movidos al componente mapa_toroidal.php para modularidad */

/* =====================================================
   📱 RESPONSIVE FRACTAL — TESLA UIX REINFORCEMENT
===================================================== */

@media (max-width: 1200px) {
    .dashboard-container { padding: 1.5rem; }
    .grid-tesla { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

@media (max-width: 900px) {
    .dashboard-container { gap: 1.5rem; }
    .stat-num { font-size: 1.6rem; }
    .panel-card { padding: 1.5rem; }
    
    /* Forzar el apilamiento en grids de 4 columnas */
    .dashboard-kpis, .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .dashboard-container { padding: 1rem; }
    .panel-title { font-size: 1.1rem; }
    
    /* Apilamiento total */
    .dashboard-kpis, .kpi-grid, .grid-tesla {
        grid-template-columns: 1fr !important;
    }
    
    .panel-card { padding: 1.25rem; border-radius: 18px; }
    
    /* Tablas Responsivas */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1.25rem;
        padding: 0 1.25rem;
    }
    
    .tesla-table {
        min-width: 500px;
    }
    
    .tesla-table th, .tesla-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }

    /* ADN TOROIDAL FLUIDO */
    .adn-visualizer {
        transform: scale(0.6);
        margin: -80px 0;
    }

    /* BARRA DE PROGRESO MÓVIL */
    .progreso-info {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    /* TICKER MÓVIL */
    .ticker-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .ticker-card .btn-tesla {
        width: 100%;
        justify-content: center;
    }
}

/* FIX: Asegurar que el contenido no desborde en pantallas ultra pequeñas */
@media (max-width: 350px) {
    .stat-num { font-size: 1.3rem; }
    .panel-card { padding: 1rem; }
}

/* ANIMACIONES DE ENTRADA */
.panel-card {
    animation: slideUp 0.5s ease-out forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
