/* ================================================================
   DASHBOARD.CSS - Tu Entrenador 360
   Sistema modular de estilos para el dashboard
   ================================================================ */

/* ===== BASE Y LAYOUT ===== */
body {
    background: #f5f6fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.text-muted {
    color: #999 !important;
}

/* ===== NAVBAR ===== */
.navbar-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
    color: white !important;
    font-weight: 500;
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: white;
    border-radius: 15px;
    padding: 25px 30px;
    margin: 30px 0 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-header h1 {
    color: #667eea;
    margin: 0 0 5px 0;
    font-size: 28px;
}

.fecha-actual {
    color: #999;
    font-size: 15px;
}

/* ===== RESUMEN DUAL (HOY / SEMANA) ===== */
.resumen-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .resumen-dual {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.resumen-col h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.fecha-actual {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

/* Stats de hoy */
.stats-hoy,
.stats-semana {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.stat-item-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.stat-item-inline i {
    color: #667eea;
    width: 20px;
}

.stat-item-inline span {
    color: #666;
}

.stat-item-inline strong {
    color: #333;
    font-weight: 600;
}

.stat-item-inline strong.completado {
    color: #4caf50;
}

.stat-item-inline strong.pendiente {
    color: #ff9800;
}

/* Stats de semana */
.stat-item-semana {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-info-semana {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-info-semana i {
    color: #667eea;
}

.stat-info-semana span {
    font-size: 13px;
    color: #666;
    flex: 1;
}

.stat-info-semana strong {
    color: #333;
    font-weight: 600;
}

.progreso-bar-mini {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progreso-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s;
}

/* ===== NAVEGADOR DE FECHAS ===== */
.navegador-fechas {
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-nav-fecha {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: white;
    color: #667eea;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-nav-fecha:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.fecha-selector-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.input-fecha-nav {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.input-fecha-nav:focus {
    outline: none;
    border-color: #667eea;
    background: #f8f9ff;
}

.input-fecha-nav:hover {
    border-color: #667eea;
}

.fecha-info-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #666;
    font-weight: 500;
}

.dia-semana-actual {
    color: #333;
    font-weight: 600;
}

.badge-hoy {
    background: #4caf50;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-historico {
    background: #ff9800;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.btn-volver-hoy {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-volver-hoy:hover {
    background: #5568d3;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .navegador-fechas {
        gap: 10px;
    }
    
    .fecha-selector-wrapper {
        width: 100%;
        justify-content: center;
    }
    
    .btn-volver-hoy {
        width: 100%;
        justify-content: center;
    }
}

/* ===== TABS MÓVIL ===== */
.tabs-mobile {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

@media (max-width: 991px) {
    .tabs-mobile {
        display: flex;
        gap: 8px;
    }
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #f8f9fa;
    color: #666;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-btn i {
    margin-right: 6px;
}

/* ===== GRID DE BLOQUES ===== */
.bloques-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
	margin-bottom:20px;
}

@media (max-width: 991px) {
    .bloques-grid {
        grid-template-columns: 1fr;
    }
    
    .bloque-panel.entrenamiento {
        display: none;
    }
    
    .bloque-panel.alimentacion.hidden-mobile {
        display: none;
    }
}

/* ===== BLOQUE PANEL ===== */
.bloque-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.bloque-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bloque-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.bloque-header i {
    margin-right: 8px;
}

.btn-ver-plan {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-ver-plan:hover {
    background: white;
    color: #667eea;
    text-decoration: none;
}

.bloque-content {
    padding: 20px;
}

/* ===== PROGRESO NUTRICIONAL ===== */
.progreso-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

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

.progreso-item {
    text-align: center;
}

.progreso-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
}

.progreso-valores {
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
}

.progress {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
}

/* ===== COMIDA CARD ===== */
.comida-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.comida-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.comida-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comida-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.comida-info h4 {
    margin: 0;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.comida-calorias {
    font-size: 11px;
    color: #666;
}

.badge-estado {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.badge-completada {
    background: #4caf50;
    color: white;
}

.badge-pendiente {
    background: #ff9800;
    color: white;
}

.badge-sin-menus {
    background: #f44336;
    color: white;
}

/* ===== CONTENIDO COMIDA ===== */
.comida-content {
    padding: 15px;
}

/* ===== OPCIONES DE MENÚ ===== */
.menu-opciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-opcion {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.menu-opcion:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.menu-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
}

.menu-opcion:hover .menu-radio {
    border-color: #667eea;
}

.menu-detalle {
    flex: 1;
}

.menu-nombre {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    margin-bottom: 3px;
}

.menu-alimentos {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* ===== MENÚ SELECCIONADO ===== */
.menu-seleccionado {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 12px;
}

.menu-seleccionado-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.check-icon {
    color: #4caf50;
    font-size: 18px;
    margin-right: 8px;
}

.menu-seleccionado-nombre {
    font-weight: 600;
    color: #2e7d32;
    font-size: 14px;
    flex: 1;
}

.btn-cambiar {
    background: white;
    border: 1px solid #4caf50;
    color: #4caf50;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-cambiar:hover {
    background: #4caf50;
    color: white;
}

.menu-seleccionado-alimentos {
    font-size: 12px;
    color: #2e7d32;
    margin-left: 26px;
}

/* ===== SIN MENÚS ===== */
.sin-menus {
    text-align: center;
    padding: 25px 15px;
    color: #999;
}

.sin-menus i {
    font-size: 36px;
    color: #ddd;
    margin-bottom: 8px;
}

.btn-crear-menus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    font-size: 13px;
    margin-top: 8px;
}

/* ===== ENTRENAMIENTO ===== */
.entrenamiento-activo {
    padding: 10px 0;
}

.rutina-header-dash {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.rutina-header-dash h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.rutina-meta {
    font-size: 13px;
    color: #999;
    margin: 5px 0 0 0;
}

/* ===== EJERCICIOS ===== */
.ejercicios-dash {
    margin-bottom: 20px;
}

.ejercicio-dash {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.ejercicio-dash.cardio {
    background: #fff3e0;
    border-color: #ff9800;
}

.ejercicio-dash-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.ejercicio-dash-header:hover {
    background: rgba(0,0,0,0.02);
}

.ejercicio-dash-titulo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ejercicio-dash-titulo i {
    color: #667eea;
}

.ejercicio-dash.cardio .ejercicio-dash-titulo i {
    color: #ff9800;
}

.ejercicio-meta {
    font-size: 12px;
    color: #999;
}

.toggle-icon {
    color: #999;
    transition: transform 0.3s;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.ejercicio-dash-series {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}

/* ===== SERIES - ESTADOS ===== */
.serie-row {
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.serie-row.guardada {
    background: #f1f8f4;
    border-color: #4caf50;
}

/* Vista Edición */
.serie-edicion-view {
    display: flex;
    align-items: center;
    gap: 10px;
}

.serie-label {
    min-width: 70px;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.serie-peso-input {
    width: 90px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

.serie-peso-input:focus {
    border-color: #667eea;
    outline: none;
}

.serie-notas-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
}

.serie-notas-input:focus {
    border-color: #667eea;
    outline: none;
}

.btn-guardar-serie {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-guardar-serie:hover {
    background: #5568d3;
    transform: scale(1.05);
}

/* Vista Guardada */
.serie-guardada-view {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.serie-info-completa {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.serie-label-guardado {
    min-width: 70px;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.peso-guardado {
    font-size: 16px;
    color: #333;
}

.peso-guardado strong {
    color: #4caf50;
}

.notas-guardadas {
    font-size: 13px;
    color: #666;
    font-style: italic;
    flex: 1;
}

.texto-guardado {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.serie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-guardado {
    background: #4caf50;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-editar-serie {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-editar-serie:hover {
    background: #5568d3;
    transform: scale(1.1);
}

/* ===== ÚLTIMO PESO INFO ===== */
.ultimo-peso-info {
    background: #e3f2fd;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #1976d2;
    margin-top: 10px;
}

.ultimo-peso-info i {
    margin-right: 5px;
}

/* ===== BOTÓN COMPLETAR DÍA ===== */
.btn-completar-dia {
    width: 100%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-completar-dia:hover {
    transform: scale(1.02);
}

/* ===== BANNER COMPLETADO ===== */
.banner-completado {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
@media (max-width: 500px) {
	.banner-completado {flex-direction: column;}
}

.completado-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.completado-info i {
    font-size: 32px;
}

.completado-info h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.completado-info p {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.btn-desmarcar {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-desmarcar:hover {
    background: white;
    color: #4caf50;
}

/* ===== MODO LECTURA ===== */
.ejercicios-dash.modo-lectura .ejercicio-dash {
    opacity: 0.95;
}

.serie-row.modo-lectura {
    cursor: default;
}

.serie-row.modo-lectura .btn-editar-serie {
    display: none;
}

.entrenamiento-activo.completado {
    opacity: 1;
}

/* ===== ESTADOS VACÍOS ===== */
.dia-descanso {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.dia-descanso i {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
	
	.h1, h1{
		font-size:2rem;
	}
	
    .serie-edicion-view {
        flex-wrap: wrap;
    }
    
    .serie-peso-input {
        width: 70px;
    }
    
    .serie-notas-input {
        width: 100%;
        order: 3;
    }
    
    .btn-guardar-serie {
        order: 4;
        width: 100%;
    }
    
    .serie-guardada-view {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .serie-actions {
        width: 100%;
        justify-content: space-between;
    }
}