/* ============================= */
/* BASE GENERAL */
/* ============================= */

:root {
    --app-bg-dark: #0f172a;
    --app-bg-dark-2: #111827;
    --app-card: rgba(17, 24, 39, 0.88);
    --app-card-soft: rgba(30, 41, 59, 0.88);
    --app-border: rgba(255, 255, 255, 0.08);
    --app-text: #e5e7eb;
    --app-text-soft: #9ca3af;
    --app-accent: #6366f1;
    --app-accent-soft: rgba(99, 102, 241, 0.18);
    --app-success: #22c55e;
    --app-warning: #f59e0b;
    --app-danger: #ef4444;
    --app-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

html,
body {
    min-height: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--app-text);
    background-color: var(--app-bg-dark);
    background-image: url('../img/gym-bg.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Overlay oscuro para que no se vea lavado */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(
            to bottom,
            rgba(8, 15, 30, 0.25),
            rgba(8, 15, 30, 0.35)
        );
    z-index: -1;
    pointer-events: none;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--app-text);
    font-weight: 700;
}

p {
    color: var(--app-text-soft);
}

.small,
small,
.text-muted {
    color: var(--app-text-soft) !important;
    font-size: 0.92rem;
}

.fw-semibold {
    font-weight: 600;
}

/* ============================= */
/* ENLACES */
/* ============================= */

a {
    color: #c7d2fe;
    text-decoration: none;
}

a:hover {
    color: #e0e7ff;
}

/* ============================= */
/* CARDS PRINCIPALES */
/* ============================= */

.app-card,
.card {
    background: var(--app-card);
    color: var(--app-text);
    border: 1px solid var(--app-border) !important;
    border-radius: 18px !important;
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(8px);
}

/* ============================= */
/* ACORDEÓN */
/* ============================= */

.accordion-item {
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--app-border) !important;
    border-radius: 18px !important;
    overflow: hidden;
    box-shadow: var(--app-shadow);
}

.accordion-button {
    background: rgba(17, 24, 39, 0.95);
    color: var(--app-text);
    font-weight: 700;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(30, 41, 59, 0.96);
    color: #ffffff;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-button::after {
    filter: invert(1) grayscale(1);
}

.accordion-body {
    background: rgba(15, 23, 42, 0.72);
}

/* ============================= */
/* BLOQUES DE DÍA */
/* ============================= */

.bg-light,
.bg-light-subtle {
    background: rgba(15, 15, 14, 0.9) !important;
    /*background: rgba(0, 0, 0, 0.74) !important;*/
    border: 1px solid var(--app-border) !important;
    color: var(--app-text);
}

.rounded-4 {
    border-radius: 18px !important;
}

/* ============================= */
/* TARJETAS DE EJERCICIO */
/* ============================= */

.bg-white.border,
.exercise-card,
.exercise-card-enhanced {
    background: rgba(17, 24, 39, 0.92) !important;
    color: var(--app-text);
    border: 1px solid var(--app-border) !important;
    border-radius: 16px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bg-white.border:hover,
.exercise-card:hover,
.exercise-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.exercise-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
}

/* ============================= */
/* GUÍAS Y NOTAS */
/* ============================= */

.exercise-guide {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.16);
    color: #dbeafe;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 0.85rem;
    line-height: 1.45;
}

.exercise-note {
    font-size: 0.85rem;
    color: var(--app-text);
}

.note-label {
    color: #cbd5e1;
    font-weight: 600;
}

.note-value {
    color: var(--app-text);
}

/* ============================= */
/* BADGES */
/* ============================= */

.badge {
    font-size: 0.72rem;
    padding: 6px 10px;
    border-radius: 999px;
}

.badge.bg-primary,
.badge.text-bg-primary {
    background-color: var(--app-accent) !important;
}

.badge.bg-secondary,
.badge.text-bg-secondary {
    background-color: rgba(148, 163, 184, 0.22) !important;
    color: #e5e7eb !important;
}

.badge.bg-dark,
.badge.text-bg-dark {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}

.bg-success {
    background-color: var(--app-success) !important;
}

.bg-warning {
    background-color: var(--app-warning) !important;
}

.bg-danger {
    background-color: var(--app-danger) !important;
}

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

.btn {
    border-radius: 12px;
    font-weight: 600;
    min-height: 44px;
}

.btn-primary,
.app-btn-primary {
    background-color: var(--app-accent);
    border-color: var(--app-accent);
}

.btn-primary:hover,
.app-btn-primary:hover {
    background-color: #5458ee;
    border-color: #5458ee;
}

.btn-outline-secondary {
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
}

.btn-outline-dark {
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline-dark:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
}

.btn-success {
    background-color: var(--app-success);
    border-color: var(--app-success);
}

.btn-success:hover {
    background-color: #1fb857;
    border-color: #1fb857;
}

/* ============================= */
/* FORMULARIOS */
/* ============================= */

.form-label {
    color: #e5e7eb;
    font-weight: 600;
}

.form-control,
.app-input {
    min-height: 48px;
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}

.form-control::placeholder,
.app-input::placeholder {
    color: #94a3b8;
}

.form-control:focus,
.app-input:focus {
    background: rgba(17, 24, 39, 0.96);
    color: #fff;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}

/* ============================= */
/* TABLAS O MÉTRICAS */
/* ============================= */

.metric-label {
    font-size: 0.75rem;
    color: var(--app-text-soft);
}

.metric-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}

/* ============================= */
/* ALERTAS */
/* ============================= */

.alert {
    border: 1px solid var(--app-border);
    border-radius: 16px;
    color: #fff;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.24);
}

.alert-success {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.24);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.24);
}

/* ============================= */
/* LOGIN */
/* ============================= */

.login-shell {
    position: relative;
}

.login-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.login-card-wrap {
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--app-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.login-brand-panel {
    background:
        linear-gradient(
            160deg,
            rgba(79, 70, 229, 0.78),
            rgba(15, 23, 42, 0.92)
        );
    color: #fff;
    padding: 2rem;
}

.login-brand-badge,
.login-mini-chip {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.login-brand-title,
.login-form-title {
    color: #fff;
}

.login-brand-text,
.section-subtitle,
.login-footer-note,
.login-register-link span {
    color: rgba(255, 255, 255, 0.78) !important;
}

.login-register-anchor {
    color: #c7d2fe;
    font-weight: 600;
}

/* ============================= */
/* NAV */
/* ============================= */

.navbar,
.mobile-bottom-nav {
    backdrop-filter: blur(8px);
}

.mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-bottom-link {
    color: #cbd5e1;
}

.mobile-bottom-link.active {
    color: #fff;
}

/* ============================= */
/* MOBILE FIRST */
/* ============================= */

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-position: center top;
    }

    body::before {
        background:
            linear-gradient(
                to bottom,
                rgba(8, 15, 30, 0.30),
                rgba(8, 15, 30, 0.45)
            );
    }

    .card-body {
        padding: 1rem !important;
    }

    .accordion-body {
        padding: 0.9rem;
    }

    /*.bg-light,
    .bg-light-subtle {
        padding: 14px !important;
        border-radius: 16px !important;
    }*/

    .bg-light,
    .bg-light-subtle {
    padding: 14px !important;
    border-radius: 16px !important;

    /* 🔥 ESTO ES LO QUE TE FALTA */
    /*background: rgba(51, 65, 85, 0.90) !important;*/
    background: rgba(15, 15, 14, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    }
    .bg-light-subtle .text-muted {
    color: #e5e7eb !important;
    }

    .bg-white.border,
    .exercise-card,
    .exercise-card-enhanced {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    /* 🔥 TITULOS */
    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3,
    h5,
    h6 {
        font-size: 1.1rem;
    }

    .exercise-title {
        font-size: 1.15rem;
        font-weight: 700;
    }

    /* 🔥 TEXTO GENERAL (ANTES MUY PEQUEÑO) */
    .small,
    small,
    .text-muted {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .exercise-guide {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .exercise-note {
        font-size: 0.92rem;
    }

    /* 🔥 DATOS (series, reps) */
    .metric-value {
        font-size: 1rem;
        font-weight: 700;
    }

    /* 🔥 BADGES */
    .badge {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    /* 🔥 BOTONES (TOUCH FRIENDLY) */
    .btn {
        font-size: 0.95rem;
        padding: 10px 14px;
        min-height: 44px;
    }

    .login-brand-panel {
        padding: 1.6rem;
    }

    .login-card-wrap {
        border-radius: 20px;
    }
}
/* ============================= */
/* EXTRA PEQUEÑO */
/* ============================= */

@media (max-width: 576px) {
    .app-card,
    .card,
    .accordion-item {
        box-shadow: none;
        backdrop-filter: none;
    }

    .bg-white.border:hover,
    .exercise-card:hover,
    .exercise-card-enhanced:hover {
        transform: none;
    }

    .login-card-wrap {
        border-radius: 18px;
    }
}

.user-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.summary-card {
    background: rgba(17, 24, 39, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.summary-card-wide {
    grid-column: 1 / -1;
}

.summary-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 600;
}

.summary-value {
    font-size: 1rem;
    line-height: 1.4;
    color: #f8fafc;
    font-weight: 600;
}

.summary-card-note {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(99, 102, 241, 0.20);
}

@media (max-width: 768px) {
    .user-summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .summary-card {
        padding: 12px;
        border-radius: 14px;
    }

    .summary-label {
        font-size: 0.76rem;
    }

    .summary-value {
        font-size: 0.98rem;
    }
}

/* ============================= */
/* TARJETAS DE ESTADÍSTICAS DEL PLAN */
/* ============================= */

.plan-stat-card{
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 1rem;
    height: 100%;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-stat-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.plan-stat-label{
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
    font-weight: 600;
    line-height: 1.2;
}

.plan-stat-value{
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}

/* chips o valores resaltados dentro de las tarjetas */
.plan-stat-value.d-inline-block{
    font-size: 0.95rem;
    line-height: 1.2;
}

/* ajuste para móvil */
@media (max-width: 768px){
    .plan-stat-card{
        padding: 0.9rem;
        border-radius: 16px;
    }

    .plan-stat-label{
        font-size: 0.78rem;
    }

    .plan-stat-value{
        font-size: 1.05rem;
    }
}

/* =========================
   DÍAS DE ENTRENAMIENTO PRO
========================= */

.day-grid{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.day-checkbox{
    display: none;
}

.day-option{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    background: #000;
    color: #fff;
    border-radius: 12px;
    border: 1px solid #222;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.day-option:hover{
    background: #111;
}

/* SELECCIONADO */
.day-checkbox:checked + .day-option{
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #16a34a;
}

@media (min-width: 768px){
    .day-grid{
        grid-template-columns: repeat(3, 1fr);
    }
}


/* =========================
   RESUMEN DEL PERFIL
========================= */

.profile-summary-card{
    background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(17,24,39,0.96));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 1.1rem;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.profile-summary-name{
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.profile-summary-meta{
    font-size: 0.92rem;
    color: rgba(255,255,255,0.68);
}

.profile-mini-grid{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.profile-mini-card{
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 0.9rem;
}

.profile-mini-label{
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.profile-mini-value{
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.profile-goal-block{
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 0.9rem;
}

.profile-goal-value{
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.level-badge{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.level-badge.beginner{
    background: #22c55e;
    color: #ffffff;
}

.level-badge.intermediate{
    background: #f59e0b;
    color: #111827;
}

.level-badge.advanced{
    background: #ef4444;
    color: #ffffff;
}

.level-badge.default{
    background: #6b7280;
    color: #ffffff;
}

@media (max-width: 576px){
    .profile-summary-name{
        font-size: 1.05rem;
    }

    .profile-summary-meta{
        font-size: 0.85rem;
    }

    .profile-mini-value,
    .profile-goal-value{
        font-size: 0.95rem;
    }
}