/* ==========================================================================
   FLECHAS - CABECERA UNIFICADA, BARRA INFERIOR MÓVIL & SELECTOR DE ETAPA
   Diseño 100% homogéneo y siempre visible en los 8 módulos
   ========================================================================== */

/* 1. CABECERA SUPERIOR UNIFICADA (ESCRITORIO Y MÓVIL) */
html,
body {
    transform: none !important;
    filter: none !important;
    perspective: none !important;
}

.main-header {
    background: #ffffff !important;
    border-bottom: 1px solid #f1e4e6 !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 2147483630 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

.header-container {
    max-width: 1320px !important;
    margin: 0 auto !important;
    padding: 10px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    position: relative !important;
}

.brand-area {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    color: inherit !important;
    flex-shrink: 0 !important;
}

.brand-logo-img {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    border-radius: 50% !important;
    object-fit: contain !important;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.16) !important;
}

.brand-text {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.15 !important;
}

.brand-name,
.brand-text h1 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    color: #be123c !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    display: block !important;
}

.brand-tagline {
    display: block !important;
    font-size: 0.65rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-top: 2px !important;
}

/* 2. MENÚ SUPERIOR DE ESCRITORIO (.nav-hub) */
.nav-hub,
.nav-links-hub {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex: 1 !important;
    margin: 0 10px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.nav-hub-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 13px !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.nav-hub-link i {
    font-size: 0.9rem !important;
    color: inherit !important;
}

.nav-hub-link:hover {
    background: #ffe4e6 !important;
    color: #be123c !important;
}

.nav-hub-link.active {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 50%, #fb7185 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28) !important;
}

.nav-hub-link.active i {
    color: #ffffff !important;
}

.mobile-nav-divider,
.mobile-logout-btn {
    display: none !important;
}

/* 3. BOTÓN DE PERFIL UNIFICADO (.user-badge) CON INICIAL Y FLECHA EN WEB Y MÓVIL */
.user-menu-area {
    position: relative !important;
    flex-shrink: 0 !important;
}

.user-badge,
#activeUserBadge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    padding: 5px 13px 5px 5px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 9999px !important;
    cursor: pointer !important;
    user-select: none !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
    transition: all 0.2s ease !important;
}

.user-badge:hover,
#activeUserBadge:hover {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12) !important;
}

.user-badge .avatar-circle,
.user-badge .user-avatar,
#userAvatarLetter {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 50% !important;
    background: #d81b43 !important;
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25) !important;
}

/* Ocultar texto en el botón exterior para mantener el diseño limpio de inicial + flecha tanto en Web como en Móvil */
.user-badge .user-text-info,
#activeUserBadge .user-text-info {
    display: none !important;
}

.user-badge .dropdown-arrow,
.user-badge .user-chevron,
.user-badge .fa-chevron-down,
#activeUserBadge .fa-chevron-down {
    display: inline-block !important;
    font-size: 0.78rem !important;
    color: #475569 !important;
    margin-left: 0 !important;
    transition: transform 0.2s ease !important;
}

/* 4. BARRA DE NAVEGACIÓN MÓVIL FIJA INFERIOR (.mobile-bottom-nav) */
.mobile-bottom-nav {
    display: none !important;
}

@media (max-width: 992px) {
    /* Ocultar hamburguesa y nav superior en móvil porque la barra vive abajo */
    .mobile-nav-toggle {
        display: none !important;
    }

    .nav-hub,
    .nav-links-hub {
        display: none !important;
    }

    /* Ajustar cabecera superior en móvil para que SIEMPRE muestre Logo + Título + Botón de Inicial */
    .header-container {
        padding: 8px 14px !important;
        gap: 8px !important;
    }

    .brand-area {
        gap: 8px !important;
    }

    .brand-logo-img {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
    }

    .brand-name,
    .brand-text h1 {
        font-size: 1.15rem !important;
    }

    .brand-tagline {
        display: block !important;
        font-size: 0.54rem !important;
        letter-spacing: 0.3px !important;
    }

    .user-menu-area {
        margin-left: auto !important;
        margin-right: 0 !important;
    }

    .user-badge,
    #activeUserBadge {
        display: inline-flex !important;
        padding: 4px 12px 4px 5px !important;
        gap: 8px !important;
        background: #ffffff !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 9999px !important;
    }

    .user-badge .avatar-circle,
    .user-badge .user-avatar,
    #userAvatarLetter {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        font-size: 0.9rem !important;
    }

    .user-badge .user-text-info,
    #activeUserBadge .user-text-info {
        display: none !important;
    }

    /* Fijar cabecera superior y compensar barra inferior para que NUNCA desaparezcan al deslizar */
    .main-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 2147483630 !important;
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        will-change: transform !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }

    body {
        padding-top: 58px !important;
        padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .main-container,
    .bible-app-main,
    .menopause-main-container {
        padding-bottom: 36px !important;
    }

    /* Contenedor principal de la barra inferior fija (100% inmóvil al hacer scroll) */
    .mobile-bottom-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        min-height: 64px !important;
        height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
        background: #140d12 !important;
        background: linear-gradient(180deg, #1c1319 0%, #120b10 100%) !important;
        border-top: 1px solid rgba(244, 63, 94, 0.25) !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45) !important;
        z-index: 2147483640 !important;
        align-items: center !important;
        justify-content: space-around !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px)) 8px !important;
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        will-change: transform !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transition: none !important;
    }

    /* Cuando están visibles los 7 ítems de embarazo, alinear al inicio para scroll suave */
    html.maternity-enabled .mobile-bottom-nav,
    body.maternity-enabled .mobile-bottom-nav {
        justify-content: flex-start !important;
    }

    .mobile-bottom-nav::-webkit-scrollbar {
        display: none !important;
    }

    /* Cada ítem / pestaña de la barra */
    .mobile-bottom-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 1 0 auto !important;
        min-width: 58px !important;
        max-width: 84px !important;
        height: 100% !important;
        text-decoration: none !important;
        color: #94a3b8 !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
        position: relative !important;
        padding: 2px 4px !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .mobile-bottom-nav-item i {
        font-size: 1.15rem !important;
        margin-bottom: 3px !important;
        transition: transform 0.2s ease, color 0.2s ease !important;
    }

    .mobile-bottom-nav-item span {
        font-size: 0.64rem !important;
        font-weight: 600 !important;
        letter-spacing: -0.1px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 72px !important;
        text-align: center !important;
        line-height: 1.1 !important;
    }

    .mobile-bottom-nav-item:active {
        transform: scale(0.92) !important;
    }

    /* ESTADO ACTIVO: Pestaña seleccionada */
    .mobile-bottom-nav-item.active {
        color: #fb7185 !important;
    }

    .mobile-bottom-nav-item.active i {
        background: linear-gradient(135deg, #be123c 0%, #e11d48 100%) !important;
        color: #ffffff !important;
        padding: 6px 14px !important;
        border-radius: 999px !important;
        font-size: 1.05rem !important;
        box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4) !important;
        margin-bottom: 2px !important;
    }

    .mobile-bottom-nav-item.active span {
        color: #f43f5e !important;
        font-weight: 700 !important;
    }
}

/* ==========================================================
   5. CONTROL DE VISIBILIDAD DE MÓDULOS Y GARANTÍA DE NO OCULTAMIENTO
   ========================================================== */

/* Módulos universales (Ciclo, Plan Bíblico, Comunidad) SIEMPRE visibles */
.nav-hub .nav-hub-link:not([data-maternity-nav="true"]):not([data-menopause-nav="true"]):not(#adminHeaderLink):not(.mobile-logout-btn) {
    display: inline-flex !important;
}

/* 1. Maternidad: Oculta si maternity-disabled o si menopause-enabled */
html.maternity-disabled [data-maternity-nav="true"],
html.maternity-disabled .nav-maternity-option,
body.maternity-disabled [data-maternity-nav="true"],
body.maternity-disabled .nav-maternity-option,
html.menopause-enabled [data-maternity-nav="true"],
body.menopause-enabled [data-maternity-nav="true"] {
    display: none !important;
}

/* 2. Menopausia: Oculta por defecto y cuando menopause-disabled está activo */
[data-menopause-nav="true"],
html.menopause-disabled [data-menopause-nav="true"],
body.menopause-disabled [data-menopause-nav="true"] {
    display: none !important;
}

/* 3. Menopausia: Visible en nav-hub superior cuando menopause-enabled está activo */
html.menopause-enabled .nav-hub [data-menopause-nav="true"],
body.menopause-enabled .nav-hub [data-menopause-nav="true"] {
    display: inline-flex !important;
}

/* 4. El botón del apartado actual (.active) JAMÁS se oculta en escritorio */
.nav-hub .nav-hub-link.active {
    display: inline-flex !important;
}

/* 5. Reglas de visibilidad garantizada en la barra inferior móvil */
@media (max-width: 992px) {
    .mobile-bottom-nav .mobile-bottom-nav-item:not([data-maternity-nav="true"]):not([data-menopause-nav="true"]) {
        display: flex !important;
    }

    html.menopause-enabled .mobile-bottom-nav [data-menopause-nav="true"],
    body.menopause-enabled .mobile-bottom-nav [data-menopause-nav="true"] {
        display: flex !important;
    }

    html.maternity-enabled .mobile-bottom-nav [data-maternity-nav="true"],
    body.maternity-enabled .mobile-bottom-nav [data-maternity-nav="true"] {
        display: flex !important;
    }

    /* El botón del apartado actual (.active) JAMÁS se oculta en móvil */
    .mobile-bottom-nav .mobile-bottom-nav-item.active {
        display: flex !important;
    }
}

/* ==========================================================================
   6. DROPDOWN SELECTOR DE ETAPA DE VIDA (CICLO / EMBARAZO / MENOPAUSIA)
   ========================================================================== */
.stage-chip-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.stage-chip-indicator.cycle {
    background: #ffe4e6;
    color: #e11d48;
    border: 1px solid #fecdd3;
}

.stage-chip-indicator.preg {
    background: #f3e8ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

.stage-chip-indicator.meno {
    background: #dcfce7;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.user-dropdown-menu {
    display: none;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    width: 340px !important;
    max-width: calc(100vw - 20px) !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18) !important;
    padding: 0.85rem !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.user-dropdown-menu.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 999999 !important;
    animation: flechasDropdownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes flechasDropdownFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-stage-section {
    padding: 0.65rem 0.4rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.5rem;
    background: #fafafc;
    border-radius: 10px;
}

.dropdown-stage-title,
.stage-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
}

.dropdown-stage-options,
.stage-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.stage-select-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.75rem;
    border: 1.5px solid #f1f5f9;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
}

.stage-select-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
}

.stage-select-btn .stage-info-text,
.stage-select-btn .stage-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stage-select-btn .stage-title,
.stage-select-btn .stage-info strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
}

.stage-select-btn .stage-desc,
.stage-select-btn .stage-info small {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.2;
    margin-top: 2px;
}

.stage-select-btn .stage-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.stage-select-btn .stage-icon-wrap.stage-icon-cycle,
.stage-select-btn .stage-icon-wrap.cycle {
    background: #fff1f2;
}

.stage-select-btn .stage-icon-wrap.stage-icon-pregnancy,
.stage-select-btn .stage-icon-wrap.pregnancy {
    background: #faf5ff;
}

.stage-select-btn .stage-icon-wrap.stage-icon-menopause,
.stage-select-btn .stage-icon-wrap.menopause {
    background: #f0fdf4;
}

.stage-select-btn .stage-check,
.stage-select-btn .stage-check-icon {
    font-size: 0.95rem;
    color: #cbd5e1;
    transition: all 0.2s ease;
    margin-left: auto;
}

.stage-select-btn.active#stageOption_cycle {
    border-color: #f43f5e !important;
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%) !important;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.12);
}
.stage-select-btn.active#stageOption_cycle .stage-title,
.stage-select-btn.active#stageOption_cycle .stage-info strong {
    color: #be123c !important;
}
.stage-select-btn.active#stageOption_cycle .stage-check,
.stage-select-btn.active#stageOption_cycle .stage-check-icon {
    color: #e11d48 !important;
}

.stage-select-btn.active#stageOption_pregnancy {
    border-color: #a855f7 !important;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%) !important;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.12);
}
.stage-select-btn.active#stageOption_pregnancy .stage-title,
.stage-select-btn.active#stageOption_pregnancy .stage-info strong {
    color: #7e22ce !important;
}
.stage-select-btn.active#stageOption_pregnancy .stage-check,
.stage-select-btn.active#stageOption_pregnancy .stage-check-icon {
    color: #9333ea !important;
}

.stage-select-btn.active#stageOption_menopause {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
}
.stage-select-btn.active#stageOption_menopause .stage-title,
.stage-select-btn.active#stageOption_menopause .stage-info strong {
    color: #047857 !important;
}
.stage-select-btn.active#stageOption_menopause .stage-check,
.stage-select-btn.active#stageOption_menopause .stage-check-icon {
    color: #059669 !important;
}

/* ==========================================================================
   7. TARJETA UNIFICADA DE DATOS DE PERFIL, PLAN ANUAL Y EDICIÓN DE CUENTA
   ========================================================================== */
.user-dropdown-menu .dropdown-header {
    display: none !important;
}

.flechas-profile-unified-box {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid #f1f5f9;
}

.flechas-profile-summary-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 100%);
    border: 1px solid #fecdd3;
    border-radius: 12px;
}

.flechas-profile-avatar-lg {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.25);
    text-transform: uppercase;
}

.flechas-profile-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.flechas-profile-meta strong {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.flechas-profile-meta span {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Tarjeta de Tiempo Restante del Plan Anual */
.flechas-plan-time-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1.5px solid #a7f3d0;
    border-radius: 11px;
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.flechas-plan-time-card.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
}

.flechas-plan-time-card.expired {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

.flechas-plan-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.flechas-plan-badge {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #047857;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.flechas-plan-time-card.warning .flechas-plan-badge {
    color: #b45309;
}

.flechas-plan-time-card.expired .flechas-plan-badge {
    color: #b91c1c;
}

.flechas-plan-days-pill {
    background: #059669;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
}

.flechas-plan-time-card.warning .flechas-plan-days-pill {
    background: #d97706;
}

.flechas-plan-time-card.expired .flechas-plan-days-pill {
    background: #dc2626;
}

.flechas-plan-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin: 2px 0;
}

.flechas-plan-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.flechas-plan-time-card.warning .flechas-plan-progress-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.flechas-plan-time-card.expired .flechas-plan-progress-fill {
    background: #ef4444;
}

.flechas-plan-subtext {
    font-size: 0.72rem;
    color: #065f46;
    font-weight: 600;
    line-height: 1.3;
}

.flechas-plan-time-card.warning .flechas-plan-subtext {
    color: #92400e;
}

.flechas-plan-time-card.expired .flechas-plan-subtext {
    color: #991b1b;
}

/* Botón para abrir/cerrar edición de Datos del Perfil */
.flechas-btn-toggle-profile {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.6rem 0.8rem;
    background: #ffffff;
    border: 1.5px solid #fda4af;
    border-radius: 10px;
    color: #be123c;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.flechas-btn-toggle-profile:hover {
    background: #fff1f2;
    border-color: #e11d48;
}

/* Formulario desplegable de edición de perfil (Nombre, Correo, Contraseña) */
.flechas-profile-edit-form {
    display: none;
    flex-direction: column;
    gap: 0.6rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem;
    margin-top: 0.15rem;
}

.flechas-profile-edit-form.open {
    display: flex;
}

.flechas-pf-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.flechas-pf-field label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.flechas-pf-field input {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.flechas-pf-field input:focus {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.flechas-pf-pass-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.flechas-pf-pass-wrap input {
    padding-right: 2.2rem;
}

.flechas-pf-eye-btn {
    position: absolute;
    right: 6px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 0.82rem;
}

.flechas-pf-save-btn {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: #ffffff;
    border: none;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
    transition: all 0.2s ease;
    margin-top: 2px;
}

.flechas-pf-save-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.flechas-pf-feedback {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    padding: 0.4rem 0.5rem;
    border-radius: 7px;
    display: none;
}

.flechas-pf-feedback.ok {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.flechas-pf-feedback.err {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   8. PIE DE PÁGINA UNIFICADO, SUTIL Y ADAPTABLE A CADA DISPOSITIVO
   ========================================================================== */
.flechas-unified-footer,
.menopause-footer {
    background: #ffffff !important;
    border-top: 1px solid #f1e4e6 !important;
    padding: 0.95rem 1.25rem !important;
    margin-top: 1.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.flechas-unified-footer .footer-inner,
.menopause-footer .footer-inner {
    max-width: 1280px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.55rem !important;
}

.flechas-unified-footer .footer-brand,
.menopause-footer .footer-brand {
    display: flex !important;
    align-items: center !important;
    gap: 0.7rem !important;
    text-align: left !important;
}

.flechas-unified-footer .footer-logo,
.menopause-footer .footer-logo {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    object-fit: contain !important;
    border-radius: 9px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
    padding: 2px !important;
    flex-shrink: 0 !important;
}

.flechas-unified-footer .footer-brand strong,
.menopause-footer .footer-brand strong {
    display: block !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
    margin: 0 !important;
}

.flechas-unified-footer .footer-brand p,
.menopause-footer .footer-brand p {
    font-size: 0.73rem !important;
    color: #64748b !important;
    line-height: 1.3 !important;
    margin: 1px 0 0 0 !important;
}

.flechas-unified-footer .footer-disclaimer,
.menopause-footer .footer-disclaimer {
    border-top: 1px solid #f1f5f9 !important;
    padding-top: 0.5rem !important;
    margin: 0 !important;
    text-align: left !important;
}

.flechas-unified-footer .footer-disclaimer small,
.menopause-footer .footer-disclaimer small {
    display: block !important;
    font-size: 0.68rem !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

.flechas-unified-footer .footer-disclaimer strong,
.menopause-footer .footer-disclaimer strong {
    color: #475569 !important;
    font-weight: 700 !important;
}

@media (max-width: 768px) {
    .flechas-unified-footer,
    .menopause-footer {
        padding: 0.75rem 0.95rem !important;
        margin-top: 1.25rem !important;
    }

    .flechas-unified-footer .footer-inner,
    .menopause-footer .footer-inner {
        gap: 0.45rem !important;
    }

    .flechas-unified-footer .footer-brand,
    .menopause-footer .footer-brand {
        gap: 0.55rem !important;
    }

    .flechas-unified-footer .footer-logo,
    .menopause-footer .footer-logo {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
        max-height: 28px !important;
        border-radius: 7px !important;
    }

    .flechas-unified-footer .footer-brand strong,
    .menopause-footer .footer-brand strong {
        font-size: 0.75rem !important;
    }

    .flechas-unified-footer .footer-brand p,
    .menopause-footer .footer-brand p {
        font-size: 0.67rem !important;
    }

    .flechas-unified-footer .footer-disclaimer,
    .menopause-footer .footer-disclaimer {
        padding-top: 0.4rem !important;
    }

    .flechas-unified-footer .footer-disclaimer small,
    .menopause-footer .footer-disclaimer small {
        font-size: 0.62rem !important;
        line-height: 1.35 !important;
    }
}

/* ==========================================================================
   9. BOTÓN Y MODAL DE AYUDA Y SOPORTE TÉCNICO (ESTILO ALJABA EN FLECHAS)
   ========================================================================== */
.flechas-help-dropdown-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 0.62rem 0.85rem !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    border-radius: 10px !important;
    border: 1px solid #bae6fd !important;
    background: #f0f9ff !important;
    color: #0369a1 !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.flechas-help-dropdown-btn:hover {
    background: #e0f2fe !important;
    border-color: #7dd3fc !important;
    color: #0c4a6e !important;
}

.flechas-help-dropdown-btn .help-btn-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.flechas-help-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.62) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 2147483646 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.flechas-help-modal-overlay.show {
    display: flex !important;
}

.flechas-help-modal-box {
    background: #ffffff !important;
    border-radius: 18px !important;
    width: 100% !important;
    max-width: 520px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28) !important;
    border: 1px solid #e2e8f0 !important;
    animation: flechasDropdownFade 0.2s ease !important;
}

.flechas-help-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1rem 1.25rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: linear-gradient(135deg, #fff1f2 0%, #f0f9ff 100%) !important;
    border-radius: 18px 18px 0 0 !important;
}

.flechas-help-modal-header h3 {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.flechas-help-modal-close {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(15, 23, 42, 0.06) !important;
    color: #475569 !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.flechas-help-modal-body {
    padding: 1.15rem 1.25rem !important;
}

.flechas-help-info-banner {
    padding: 0.8rem 0.95rem !important;
    border-radius: 12px !important;
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    color: #0c4a6e !important;
    font-size: 0.8rem !important;
    line-height: 1.45 !important;
    margin-bottom: 1rem !important;
}

.flechas-help-form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

@media (max-width: 540px) {
    .flechas-help-form-grid {
        grid-template-columns: 1fr !important;
    }
}

.flechas-help-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-bottom: 0.75rem !important;
}

.flechas-help-form-grid .flechas-help-field {
    margin-bottom: 0 !important;
}

.flechas-help-field label {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
}

.flechas-help-field input,
.flechas-help-field textarea {
    width: 100% !important;
    padding: 0.55rem 0.75rem !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 0.84rem !important;
    font-family: inherit !important;
    color: #0f172a !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

.flechas-help-field input:focus,
.flechas-help-field textarea:focus {
    outline: none !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14) !important;
}

.flechas-help-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid #f1f5f9 !important;
}

.flechas-help-btn-cancel {
    padding: 0.55rem 1rem !important;
    border-radius: 10px !important;
    border: none !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.flechas-help-btn-submit {
    padding: 0.55rem 1.15rem !important;
    border-radius: 10px !important;
    border: none !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28) !important;
}

.flechas-help-status {
    margin-top: 0.65rem !important;
    padding: 0.55rem 0.75rem !important;
    border-radius: 9px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    display: none;
}

.flechas-help-status.ok {
    display: block !important;
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.flechas-help-status.err {
    display: block !important;
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}
