/* Selector de sexo */
.sexo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}

.sexo-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-soft);
}

.sexo-card:hover {
    border-color: var(--secondary-color);
}

.sexo-card.active {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.sexo-icon {
    font-size: 2rem;
    margin-bottom: 0.3rem;
    display: block;
}

.sexo-label {
    font-family: var(--font-primary);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Medidor visual cintura/cadera */
.medidas-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 0 0.5rem;
    flex-wrap: wrap;
}

.figura-wrap {
    position: relative;
    flex-shrink: 0;
}

.medida-tag {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.25rem 0.7rem;
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: border-color var(--transition);
}

.medida-tag.cintura {
    top: 38%;
    left: -90px;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.medida-tag.cadera {
    top: 58%;
    right: -90px;
    border-color: var(--accent-dark);
    color: var(--accent-dark);
}

.medida-tag-line {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
}

/* RCC display grande */
.rcc-display {
    text-align: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.rcc-display::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.rcc-etiqueta {
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.4rem;
}

.rcc-valor {
    font-family: var(--font-primary);
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.rcc-umbral {
    font-family: var(--font-primary);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 0.3rem;
}

/* Gauge de riesgo */
.gauge-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.riesgo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.riesgo-bajo {
    background: #d1fae5;
    color: #065f46;
}

.riesgo-moderado {
    background: #fef3c7;
    color: #92400e;
}

.riesgo-alto {
    background: #fee2e2;
    color: #991b1b;
}

.riesgo-muy-alto {
    background: #fce7f3;
    color: #9d174d;
}

/* Barra de riesgo */
.riesgo-barra-wrap {
    margin-top: 1rem;
}

.riesgo-barra-bg {
    height: 20px;
    border-radius: 50px;
    display: flex;
    overflow: hidden;
    position: relative;
}

.riesgo-seg {
    height: 100%;
}

.riesgo-seg:first-child {
    border-radius: 50px 0 0 50px;
}

.riesgo-seg:last-child {
    border-radius: 0 50px 50px 0;
}

.riesgo-marker {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 30px;
    background: #1e3a8a;
    border-radius: 2px;
    transition: left 0.5s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.riesgo-marker::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1e3a8a;
    border: 2px solid #fff;
}

.riesgo-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
}

.riesgo-labels span {
    font-family: var(--font-primary);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Tipo de cuerpo (manzana/pera) */
.tipo-cuerpo-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.tipo-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: all var(--transition);
    opacity: 0.5;
}

.tipo-card.activo {
    opacity: 1;
    box-shadow: var(--shadow-hover);
}

.tipo-card.manzana.activo {
    border-color: #dc2626;
    background: #fff5f5;
}

.tipo-card.pera.activo {
    border-color: #059669;
    background: #f0fdf4;
}

.tipo-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.tipo-nombre {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.tipo-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Índices adicionales */
.indices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.7rem;
    margin-top: 0.5rem;
}

.indice-card {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.indice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.indice-card.ok::before {
    background: #059669;
}

.indice-card.warn::before {
    background: #d97706;
}

.indice-card.danger::before {
    background: #dc2626;
}

.indice-label {
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.indice-valor {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.indice-estado {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-primary);
}

.indice-estado.ok {
    color: #059669;
}

.indice-estado.warn {
    color: #d97706;
}

.indice-estado.danger {
    color: #dc2626;
}

/* Cómo medir ilustración */
.como-medir-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.medir-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.medir-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.medir-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.medir-text strong {
    display: block;
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: 0.82rem;
    margin-bottom: 0.1rem;
}

@media (max-width: 580px) {
    .medidas-visual {
        flex-direction: column;
        gap: 1rem;
    }

    .medida-tag.cintura {
        left: -80px;
        font-size: 0.68rem;
    }

    .medida-tag.cadera {
        right: -80px;
        font-size: 0.68rem;
    }

    .tipo-cuerpo-wrap {
        grid-template-columns: 1fr;
    }

    .como-medir-grid {
        grid-template-columns: 1fr;
    }
}