/* styles/clientHome.css - Estilos Premium para la pantalla de Inicio del Cliente */

.client-home-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn var(--transition-fast);
}

/* =========================================
   TOP WIDGETS (Membresía & Racha)
   ========================================= */
.home-widgets-row {
    display: flex;
    gap: 15px;
}

.home-widget {
    flex: 1;
    background: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.widget-title {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Energy Core (Racha) */
.energy-core-container {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.energy-core-ring {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    border: 4px solid rgba(0, 229, 255, 0.1);
    border-top-color: var(--color-primary);
    animation: spin 3s linear infinite;
}

/* Si la racha está "en llamas" (glow effect) */
.energy-core-container.on-fire .energy-core-ring {
    border-top-color: #f59e0b;
    border-right-color: #ef4444;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
    animation: spin-fire 2s linear infinite;
}

.energy-core-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-main);
    z-index: 2;
}

.energy-core-label {
    font-size: 0.75rem;
    margin-top: 8px;
    color: var(--color-primary);
    font-weight: 600;
}
.on-fire ~ .energy-core-label {
    color: #f59e0b;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spin-fire { 100% { transform: rotate(360deg) scale(1.05); } }

/* Estatus Membresía Mini */
.mem-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-bottom: 8px;
    box-shadow: 0 0 8px currentColor;
}
.mem-status-dot.active { background: #10b981; color: #10b981; }
.mem-status-dot.warning { background: #f59e0b; color: #f59e0b; }
.mem-status-dot.inactive { background: #ef4444; color: #ef4444; }

.mem-status-text {
    font-size: 1rem;
    font-weight: 700;
}
.mem-status-sub {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* =========================================
   RUTINA DE HOY (Main Card)
   ========================================= */
.today-routine-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Efecto de fondo sutil */
.today-routine-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,229,255,0.05) 0%, transparent 60%);
    z-index: 0;
}

.routine-header, .routine-details, .routine-action {
    position: relative;
    z-index: 1;
}

.routine-header h3 {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.routine-meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.routine-meta span { display: flex; align-items: center; gap: 5px; }

.btn-start-routine {
    width: 100%;
    padding: 16px;
    background: var(--color-primary);
    color: var(--color-bg-dark);
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
    transition: var(--transition-fast);
}

.btn-start-routine:hover {
    transform: translateY(-2px);
    background: var(--color-primary-hover);
}

.btn-start-routine.disabled {
    background: rgba(255,255,255,0.1);
    color: var(--color-text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

/* =========================================
   PROGRESO GENERAL
   ========================================= */
.progress-summary-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-summary-card h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    width: 0%; /* dinámico */
    transition: width 1s ease-out;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: flex;
    justify-content: space-between;
}

/* =========================================
   BOTTOM SHEET (QR Check-in Modal)
   ========================================= */
.bottom-sheet-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    display: flex;
    align-items: flex-end; /* Alinear abajo */
}

.bottom-sheet-overlay.show {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet-content {
    background: var(--color-bg-dark);
    width: 100%;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 30px 20px 40px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.bottom-sheet-overlay.show .bottom-sheet-content {
    transform: translateY(0);
}

.bs-drag-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: -15px auto 20px;
}

.qr-display-area {
    text-align: center;
    margin-bottom: 25px;
}

.qr-box {
    width: 200px;
    height: 200px;
    background: white;
    margin: 0 auto 15px;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

/* QR FAB (Floating Action Button) */
.btn-fab-qr {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-bg-dark);
    border: none;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s;
}
.btn-fab-qr:active {
    transform: scale(0.95);
}
