﻿/* ============================================
   PÁGINAS ESPECÍFICAS - Sport Frances
   ============================================ */

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-form-container {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(10px, 3vw, 20px);
    position: relative;
    z-index: 1;
}

.login-container {
    width: min(100%, 440px);
    background: white;
    border-radius: clamp(16px, 4vw, 20px);
    box-shadow: 0 10px 30px rgba(74, 123, 167, 0.25);
    overflow: hidden;
    max-height: 95dvh;
    display: flex;
    flex-direction: column;
}

.login-header {
    background: linear-gradient(135deg, #3a6a97 0%, #4a7ba7 100%);
    padding: clamp(8px, 2vh, 12px) 16px;
    flex-shrink: 0;
}

.login-body {
    padding: clamp(18px, 4vh, 26px) clamp(16px, 4vw, 22px);
    flex: 1;
    overflow-y: auto;
}

.brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2.5vh, 14px);
    margin-bottom: clamp(20px, 4vh, 28px);
    text-align: center;
}

.brand-logo {
    width: clamp(72px, 18vw, 96px);
    height: clamp(72px, 18vw, 96px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4a7ba7 0%, #5b8fb9 100%);
    border-radius: clamp(12px, 3vw, 16px);
    border: 2px solid #5b8fb9;
    padding: clamp(10px, 2.5vw, 14px);
    box-shadow: 0 4px 15px rgba(74, 123, 167, 0.35);
}

    .brand-logo img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        filter: brightness(1.1);
    }

.brand-title {
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #333;
    background: linear-gradient(135deg, #3a6a97, #4a7ba7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.brand-subtitle {
    font-size: clamp(12.5px, 3.2vw, 14px);
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.error-message {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    color: #c53030;
    padding: clamp(10px, 2.5vh, 12px) 14px;
    border-radius: clamp(8px, 2vw, 10px);
    border-left: 4px solid #e53e3e;
    margin-bottom: clamp(14px, 2.5vh, 16px);
    font-size: clamp(12.5px, 3.2vw, 14px);
    display: none;
    align-items: center;
    gap: 9px;
}

    .error-message.show {
        display: flex;
    }

    .error-message i,
    .error-message svg {
        color: #e53e3e;
        flex-shrink: 0;
        width: 16px;
        height: 16px;
    }

@media (max-height: 500px) {
    .login-container {
        max-height: 100dvh;
    }

    .brand-logo {
        width: 64px;
        height: 64px;
    }

    .login-body {
        padding: 14px 16px;
    }
}

@media (max-width: 360px) {
    .brand-logo {
        width: 68px;
        height: 68px;
    }

    .brand-title {
        font-size: 19px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .login-form-container {
        padding: 8px 5vw;
    }

    .login-container {
        max-height: 100dvh;
    }

    .brand-block {
        margin-bottom: 12px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .login-container {
        animation: fadeInUp 0.4s ease-out;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ============================================
   WELCOME PAGE
   ============================================ */

.welcome-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: max(env(safe-area-inset-top), 20px) 20px max(env(safe-area-inset-bottom), 20px);
    position: relative;
    z-index: 1;
}

.welcome-back-btn {
    position: fixed;
    top: max(env(safe-area-inset-top), 20px);
    left: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

    .welcome-back-btn svg {
        width: 24px;
        height: 24px;
        stroke: white;
    }

    .welcome-back-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateX(-3px);
    }

.gym-illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0 20px;
    min-height: 0;
}

    .gym-illustration img {
        max-width: 90%;
        max-height: clamp(320px, 60vh, 600px);
        height: auto;
        width: auto;
        object-fit: contain;
        filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    }

.welcome-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: clamp(24px, 5vw, 32px);
    text-align: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.welcome-card-logo {
    margin-bottom: 16px;
}

    .welcome-card-logo img {
        height: clamp(40px, 10vw, 56px);
        width: auto;
        filter: brightness(0) invert(1);
    }

.welcome-title {
    font-size: clamp(26px, 6vw, 32px);
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
}

.motivational-phrase {
    font-size: clamp(14px, 3.5vw, 16px);
    font-style: italic;
    opacity: 0.95;
    margin: 0 0 clamp(24px, 5vw, 32px);
    line-height: 1.5;
}

.welcome-btn {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    text-decoration: none;
}

    .welcome-btn svg {
        width: 28px;
        height: 28px;
        stroke: currentColor;
    }

    .welcome-btn:hover {
        background: rgba(255, 255, 255, 0.35);
        border-color: rgba(255, 255, 255, 0.6);
        transform: scale(1.05);
    }

@media (min-width: 768px) {
    .welcome-container {
        padding: max(env(safe-area-inset-top), 30px) 40px max(env(safe-area-inset-bottom), 30px);
    }

    .gym-illustration {
        padding: 60px 0 30px;
    }

        .gym-illustration img {
            max-width: 85%;
            max-height: clamp(400px, 65vh, 700px);
        }

    .welcome-card {
        padding: clamp(32px, 6vw, 40px);
    }

    .welcome-btn {
        width: 72px;
        height: 72px;
    }

        .welcome-btn svg {
            width: 32px;
            height: 32px;
        }
}

@media (max-width: 480px) {
    .gym-illustration {
        padding: 30px 0 15px;
    }

        .gym-illustration img {
            max-width: 95%;
            max-height: clamp(240px, 45vh, 350px);
        }

    .welcome-card {
        padding: clamp(20px, 5vw, 28px);
    }

    .welcome-btn {
        width: 56px;
        height: 56px;
    }

        .welcome-btn svg {
            width: 24px;
            height: 24px;
        }
}

@media (max-height: 600px) and (orientation: landscape) {
    .welcome-container {
        padding: 15px 20px;
    }

    .gym-illustration {
        padding: 20px 0 10px;
        flex: 0.6;
    }

        .gym-illustration img {
            max-height: clamp(180px, 40vh, 280px);
        }

    .welcome-card {
        padding: 20px;
        flex-shrink: 0;
    }

    .welcome-card-logo {
        margin-bottom: 10px;
    }

        .welcome-card-logo img {
            height: 36px;
        }

    .welcome-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .motivational-phrase {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .welcome-btn {
        width: 52px;
        height: 52px;
    }
}

@media (min-height: 900px) and (orientation: portrait) {
    .gym-illustration img {
        max-height: 700px;
    }
}

/* ============================================
   DASHBOARD PAGE - V3 (glassmorphism uniforme)
   Sin degradados. Tarjetas uniformes + redondeadas.
   ============================================ */

/* Dashboard Hero */
.dashboard-hero {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

    .hero-icon svg {
        width: 28px;
        height: 28px;
        stroke: white;
    }

.hero-text {
    flex: 1;
    color: white;
}

.hero-greeting {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.75;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.hero-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Workout Featured — fondo transparente, borde punteado */
.workout-featured {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 16px;
    display: block;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.workout-featured:hover,
.workout-featured:active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px);
}

.workout-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}

    .workout-featured-badge svg {
        flex-shrink: 0;
    }

.workout-featured-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.workout-featured-day {
    font-size: 24px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.workout-featured-detail {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
}

    .workout-featured-detail svg {
        stroke: white;
        flex-shrink: 0;
    }

.workout-featured-arrow {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s;
}

    .workout-featured-arrow svg {
        stroke: white;
        transition: transform 0.25s;
    }

.workout-featured:hover .workout-featured-arrow {
    background: rgba(255, 255, 255, 0.3);
}

    .workout-featured:hover .workout-featured-arrow svg {
        transform: translateX(3px);
    }

/* Workout Featured Empty */
.workout-featured.empty {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: auto;
}

    .workout-featured.empty svg {
        stroke: white;
        opacity: 0.6;
    }

    .workout-featured.empty span {
        color: white;
        opacity: 0.75;
        font-size: 14px;
        text-align: center;
    }

    .workout-featured.empty:hover {
        transform: none;
    }

/* Activity Card — glassmorphism uniforme */
.activity-card {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    padding: 22px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

    .activity-card::before {
        display: none;
    }

    .activity-card:hover,
    .activity-card:active {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.4);
        transform: translateY(-2px);
    }

.activity-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.activity-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

    .activity-icon svg {
        width: 22px;
        height: 22px;
        stroke: white;
    }

.activity-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-main {
    font-size: 19px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.activity-detail {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

    .activity-meta svg {
        stroke: rgba(255, 255, 255, 0.5);
        flex-shrink: 0;
    }

/* Activity Empty */
.activity-card.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 36px 22px;
    min-height: 180px;
}

    .activity-card.empty svg {
        stroke: rgba(255, 255, 255, 0.35);
    }

    .activity-card.empty span {
        color: rgba(255, 255, 255, 0.55);
        font-size: 14px;
        text-align: center;
        line-height: 1.5;
    }

    .activity-card.empty:hover {
        transform: none;
    }

/* Responsive Dashboard */
@media (max-width: 480px) {
    .dashboard-hero {
        padding: 20px;
    }

    .hero-icon {
        width: 48px;
        height: 48px;
    }

        .hero-icon svg {
            width: 24px;
            height: 24px;
        }

    .hero-name {
        font-size: 20px;
    }

    .workout-featured {
        padding: 18px;
    }

    .workout-featured-day {
        font-size: 22px;
    }

    .workout-featured-arrow {
        width: 34px;
        height: 34px;
    }

    .activity-card {
        padding: 18px;
    }

    .activity-main {
        font-size: 17px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .dashboard-hero {
        padding: 16px;
        margin-bottom: 12px;
    }

    .hero-icon {
        width: 44px;
        height: 44px;
    }

    .workout-featured {
        padding: 16px;
        margin-bottom: 12px;
    }

    .activity-card {
        padding: 18px;
    }
}

@media (min-width: 768px) {
    .dashboard-hero {
        padding: 28px;
    }

    .hero-icon {
        width: 64px;
        height: 64px;
    }

        .hero-icon svg {
            width: 32px;
            height: 32px;
        }

    .hero-name {
        font-size: 26px;
    }

    .workout-featured {
        padding: 26px;
    }

    .workout-featured-day {
        font-size: 28px;
    }

    .activity-card {
        padding: 26px;
    }

    .activity-main {
        font-size: 21px;
    }
}

/* Animación Dashboard */
@media (prefers-reduced-motion: no-preference) {
    .dashboard-hero,
    .workout-featured,
    .activity-card {
        animation: fadeInDashboard 0.5s ease-out backwards;
    }

    .dashboard-hero {
        animation-delay: 0.1s;
    }

    .workout-featured {
        animation-delay: 0.2s;
    }

    .activity-card {
        animation-delay: 0.3s;
    }

    @keyframes fadeInDashboard {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ============================================
   ENTRENAMIENTOS PAGE
   ============================================ */

.day-section {
    margin-bottom: clamp(20px, 4.5vh, 28px);
}

.day-header {
    background: rgba(74, 123, 167, 0.45);
    color: white;
    padding: clamp(18px, 4vh, 22px) clamp(20px, 5vw, 28px);
    border-radius: clamp(20px, 5vw, 26px);
    font-size: clamp(18px, 4.5vw, 21px);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 60px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

    .day-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15));
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: inherit;
    }

    .day-header:hover {
        background: rgba(74, 123, 167, 0.55);
        transform: translateY(-2px);
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    }

        .day-header:hover::before {
            opacity: 1;
        }

    .day-header.active {
        background: rgba(74, 123, 167, 0.55);
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }

    .day-header::after {
        content: '';
        position: absolute;
        right: 24px;
        width: 10px;
        height: 10px;
        border-right: 2px solid white;
        border-bottom: 2px solid white;
        transform: rotate(45deg);
        transition: all 0.3s ease;
    }

    .day-header.active::after {
        transform: rotate(-135deg);
    }

.day-content {
    margin-top: clamp(14px, 3vh, 18px);
    display: none;
}

    .day-content.active {
        display: block;
        animation: fadeInDay 0.3s ease-out;
    }

@keyframes fadeInDay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ejercicio-card {
    background: var(--surface-light);
    backdrop-filter: blur(12px);
    border-radius: clamp(18px, 4.5vw, 22px);
    padding: clamp(20px, 5vw, 24px);
    margin-bottom: clamp(14px, 3vh, 16px);
    color: white;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    text-align: left;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .ejercicio-card:hover {
        background: var(--surface-lighter);
        transform: translateX(8px);
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

.ejercicio-badge {
    position: absolute;
    top: clamp(14px, 3.5vh, 16px);
    right: clamp(14px, 3.5vw, 16px);
    padding: clamp(7px, 1.8vh, 8px) clamp(14px, 3.5vw, 16px);
    border-radius: clamp(11px, 2.8vw, 13px);
    font-size: clamp(10px, 2.6vw, 11px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.badge-plantilla {
    background: linear-gradient(135deg, rgba(58, 106, 151, 0.9), rgba(74, 123, 167, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.badge-grupo {
    background: linear-gradient(135deg, rgba(91, 143, 185, 0.9), rgba(111, 163, 196, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.badge-directo {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.9), rgba(241, 196, 15, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.ejercicio-title {
    font-size: clamp(17px, 4.2vw, 19px);
    font-weight: 600;
    margin-bottom: clamp(12px, 3vh, 14px);
    line-height: 1.4;
    padding-right: clamp(90px, 22vw, 110px);
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 12px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ejercicio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(20px, 5vw, 22px);
    height: clamp(20px, 5vw, 22px);
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.ejercicio-meta {
    font-size: clamp(13px, 3.3vw, 14px);
    opacity: 0.9;
    line-height: 1.8;
    padding-left: clamp(30px, 7vw, 32px);
}

.meta-row {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 12px);
    margin-bottom: clamp(6px, 1.5vh, 8px);
    flex-wrap: wrap;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: clamp(5px, 1.2vh, 6px) clamp(11px, 2.8vw, 12px);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9px;
    font-size: clamp(11px, 2.9vw, 12px);
    white-space: nowrap;
    font-weight: 600;
}

    .meta-item.highlight {
        background: rgba(255, 255, 255, 0.25);
        font-weight: 700;
    }

    .meta-item svg {
        width: 13px;
        height: 13px;
        opacity: 0.8;
    }

.ejercicio-grupo {
    font-size: clamp(12px, 3.1vw, 13px);
    opacity: 0.85;
    margin-bottom: clamp(8px, 2vh, 10px);
    padding-left: clamp(30px, 7vw, 32px);
    display: flex;
    align-items: center;
    gap: 7px;
}

.ejercicio-notas {
    font-size: clamp(11px, 2.9vw, 12px);
    opacity: 0.75;
    font-style: italic;
    margin-top: clamp(8px, 2vh, 10px);
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    padding-left: clamp(12px, 3vw, 14px);
}

.empty-day {
    background: var(--surface-light);
    backdrop-filter: blur(10px);
    border-radius: clamp(18px, 4.5vw, 22px);
    padding: clamp(28px, 6vh, 36px);
    color: white;
    text-align: center;
    opacity: 0.85;
    font-size: clamp(14px, 3.6vw, 15px);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

    .empty-day svg {
        width: 52px;
        height: 52px;
        opacity: 0.6;
    }

@media (max-width: 360px) {
    .ejercicio-card {
        padding: 18px;
    }

    .ejercicio-title {
        font-size: 16px;
        padding-right: 85px;
    }

    .ejercicio-meta {
        font-size: 12px;
    }

    .meta-item {
        padding: 4px 9px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .day-section {
        margin-bottom: 14px;
    }

    .day-header {
        padding: 14px 20px;
        min-height: 52px;
    }

    .ejercicio-card {
        padding: 14px 18px;
    }
}

@media (min-width: 768px) {
    .ejercicio-card {
        padding: 24px 28px;
    }

        .ejercicio-card:hover {
            transform: translateX(10px);
        }

    .day-header:hover {
        transform: translateY(-4px);
    }
}

/* ============================================
   DETALLE EJERCICIO
   ============================================ */

/* Main Card */
.exercise-main-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: clamp(16px, 4vw, 20px);
    margin-bottom: clamp(15px, 4vh, 20px);
    color: white;
}

.exercise-title {
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 600;
    margin-bottom: clamp(12px, 3vh, 15px);
    line-height: 1.3;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: clamp(10px, 2.5vw, 12px);
    margin-bottom: clamp(15px, 4vh, 20px);
}

.info-item {
    background: rgba(255, 255, 255, 0.1);
    padding: clamp(10px, 2.5vw, 12px);
    border-radius: 10px;
}

.info-label {
    font-size: clamp(11px, 2.8vw, 12px);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-value {
    font-size: clamp(15px, 3.8vw, 16px);
    font-weight: 600;
}

/* Image/Video Section */
.exercise-image-section {
    margin-bottom: clamp(15px, 4vh, 20px);
}

.exercise-image {
    width: 100%;
    height: clamp(200px, 50vw, 300px);
    border-radius: 15px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.2);
}

.video-wrapper {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
}

    .video-wrapper video {
        width: 100%;
        height: auto;
        min-height: clamp(200px, 50vw, 400px);
        max-height: 60vh;
        display: block;
        object-fit: contain;
    }

/* YouTube Wrapper */
.youtube-wrapper {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

    .youtube-wrapper iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

/* Instructions Card */
.instructions-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: clamp(16px, 4vw, 20px);
    margin-bottom: clamp(15px, 4vh, 20px);
    color: white;
}

.instructions-text {
    font-size: clamp(14px, 3.5vw, 15px);
    line-height: 1.6;
    opacity: 0.95;
    white-space: pre-line;
}

/* Workout Specs */
.workout-specs {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: clamp(16px, 4vw, 20px);
    margin-bottom: clamp(15px, 4vh, 20px);
    color: white;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 2.5vw, 12px) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .spec-row:last-child {
        border-bottom: none;
    }

.spec-label {
    font-size: clamp(14px, 3.5vw, 15px);
    opacity: 0.9;
}

.spec-value {
    font-size: clamp(15px, 3.8vw, 16px);
    font-weight: 600;
}

/* Notes Section */
.notes-section {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    padding: clamp(12px, 3vw, 15px);
    border-radius: 10px;
    margin-top: clamp(12px, 3vh, 15px);
}

.notes-title {
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0.9;
}

.notes-text {
    font-size: clamp(13px, 3.2vw, 14px);
    opacity: 0.85;
    line-height: 1.5;
}

/* Responsive - Landscape */
@media (orientation: landscape) and (max-height: 500px) {
    .exercise-image {
        height: 150px;
    }
}

/* ============================================
   ENTRENAMIENTOS PAGE — V2 Glassmorphism
   Scoped under .content-wrapper
   ============================================ */

/* Day accordion sections */
.content-wrapper .day-section {
    margin-bottom: 10px;
}

.content-wrapper .day-header {
    display: flex;
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.content-wrapper .day-header:hover {
    background: rgba(255, 255, 255, 0.15);
}

.content-wrapper .day-header.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    border-left: 3px solid rgba(255, 255, 255, 0.6);
}

/* Day content collapse/expand */
.content-wrapper .day-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    opacity: 0;
}

.content-wrapper .day-content.active {
    max-height: 5000px;
    opacity: 1;
    padding-top: 10px;
    padding-bottom: 4px;
    transition: max-height 0.6s ease-in, opacity 0.3s ease;
}

/* Exercise card — glass */
.content-wrapper .ejercicio-card {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.content-wrapper .ejercicio-card:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    transform: translateY(-1px);
}

/* Badge — top right */
.content-wrapper .ejercicio-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* Exercise title */
.content-wrapper .ejercicio-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white !important;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    padding-right: 70px;
}

.content-wrapper .ejercicio-icon {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

/* Muscle group label */
.content-wrapper .ejercicio-grupo {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-bottom: 8px;
}

.content-wrapper .ejercicio-grupo svg {
    color: rgba(255, 255, 255, 0.4);
}

/* Meta info pills */
.content-wrapper .ejercicio-meta {
    padding: 0;
}

.content-wrapper .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.content-wrapper .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.content-wrapper .meta-item svg {
    width: 14px;
    height: 14px;
}

.content-wrapper .meta-item.highlight {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* Notes */
.content-wrapper .ejercicio-notas {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Empty day placeholder */
.content-wrapper .empty-day {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    gap: 12px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    text-align: center;
}

.content-wrapper .empty-day svg {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.25);
}

/* Loading spinner */
.content-wrapper .loading-container {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.content-wrapper .loading-spinner {
    color: white;
}

.content-wrapper .loading-message {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}


/* ============================================
   EJERCICIO DETALLE PAGE — V2 Glassmorphism
   Scoped under unique class names
   ============================================ */

/* Main exercise card */
.exercise-main-card {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 16px;
}

.exercise-title {
    color: white !important;
    font-size: clamp(18px, 4.5vw, 22px);
    font-weight: 700;
    margin-bottom: 16px;
}

/* Info grid — 3 columns */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.info-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 8px;
    text-align: center;
    border-radius: 12px;
}

.info-label {
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.info-value {
    display: block;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

/* Image / Video section */
.exercise-image-section {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.youtube-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-wrapper video {
    width: 100%;
    border-radius: 12px;
}

.exercise-image {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.placeholder-icon {
    display: block;
    margin: 24px auto;
    opacity: 0.3;
}

/* Notes section */
.notes-section {
    background: rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    border-radius: 14px;
}

.notes-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.notes-text {
    color: white;
    font-size: 14px;
    line-height: 1.5;
}

/* Workout specs card */
.workout-specs {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 16px;
}

.section-title {
    color: white !important;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.section-title svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
}

.spec-value {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* Instructions card */
.instructions-card {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 16px;
}

.instructions-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.action-buttons .btn-back {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.action-buttons .btn-back svg {
    width: 18px;
    height: 18px;
}

.action-buttons .btn-back:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.action-buttons .btn-register {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.action-buttons .btn-register svg {
    width: 18px;
    height: 18px;
}

.action-buttons .btn-register:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.45);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    min-width: 280px;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.toast-success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.toast-error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
}

/* Modal — register exercise */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #3d6a8e;
    border-radius: 22px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    padding: 18px 20px 14px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

.modal-close svg {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-title svg {
    width: 22px;
    height: 22px;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 4px;
}

.modal-body {
    padding: 4px 20px 16px;
}

.modal-form-group {
    margin-bottom: 16px;
}

.modal-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.modal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    padding: 12px 14px;
    outline: none;
}

.modal-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.modal-input:focus {
    outline: none;
}

.modal-input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.4);
}

.modal-input-unit {
    padding: 0 14px 0 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    font-weight: 500;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px;
}

.btn-modal {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-modal.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.btn-modal.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-modal.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-modal.btn-primary svg {
    width: 18px;
    height: 18px;
}

.btn-modal.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-modal:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
